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.

led blink using timer

Other Parts Discussed in Thread: MSP430G2553

i am trying to blink led using timer ..but i keep getting the errors

--expected a field name

-TACTL_bit is undefined

my code is as follows..please help anyone ??

/*
* main.c
*/
#include<msp430g2553.h>
#define LED1 BIT0
#define LED2 BIT6
void main(void)
{
WDTCTL = WDTPW | WDTHOLD;
P2DIR = LED1 | LED2 ;
P2OUT = ~LED1 | ~LED2 ;
TACTL = MC_2 | ID_3 | TASSEL_2 |TACLR | TAIE ;
for(;;)
{
while(TACTL_bit.TAIFG == 0)
{

}
TACTL_bit.TAIFG=0;
P2OUT ^= LED1 | LED2 ;
}
}

**Attention** This is a public forum