Interrupts are an extremely useful, yet often feared element of microprocessors. Interrupts allow you to run a program, while still being able to react to asynchronous input from the outside world.
[box type=”note” color=” #202020 ” bg=”#ffbb00 ” font=”verdana” fontsize=”14″ radius=”20 ” border=”#000″ float=”right” head=”Attributes”]Thanks to Jeremy , for this articles[/box]
On many platforms they can be confusing to implement, but the arduino makes it easy! In this week’s episode, I’ll show you how to use a hardware-debounced button to activate a hardware interrupt on the arduino.
I’d suggest you go check out episode 2, where I initially introduced button debouncing, if you haven’t already. I won’t be covering timer interrupts in this episode, since I recently wrote an extensive blog post about using them. Enjoy the video!
EDIT: You can find a great run-down of debouncing techniques and problems here: http://www.ganssle.com/debouncing.htm (Thanks Jope)
You can download the files associated with this episode here:
[box color=”#985D00″ bg=”#FFF8CB” font=”verdana” fontsize=”14 ” radius=”20 ” border=”#985D12″ float=”right” head=”Major Components in Project” headbg=”#FFEB70″ headcolor=”#985D00″]PARTS LIST
1. Arduino Uno: http://us.element-14.com/arduino/a000046/arduino-uno -board/dp/13T9285
2. USB Cable: http://us.element- 14.com/jsp/search/productdetail.jsp?SKU=73H0884
3. Arduino Software: http://arduino.cc/en/Main/Software
4. Breadboard: http://us.element-14.com/jsp/search/productdetail.jsp?SKU=17C6965
5. LEDs: http://us.element-14.com/jsp/search/productdetail.jsp?SKU=30K0645
6. 150 ohm Resistor: http://us.element-14.com/multicomp/mcf -0 -25w -150r/resistor-carbon -film -150ohm-250mw/dp/38K0339
7. Pushbutton: http://us.element-14.com/c -k/ksl1m411 – lf t/switch -tactile -spst -no- 50ma-thd/dp/88K5321
8. Jumper Kit: http://us.element-14.com/3m/923351-i/pcb-accessories/dp/65F2290
9. IR Distance Sensor: http://us.element- 14.com/sharp/gp20a41sk0f/dp/14N9318
10. Inverting Schmitt Trigger: http://us.element- 14.com/stmicroelectronics/m74hc14b1r/ic – hex-inverter -schmitt-trigger/dp/89K0862
11. 10k ohm Resistor: http://us.element-14.com/multicomp/mccfr0w4j0103a50/resistor -carbon -film -10kohm-250mw/dp/58K5002
12. 10uF Capacitor: http://us.element-14.com/multicomp/mcgpr100v106m6 – 3×11/capacitor-alum- elect -10uf -100v/dp/70K9661 [/box]
For more detail: Arduino Interrupts and Debouncing