I am trying to read in a simple input from one of the pins. And if the pin is high I want it to turn on the LED. I have control over the LED, but the microcontroller is not reading in the pins or even setting the pin to high. I measured the voltage on the pin and it gives me 0 V. Can anyone help?
P2DIR &= 0b00000000;
P2REN = 0xFF;
P2OUT = 0xFF;
while(1)
{
if(P2IN & BIT5 > 0){
LED1_ON;
}
else
P1OUT |= BIT6;