I’m having some issues trying to get a simple “flashing the LED” program running. Here’s my code:
unsigned int delay ( unsigned int x)
{
unsigned int i,j;
for (i = 0; i<= x; i++)
{
for(j=0;j<=1000; j++)
;
}
return 0;
}
#include "msp430x20x3.h"
void main( void )
{
P1DIR |= 0x01;
P1SEL &= 0xFE;
for (;;)
{
P1OUT ^= BIT0 ;
delay(65535);
}
}
This results in the LED attached to P1.0 flickering at about 18Hz. I tried to slow it down by adding many more calls of delay(65535); but it doesn’t change the flashing rate.