●●●●
I needed a seven-
segment remote
display that received
its data from RS-232,
and I wanted it fast.
Here’s a little project
that can be built in a
THE MUX MUX
LIGHT
DISPLAY
weekend and will give
you four digits of
How to Light a Display One
Segment at a Time
information. You can
use either common
anode or common
cathode seven-segment
displays without
changing the hardware!
I also wanted to use a
PIC microcontroller for
it in Figure 1. You’ll see
current being sourced to each digit.
A PIC can only source or sink a maximum of 25 mA through any single
output pin. So the PNP transistors
are used as current amplifiers.
But if we only drive part of the
digit at a time, we can cut down
the total current requirement! I
wondered if I could wire the display
so the PIC sources and sinks only a
single segment each pass. Would
the duty cycle for each segment be
too low, causing the display to be
dim? I did a little bit of math and
came up with the following:
what I wound up with.
Seven-segment LEDs still have
some advantages over the LCD
displays that are very popular now.
They are self lighting, large, and easy
to read (like from across the room.)
They are inexpensive, don’t require
complicated voltage converters for
fussy backlit displays and tolerate
wide temperature ranges (LCDs
don’t work too well below freezing
while LEDs are quite happy operating there.)
Many of the seven-segment
designs that I’ve seen drive all eight
of the segments (seven plus the
decimal point) of a digit at the same
time. The problem is that there can
be quite a bit of current sourced
through the common connection of
the digit.
One thing I noticed
in existing PIC designs
were four PNP transistors tied to the anodes
of a typical four digit
display. This is to
manage the worst case
current draw. For example, the display that I
use typically draws
about 5 mA per segment. Multiply that by 8
and you have 40 mA of
1/( 4 digits * 8 segments/digit) *
60Hz(a good refresh rate) = about
500 microseconds
■ FIGURE 1
That’s no problem for a PIC
running the internal oscillator,
especially since the only other thing
that it’s doing is reading characters
from the serial input. Still, that’s only
about a three percent duty cycle.
Would that be enough?
Let’s see what we have to do.
For an LED, we have a diode (light
emitting diode, remember?) A diode
only conducts current when the
anode is positive and the cathode is
negative. Further, the anode voltage
38
June 2007