HI,
i what to read the voltage on the port 1 pins and blink the LED if = F3 or else LED=high. Below is the code for the same but there is no output for it (LED is not glowing or remaining ON) in any situation
is the code written properly?
#include <msp430.h>
#include <msp430f5528.h>
#include <math.h>
int main(void) {
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
P4DIR |= BIT7;
if (P1IN == 0xF3)
{
P4OUT|= BIT7 ; // P4.7 High
__delay_cycles(10000);
P4OUT&=~BIT7; // P4.7 Low
__delay_cycles(10000);
}
else
{
P4OUT|= BIT7 ; // P4.7 High
__delay_cycles(10000);
}
}
Please help me with it
Thank you,