Lesson 3: Part 2: Interrupt - External Input


In this lesson we will be showing way to connect STM32 board with external push button. Do take note we are using the source code in previous lesson. The easier way of doing this is following using the same circuit in STM32 board as below:

On Board Push Button Circuit
 By implementing Push button, R28/R29, the actual image will be as below.
*At the time of writing I was unable to find a push button to use, thus I had replace the button with a white wire.
Blue: PA0, Red:3.3V, Green: Ground
White: Button
White Wire is Not Connect/Button is Release
LED is Off

White Wire is Connect/Button is Press
LED is On

To properly design a input push button detection, a debounce circuit or software has to be implement. I found a useful article discussing on push button(including debounce)  here. Do take note it is on MSP430 from TI, just understand the theory section, skip the MSP430 SFR settings.

No comments:

Post a Comment