This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compile error

Other Parts Discussed in Thread: MSP430G2553

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;
}

**Attention** This is a public forum