Interrupt is important as it enable software to transfer works to hardware and get notified when the hardware has completed its works. A good example is our previous interrupt tutorial. By passing the input checking to hardware, software no longer require to constantly poll the pin state and check if there is state change.
However, interrupt does make the system more complex in the sense that now any code in the main() function can be interrupted and interrupt service routine(ISR) get executed. Refer below for more explanation of interrupt to avoid buggy software.
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 |
*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 |
|
Subscribe to:
Posts (Atom)