This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430G2553: Issue with Internal pullup resistor

Part Number: MSP430G2553


Hi all,

 I have tried to implement a positive logic in an onboard switch(P1.3) in MSP430G2 launchpad, I want it to be done by enabling the internal pulldown resistor, I tried the code below but it didn't work as I expect,

can anybody provide a solution for this issue,

int main()
{
clock_init();  // disable watchdog timer
P1DIR = 0X00;
P1DIR |= BIT0 + BIT6; //P1.0 and P1.6 output
P1OUT &= ~BIT3;
P1REN |=BIT3;
//int count =0;
P1OUT |=BIT0;
while(1)
{
if(!(P1IN & BIT3))
{
P1OUT ^= BIT6;
delay_ms(100);
}
else
{
P1OUT &= ~BIT6;
P1OUT ^= BIT0;
delay_ms(100);
}
}
return(0);
}
The logic I tried to implement was when the switch is pressed P1.0 should blink

**Attention** This is a public forum