Project Info
Author: Chris
Difficulty: Easy-Medium
Time Invested: 1 Hour
Prerequisites:
Take a look at the above
tutorials before continuing
to read this tutorial.
Author: Chris
Difficulty: Easy-Medium
Time Invested: 1 Hour
Prerequisites:
Take a look at the above
tutorials before continuing
to read this tutorial.
This tutorial will use a simple example to show you how to include an externally generated interrupt to tell the PIC to run a higher priority task. Since this tutorial is writen for students the part count will be kept low.

Purpose & Overview of this project
The goal of this tutorial is to build a system that has two types of outputs. One output will be the main program that flashes LEDs in a back and forth 'knight-rider' fashion. The second output will be triggered by an interrupt and should flash all the LEDs on and off a few times before exiting back to the main program.
In order to generate the interrupt, a standard push-button will be used. When the button is pushed, the PIC 18F452 microcontroller will sense the state change (from 5v to 0v) and issue a hardware interrupt to the software. The software will then pause the main program, execute the interrupt routine and return to the same spot in the main program.