Actually i written code for I2c. But i posting some part of it.For below statement it showing error has
Description Resource Path Location Type
#20 identifier "USICTL1" is undefined main.c /i2c-trial1 line 8 C/C++ Problem
i am thinking all these variable are defined in header file. y this error.
USICTL1 =USIPE7 | USIPE6 | USIMST | USIOE | USISWRST;
code:
#include <msp430G2553.h> or #include <msp430.h>
void main(void) {
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
P1DIR |= 0x01; // Set P1.0 to output direction
USICTL1 =USIPE7 | USIPE6 | USIMST | USIOE | USISWRST;
for(;;) {
volatile unsigned int i; // volatile to prevent optimization
P1OUT ^= 0x01; // Toggle P1.0 using exclusive-OR
i = 10000; // SW Delay
do i--;
while(i != 0);
}
//return 0;
}