Alphanumeric Display Driver

The display pictured below is driven by a PIC microcontroller programmed to interface 15 segment LED displays. This is a 5 MB video of the display scrolling a message. I bought some LED displays on Digikey for fun but soon realized I'd need a driver chip to make use of them. Maxim offers many nice drivers for matrix displays and 7 segment displays, but if you need a custom driver for a random display (such as the 15 segment displays I bought) you may have to design your own. Itís not difficult, and here you can find some code to work with the PIC series microcontrollers using interrupts.

Finished display
module using PIC based display driver. The display is scrolling the message, 'THE

Before realizing the design on PCB, I put it together on a breadboard to make sure it would be bright enough. Since the displays are multiplexed, I need to provide enough current to each digit (for the 12% of the time they are on) to appear bright enough on average. I found that the displays were readable using transistors only for the common cathodes of the displays, which saves 15 transistors. You can use EAGLE to view the following schematic and board files:

display board schematic (EAGLE format)
display board layout (EAGLE format)

The DigiKey part numbers for the 15 segment displays I used are 160-1012-ND for green characters, and 160-1010-ND for red/orange. You can download the datasheet in pdf format here.

In the picture above the display is scrolling ď*** THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG 1234567890 TIMESĒ to test all of the characters out. I use a PIC16F77 by Microchip because it has a lot of output pins (perfect for an LED driver). You might as well use a PIC16F877A, because it has all the features youíll ever want and itís supported by the free HiTech PICC compiler. The display processing takes up very little of the microcontrollers available processing and runs from the interrupt routine so itís transparent to the programmer. Below is a sketch of how I imagined the characters should look:

I created a chart to help with the Hex codes that you'll find in the microcontroller code:

Click here to see the microcontroller code.

Movie of the display scrolling the message (QuickTime mp4, 1.2 MB)

The digits are multiplexed and refreshed at around 75 Hz. I had placed a MAX202 level shifter on the breadboard because I was going to allow updating the message by RS232, but I havenít done so yet in the code. The other support chip is a 3 to 8 active high decoder, same function as a 74í238. The active low version (74í138) is easy to find, but the active high is not, so I just coded one in VHDL for a PALCE16V8.

Click here for the VHDL code.

You may ask, ďWith so many outputs, why bother with a separate decoder chip?Ē Well, it saves precious microcontroller outputs for other things, and it allows you to multiplex a lot of displays. Increasing the number of displays to 16 only requires one additional output line from the microcontroller. Youíll need a bigger PAL (or CPLD) though.

As far as circuitry goes, it should be pretty clear from the enlarged picture that Iím multiplexing the digits to the microcontroller. If itís not, check out some sites on the internet to see how thatís done. The 8 transistors are 2N3904 but you can use any NPN transistors to switch the grounds to the displays. If you try to connect the grounds directly to a microcontroller or an (active low) 74í138, youíll find that your displays are too dim. This is because those outputs can only sink about 25 to 50 mA maximum which only leaves you with about 3 mA per segment. Divide that by 8 (since each are only on 1/8 of the time), and you can see why they would be dim. The transistors can easily switch 100 to 200 mA so the brightness is acceptable. Ideally (which wonít happen here), youíd want a peak current of about 40 mA per segment, since they are only on a fraction of the total time. Some displays are common anode, and you will use 2N3906 PNP transistors to VCC instead. Oh, by the way, this runs at 5 volts, but can run at lower voltages depending on the clock you use.

Jan. 18, 2004 William Summerfield Dubel IV