LED Chaser for PIC16F84A and 16F628A
This simple circuit functions
as a 12 LED chaser. A single illuminated LED 'walks' left
and right in a repeating sequence, similar to the effect seen on
KITT, the car in the
Knight Rider TV series.
Fully commented source code and
programmer ready HEX files are provided for the PIC 16F84A and
16F628A at the bottom of this page.
The circuit has been
constructed on a PCB but can easily be built on strip-board, or a
solderless breadboard.
This project has been put
together for anyone starting with their first PIC and the source
code is heavily commented with references to the PIC datasheets
and the MPASM assembler user guide.
Schematic
Download schematic in PDF
PCB Layout
Construction notes:
Download PCB artwork in PDF
Download Eagle 5.02 CAD Files (ZIP)
Fig.1 | Fig .2 | Fig. 3 |
Firmware
You can use either a PIC 16F84A or PIC 16F628A microcontroller with this circuit. Download the files required below.
The HEX files are ready to program straight into the PIC. The asm files are the source code which you can modify or just view to see how it works. If you are going to modify the code I recommend you download and install the Microchip MPLAB IDE which will allow you to edit, modify and program the PIC seamlessly.
If you need a PIC Programmer I strongly recommend the Microchip PICKit 2, this is available from suppliers world wide or direct from Microchip. It's reasonably cheap to buy and reliable. I have a couple of them and I wouldn't use anything else now.
Description | Filename | Download link |
Source code for 16F84A | ledchaser16F84A.asm | download |
HEX file ready to program into the PIC | ledchaser16F84A.HEX | download |
Source code for 16F628A | ledchaser16F628A.asm | download |
HEX file ready to program into the PIC | ledchaser16F628A.HEX | download |
Microchip MPASM User Guide | 33014J.pdf | download |
16F628A datasheet | 440044b.pdf | download |
16F84A datasheet | 35007b.pdf | download |
Source from: http://picprojects.org.uk/projects/ledchaser/index.htm