7-Segment Display -- Four Digits


It's an easy jump from multiplexing two digits to four digits. Instead of discrete transistor current sinks, we'll use the ULN2003A chip which contains seven Darlington pairs (of which only five are needed).


Port B drives the seven anodes, while Port A controls the five current sinks.

This particular LED display is already internally wired for multiplexing, including the colon, and sits on standard 14-pin DIP pins. So it's mechanically very easy to mount and wire up. I believe I bought mine from SparkFun if I recall aright.

There's nothing startling in the source code. As usual, we'll store the segment patterns in a constant array and access them via indexing. The multiplexing is driven by interrupts which occur at a rate of about 61 Hz. That's sort of pushing it from a flicker-point of view, but I didn't notice any in this particular device.

Click to get the source code.
Click to get the schematic PDF.

Next Project: 7-Segment Display -- Eight Digits

No comments:

Post a Comment