Tutorials

4-Bit Adder
Interfacing an LED Dot-Matrix
Using the Prism 3002 Logic Analyzer

LED Matrix Tutorial

You've probably seen one of those scrolling marquee LED signs that seem to be everywhere these days. If you're like me, you wondered how you could build your own LED sign without having to address each LED individually, which would be near impossible for a sign with more than just a few LEDs. This short tutorial will tell you how the signs actually work.

One of the first ways you might have thought of to do this is to put enough shift registers on your sign to hold a bit for every LED. Then, you could connect the cathodes to the appropriate bit of the right register, and you could connect all the anodes to positive voltage. To display something on your sign, you'd just shift in the data one bit at a time for the entire sign. Note that in this scheme, a "0" in the register would light the LED, and a "1" would turn it off.

This would work, and it might even do a decent job at it. But there are a few problems with it. First, it requires a chip for every four or eight LEDs, which is pretty annoying. Second, it probably won't be very bright since your register might only be able to sink of few mA of current per pin.

The solution to both of these problems is quite simple. We can take advantage of something known as "persistence of vision," which means that if you display several things very quickly, your eye will act as if they all were displayed simultaneously. This is how televisions appear to be displaying an entire picture when it's really only an electron beam displaying a single point at a time.

Instead of every row always displaying its data, we can display the data only for a single row at a time, but cycle through all the rows very quickly. Connect a single shift register output to all the cathodes in a column. Then, to display only the row you want, make sure that only one row is connected to +5V at any time. You can accomplish this with a ring counter, so that only one row is a logic "1" at any given time.

I've made a simple schematic for running an 8x8 grid of LEDs using a demultiplexer, some inverters, and a shift register. The two input lines to the demultiplexer decide which row will be illuminated. Then, you can use the clock and shift register input to move your data into the shift register. The transistors allow more brightness, and they also invert the shift register outputs for you. Click on the picture for a full-sized version. Schematic for LED Matrix interfacing

That's really all there is to interfacing an LED array. If you have any questions, send them off to sigarch@acm.uiuc.edu.

10/14/01 by Joel Jordan