- Wed Apr 15, 2009 5:38 am
#70700
Hi guys,
I am using the OLIMEX MSP430-169LCD board based on MSP430F169 Uc.
I had just started the programming part and wanted to control the LED on Port 2(pin1) OR P2.1.
I wrote a simple program which is not working :
#include <io430x16x.h>
int main( void )
{
WDTCTL = WDTPW + WDTHOLD;
P2OUT &= ~BIT1; // low
P2DIR |= BIT1; // output
return 0;
}
The code is going under the debugging mode but the LED is not lighting.
My Hardware is working fine as the Demo LCD code which lights UP the LEd, when loaded is working fine.
can you please advise where I am going wrong?
Regards,
pranay
I am using the OLIMEX MSP430-169LCD board based on MSP430F169 Uc.
I had just started the programming part and wanted to control the LED on Port 2(pin1) OR P2.1.
I wrote a simple program which is not working :
#include <io430x16x.h>
int main( void )
{
WDTCTL = WDTPW + WDTHOLD;
P2OUT &= ~BIT1; // low
P2DIR |= BIT1; // output
return 0;
}
The code is going under the debugging mode but the LED is not lighting.
My Hardware is working fine as the Demo LCD code which lights UP the LEd, when loaded is working fine.
can you please advise where I am going wrong?
Regards,
pranay