PicPOV - Persistence of Vision with a PIC18
Description

PicPOV is a project based on "persistence of vision". A PIC microcontroller blinks 8 LEDs on and off so that when waved through the air, a message appears to float in front of the viewer.
Design and Implementation
The design goals were:
- be simple to use;
- capable of storing multiple messages;
- simple to change between messages;
- simple to load new messages.
A small microcontroller like the PIC18F1220 does this job just fine! It has only 18 pins, an internal oscillator, eeprom and a serial port.
- The internal oscillator removes the need for a crystal;
- Multiple messages are stored inside the eeprom;
- One button changes to the next message (8 in total);
- New messages can be loaded through the serial port using any terminal program.
The serial port connection is usually implemented using a MAX232 or similar IC but to reduce the costs even more, a simple 2 transistor solution is used.
Schematic
The circuit is divided in three areas:
- Microcontroller, LEDs and button on the left side are the basic POV circuit;
- Two transistors and 4 resistors on the bottom right implement a level shifter to to interface with the serial port;
- and finally at the top right a power supply.
The power supply includes two 1K resistors to limit the amount of current obtained from the serial port in the event of something going wrong.
The jumper on the left side routes the power from the external input either to the PIC, if it is less than 5V or to the power supply if it is greater than 5V.
PCB
This is the release 1.0 of the PCB and it is completely straighforward from the schematics.
From left to right:
- Serial port connector
- Power supply near the jumpers
- Level shifter above the power supply
- PIC and button
- and finally the 8 LEDs
The two pin molex connector is the power input. Connect anything there from batteries to AC/DC transformers/power supplies. Allowed voltages range from 3V up to 24V. Don't forget to place the JP1 according to the input voltage:
- position 1-2: input voltage above 5V
- position 2-3: input voltage below 5V
When the circuit is connected to the serial port it will get power from the port.
Mounting the components should be simple. Start from the smaller ones like the resistors and leave the PIC and serial connector to last.
Software
The firmware is written in C for picc18. It performs 3 tasks in sequence:
- displays the currently selected message;
- checks the button for clicks to advance to the next message;
- checks the serial port to accept new messages.
The message is displayed on the LEDs at a constant rate and a small pause is inserted at the end, before the process repeats itself. A timer is used to generate an interrupt and control the amount of time at which the LED are refreshed.
Since the button is not connected to any interrupt pin (yes this was a design bug!) it is sampled inside the timer ISR and if it was clicked, a variable signals that event. This variable is later used in the main to change between messages.
The serial port task checks to see if any chars have arrived and displays the message "Push ENTER" every five seconds. If ENTER is detected, the software will stop displaying the current message and asks the user for a new one. The current message number is displayed on the LEDs! Up to eight messages are supported, each with a maximum of 15 chars. To load a new message to into picPOV just press enter after typing it!
Evaluation
Here are some pictures:
- Generic HEX file
- Source code
- Eagle project with schematic and PCB
(coming soon)






