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.

P1.3 push button not functioning? Works if I use paperclip.



My friend and I are getting into the world of micro controllers, but have reached an interesting wall. When trying to learn how to use a push button we can not seem to get it to respond. After a few hours of googling around and trying to fix our code I decided that I would pull out the old paper clip and go straight from power to the P1.3 pin. It works. Our code works but not with the button. 

Anybody else have this problem or no why it is this way? Maybe even how to fix it...

  • You probably mean P1.3 of the LaunchPad G2. (There are many different microprocessors and many different circuit boards. Lots of them have P1.3, but they are not the same.)

    If so, there is a push bottom that connects P1.3 to ground when pushed. Do not connect that to Vcc with paper clip. Doing so and pushing the button will short Vcc to ground!

    If you look carefully at the PCB, there is also a place for a resistor that goes from P1.3 to Vcc. But the resistor is probably missing; and the that is the reason the program cannot sense the push button. In the software, if you set (a) BIT3 of  P1REN to 1 and (b) BIT3 of P1OUT to 1, then an internal resistor is enable and connects to Vcc. This is equivalent to having the external pull-up resistor (and this the the reason TI did not solder that resistor on the PCB). 

  • Thank you! After a few more ours of looking at examples and keeping what you said in mind I got it. Thank you so much for the quick response. I look forward to all the fun I can have with this knowledge :D

**Attention** This is a public forum