Hi
I bought a MSP430F5529 launchpad and tried testing by writing a basic example for the push buttons connected on port P1.1 and glow LED's on P1.0 and P4.7 but it seems the push buttons does not affect the LEDs.
Here is the code below,
#include <msp430.h>
void main()
{
WDTCTL = WDTPW + WDTHOLD;
P1DIR |= BIT0;
P1REN |= BIT1;
P4DIR |= BIT7;
P1OUT = P4OUT = 0X00;
while(1)
{
if(P1IN & BIT1)
P1OUT |= BIT0;
else
P4OUT |= BIT7;
}
return 0;
}
So when i press the button on P1.1 it does not enter the if part.
Kindly advise.
Thank you.