I started this project some years ago in order to learn about running matrix LED displays. The circuit uses
10 io from a PIC16F628 to run 64 LEDs configured in an 8x8 LED matrix. The display is refreshed every 8ms
or so giving a refresh rate of ~125Hz which is not to shabby considering the PIC is only running on the
4MHz internal oscillator. In order to prevent the PICs IO from having to drive the LEDs directly two
74HC574 latches were used to drive the rows and the columns. A 1ms interrupt is used to updated the display
giving the main loop the responsibility of updating the game. The main loop edits a buffer of the displayed
data and they the interrupt is disabled during the display RAM update process. This prevents the screen from
displaying artifacts during the drawing process.
LED Matrix in its natural state
Here is what the display looks like when everything is functioning correctly. After completing the construction
on the LED Display the first thing that was displayed was the smiley face. The smiley is to graphics people
as the "Hello World" is to software people. The LED matrix is broken down into two boards. The LED board and the
The LED board consists of 64 red LEDs and eight current limiting resistors. The row/anodes of the display
go out one connector and the columns/cathodes go out the other connectors.
LED Board the back side
As you can see from the above image the LED board was a real pain in the hind quarters to solder. The
board is just the proto board from radio shack. In soldering the display you have to be careful not
to cook any LEDs as it can be very difficult to change a single LED. The long leads sticking up from
the sides are used to mate the top and bottom boards together. They are just extra LED leads that
were shortened after soldering.
The control board houses the PIC16F628, the voltage regulator, the two 74HC574 and the user
interface push buttons. The 74HC574 are used to drive the LEDs to prevent the PIC from
getting cooked if something goes wrong. The voltage regulator is just a LM7805 or equivalent.
The push buttons are something that I pulled from a scrap pile that looked like they would
do the job.
When both the LED and control boards are placed side by side you can see how they fit
The boards are held together using nylon hardware from the local hardware store. As was
stated before, the leads used to link the two boards are cut leads from the LEDs after
soldering. The buttons are used for scrolling through images or in this case playing Nibbles.
It actually works!!!
Here is a quick video of the display flashing after I got it working.
Testing the Buttons
Here is a quick test to get the switch debouncing routine working. When a button is pressed the screen shows
a happy face. When the other button is pressed it shows a sad face.
Nibbles in Action
This is what the game looks like in the end. Hope you enjoy it.