PIC Interrupts vs. Polling

Current Part:

Parts
PIC 18F452 Microcontroller
PICkit2
7805 +5v Regulator
2x 10kΩ Resistor
20 MHz
47uF Capacitor
Push Button
LED Bar
Breadboard
Wires
SIPS
9v Connector
Battery Holder

Parts List Details
           The parts listed above are fairly common throughout electronics, however if you are unfamiliar with them I've described the main parts in greater detail below.

PIC 18F452
           This is the microcontroller that acts as the brains of the project. It will receive and execute the interrupt as well as the main loop of code.

7805 +5 Voltage Regulator
           This series of regulator is very common, it pulls an input voltage of +7.5v or greater down to a regulated +5v output which is what our digital electronics want to use.

20 MHz Crystal
           This is the oscillator and frequency at which the PIC will operate. The clock speed is not very crucial for this tutorial as nothing we are doing is timing-critical.

PICkit 2
           The PICkit 2 is a great programmer for uploading your compiled code from your PC to the PIC. It comes in a USB package so you don't have to worry about needing a serial or parallel port on an old desktop.

LED bar
           The LED bar is where all output will be displayed. In this tutorial I connected each led directly to the PIC's output. Generally this is a bad idea, you want to make sure to add a current limiting resistor between the PIC and the LED to avoid any possivel damage to either the PIC or the LEDs.

Push Button
           This button will be tied to ground (+0v) and when pressed it will change the voltage seen at the interrupt pin on PORTB from +5v to +0v, triggering the hardware interrupt.

Jumper Wires & Breadboard
           Additional breadboard wires, a breadboard, some batteries and connectors are also used for the platform setup an power supply.




;