Hi,
I am using code compiler for my development purpose . When I try to access the bit property of this contrroller , I always get an error . One of the program I am attaching here for your reference . This program I have taken from some sample code , in the code they have asked to use header file as "<io430x11x1.h>" but I am not able to find that file in the directry. Some article says <io430x11x1.h> is for IAR . However I tried with both the compiler and gets the same error . The error is pasted below the code .Please help me to resolve this
#include
<MSP430G2553.h>
#define
LED1 BIT0
#define
LED2 BIT6
void
main()
{
WDTCTL = WDTPW | WDTHOLD;
P1DIR = LED1 | LED2;
//TACTL = 0X02E0;
TACTL = MC_2|ID_3|TASSEL_2|TACLR;
for (;;)
{
// Loop forever
while (TACTL_bit.TAIFG == 0) ;
// doing nothing
TACTL_bit.TAIFG = 0;
// Clear overflow flag
P2OUT ˆ= LED1|LED2;
// Toggle LEDs
}
}
Description Resource Path Location Type
#66 expected a ";" main.c /led line 15 C/C++ Problem
#135 expected a field name main.c /led line 12 C/C++ Problem
#20 identifier "TACTL_bit" is undefined main.c /led line 12 C/C++ Problem
#7 unrecognized token main.c /led line 15 C/C++ Problem
#135 expected a field name main.c /led line 14 C/C++ Problem