Figure 5. For this two-digit display, duplicate Q1-Q5 and R8-R12 in Figure 2,
and parallel row pins 12, 11, 2, 9, 4, 5, and 6, respectively, of the two display devices.
So, to make a two-character display, repeat
the circuitry of Figure 2 for
a total of 10 columns ( 10
transistors and 10 base
resistors). Then, gang the
row pins of the two matrix
LEDs. For example, row
resistor R1 goes to pin 12
of both display devices;
R2 goes to pin 11 of both
display devices; and so on.
Conclude by connecting
the 10 column rig to the
circuitry of Figure 5.
The sidebar explains
what firmware to use for
the two-character display.
In this example, the unit
will count from 00 to 99,
and start over again. The
coding really isn’t much
more involved and, as usual, lots of
comments in the source code shed
light on how it all works.
The photo in Figure 6 shows what it
ends up looking like. At first blush, you
might think this is exceedingly elaborate
until you realize there’s actually very few
parts there — just a lot of wires. A
completed project on a printed circuit
board would appear far less busy.
If all you need is the ability to show
two digits (not alphabetic characters), then
here’s a neat trick. Rotate the matrix LED
90 degrees to yield a five-row, seven-column
arrangement. Then, think of the display as
being partitioned into a pair of three by five
matrices separated by a blank column. See
Figure 7 for the details. Since we’ve flipped
Help — I'm Out of Port Lines!
Matrix LEDs can gobble up microcontroller port lines in short order.
For a simple display of one or two characters, the designs described in
this article will hold you in good stead. If you really can't spare the pins
or want to upgrade to multi-color rigs, here are some options to consider.
One possibility would be to exploit an external serial-in, parallel-out
shift register chip like the common 74HC595. As the description suggests,
the data which control rows or columns are pumped in serially, and the
assembled bit pattern is applied to the LEDs in one fell swoop. Just be
sure to watch the current handling capabilities of the chip. A more
expensive but elegant approach for these displays would be a dedicated
driver like the MAX7219 or MAX7221. These take care of all the matrix
decoding requirements, and there's less worry about running out of
current to light the LEDs. More importantly, they can be interfaced by
the SPI protocol which really frees up the microcontroller pins.
However, they do run around $10 a pop which may not fit your budget.
May 2013 45