Maker Pro
Maker Pro

Hex Display Subcircuit

E

Eric Adamson

Jan 1, 1970
0
I'm developing a multiplexed two-digit hex display using 7-segment displays.
Multiplexing and BCD-hex encoding are being handled by a PIC. Diagram can
(hopefully) be seen at:

http://forum.microchip.com/upfiles/23628/Rp42593.png

My question relates to the inverter which is used to select the digit to be
driven, and how it should be implemented. I'm looking at a 74HC04, but find
that it's current rating is only around 4mA. Apologies for not having the
LED specs handy, but I'm headed off to work -- general advice would be fine.
It appears to be relatively efficient, and given that only one segment will
be driven at any given instant, my current requirements should remain fairly
low, save perhaps any need to overdrive for brightness compensation.

I'm not using the 74HC04 for anything else, so wiring several gates in
parallel seems a reasonable way to increase current capacity. The PIC can
source/sink at least 20mA, so it's probably fine to drive the segment which
appears at the inverter input, but I'm wondering whether it still might be
preferable to lose the inverter IC and buffer the RA? line with discretes.

BTW, the entire post can be accessed at this URL:

http://forum.microchip.com/m.asp?m=42520&mpage=1

Thanks in advance, for any advice you can offer.

Eric Adamson
Lansing, Michigan
 
L

Leon Heller

Jan 1, 1970
0
Eric Adamson said:
I'm developing a multiplexed two-digit hex display using 7-segment displays.
Multiplexing and BCD-hex encoding are being handled by a PIC. Diagram can
(hopefully) be seen at:

http://forum.microchip.com/upfiles/23628/Rp42593.png

I'd use one resistor for each pair of segments and drive each anode/cathode
from a different output bit. You don't need the inverter. The PIC outputs
can handle up to 20 mA, IIRC.

Leon
 
J

John Larkin

Jan 1, 1970
0
I'm developing a multiplexed two-digit hex display using 7-segment displays.
Multiplexing and BCD-hex encoding are being handled by a PIC. Diagram can
(hopefully) be seen at:

http://forum.microchip.com/upfiles/23628/Rp42593.png

My question relates to the inverter which is used to select the digit to be
driven, and how it should be implemented. I'm looking at a 74HC04, but find
that it's current rating is only around 4mA. Apologies for not having the
LED specs handy, but I'm headed off to work -- general advice would be fine.
It appears to be relatively efficient, and given that only one segment will
be driven at any given instant, my current requirements should remain fairly
low, save perhaps any need to overdrive for brightness compensation.

I'm not using the 74HC04 for anything else, so wiring several gates in
parallel seems a reasonable way to increase current capacity. The PIC can
source/sink at least 20mA, so it's probably fine to drive the segment which
appears at the inverter input, but I'm wondering whether it still might be
preferable to lose the inverter IC and buffer the RA? line with discretes.

BTW, the entire post can be accessed at this URL:

http://forum.microchip.com/m.asp?m=42520&mpage=1

Thanks in advance, for any advice you can offer.

Eric Adamson
Lansing, Michigan


An HC04 will actually source and sink a lot more than 4 mA, certainly
enough to drive a 20 mA led. It sinks a bit better than it sources.

John
 
S

Spehro Pefhany

Jan 1, 1970
0
An HC04 will actually source and sink a lot more than 4 mA, certainly
enough to drive a 20 mA led. It sinks a bit better than it sources.

John

Umm... you are using a single series resistor in the common (anode or
cathode). That means that an "8" will be much dimmer than a "1" unless
you play some software tricks.

Unless your display is internally multiplexed (rare on 2-digit
displays) you can do this with the same number of port pins and no
inverter, you know....

Best regards,
Spehro Pefhany
 
J

John Fields

Jan 1, 1970
0
I'd use one resistor for each pair of segments and drive each anode/cathode
from a different output bit. You don't need the inverter. The PIC outputs
can handle up to 20 mA, IIRC.
 
C

Chris Carlen

Jan 1, 1970
0
I think the whole thing is silly. Why not just put a PNP or NPN on each
common (depending on the type CA/CC), use another port pin or the
inverter to select the digit to display, then run all the segments at
the same time? If you want to use only one port pin to select digits,
fine then use a Tiny logic inverter if you don't want to put a whole hex
inverter package on the PCB.

What is gained by muxing the segments, except a dim display and wasted
processing cycles? Is saving to transistors worth it?


Good day!
 
J

John Fields

Jan 1, 1970
0
John Fields wrote:

I think the whole thing is silly. Why not just put a PNP or NPN on each
common (depending on the type CA/CC), use another port pin or the
inverter to select the digit to display, then run all the segments at
the same time? If you want to use only one port pin to select digits,
fine then use a Tiny logic inverter if you don't want to put a whole hex
inverter package on the PCB.

What is gained by muxing the segments, except a dim display and wasted
processing cycles? Is saving to transistors worth it?
 
B

Ben Bradley

Jan 1, 1970
0
On Fri, 11 Jun 2004 15:31:05 GMT, Spehro Pefhany

{ snip cascade of earlier posts }
Umm... you are using a single series resistor in the common (anode or
cathode). That means that an "8" will be much dimmer than a "1" unless
you play some software tricks.

Not the way the OP is doing it. He said:
It appears to be relatively efficient, and given that only one segment will
be driven at any given instant, my current requirements should remain fairly
low, save perhaps any need to overdrive for brightness compensation.

The "only one segment will be driven at any given instant: part
tells me he will be multiplexing these as 1-of-14, turning on each
"on" LED for 1/14th of the time. Presuming that's what he's doing, it
will 'work' (all segments will light with equal brightness) except the
display will be rather dim (4ma for 1/14th of the time is an average
of 286uA), so he'll need a LOT more current to get good brightness.
ISTR that LED displays can take 20mA per segment, though an AVERAGE of
5mA (not peak, which may be much higher) may give acceptable
brightness (depending on the value of "acceptable").

But in general, you're right, the resistors should be in series
with the segments (and have the 8th, line, the decimal point, wired up
as well - why not), and have the segment pattern for the left digit on
RB while RA7 is high, and put the segment pattern for the right digit
on RB while RA7 is low (with suitable drivers for the two display
common pins).
Unless your display is internally multiplexed (rare on 2-digit
displays) you can do this with the same number of port pins and no
inverter, you know....

Is that using the "unconventional" multiplexing I saw here in SED
in recent months?
 
S

Spehro Pefhany

Jan 1, 1970
0
On Fri, 11 Jun 2004 15:31:05 GMT, Spehro Pefhany

{ snip cascade of earlier posts }


Not the way the OP is doing it. He said:

Agreed. I didn't read it thoroughly.
The "only one segment will be driven at any given instant: part
tells me he will be multiplexing these as 1-of-14, turning on each
"on" LED for 1/14th of the time. Presuming that's what he's doing, it
will 'work' (all segments will light with equal brightness) except the
display will be rather dim (4ma for 1/14th of the time is an average
of 286uA), so he'll need a LOT more current to get good brightness.
ISTR that LED displays can take 20mA per segment, though an AVERAGE of
5mA (not peak, which may be much higher) may give acceptable
brightness (depending on the value of "acceptable").

If he uses a super bright display the results could certainly be
acceptable for two digits, driving 20mA or so total current
(1.4mA/segment average). And the current consumption will be low. If
it's a crap display, the results will be underwhelming.
But in general, you're right, the resistors should be in series
with the segments (and have the 8th, line, the decimal point, wired up
as well - why not), and have the segment pattern for the left digit on
RB while RA7 is high, and put the segment pattern for the right digit
on RB while RA7 is low (with suitable drivers for the two display
common pins).

If he needs it, this method will yield about an order of magnitude
higher average current without requiring segment drivers- still very
low cost.
Is that using the "unconventional" multiplexing I saw here in SED
in recent months?

Yes, a subset of the general method.

Best regards,
Spehro Pefhany
 
G

glen herrmannsfeldt

Jan 1, 1970
0
Eric said:
I'm developing a multiplexed two-digit hex display using 7-segment displays.
Multiplexing and BCD-hex encoding are being handled by a PIC. Diagram can
(hopefully) be seen at:

http://forum.microchip.com/upfiles/23628/Rp42593.png

My question relates to the inverter which is used to select the digit to be
driven, and how it should be implemented.

You don't say what you are driving, but I question the need
for multiplexing two digits.

If the current is low enough to direct drive, I suppose so,
though remember that the current will be at least twice the
average.

My favorite for driving seven segment is the 7447 (or 74247)
which can, I believe, drive 24ma at 15 volts.

Otherwise, the most important part of driving multiplexed LEDs
is to make sure that the drive current stops if the oscillator stops.

If, for example, you depend on the PIC to drive the outputs,
make sure that they will turn off if the clock stops.

-- glen
 
E

Eric Adamson

Jan 1, 1970
0
Thanks to everyone, for their helpful comments. For those who wonder why
I'm taking such a "silly" approach, let it suffice to say that this is
largely an educational exercise (self-assigned, not homework!), and I find
that adding one or two artificial design constraints forces me to reach for
more design concepts, something that I believe will serve me well, when I
find myself tackling a truly complex project.

My approach to the LED's was primarily an effort to reduce parts count. The
LED display that I'm using is high efficiency -- it runs 16mcd@10mA -- so
brightness shouldn't be a problem. I'm not connecting the decimal points,
as someone suggested, because this display merely tracks hex data entered
using a 16-key keypad. (Those who wonder why I intentionally "beat my head
against the wall" may be relieved to know that I'm using an MM74C922 keypad
encoder, a relatively expensive, but nifty little chip.)

As for the suggestion that I use two I/O pins to independently drive the LED
commons, rather than using an inverter as planned, I'm effectively out of
I/O pins. (This circuit started out using a 16F872, which I decided was
"too roomy", and switched to a 16F648A.) I could probably multiplex an I/O
pin, somewhere, but I'll save that for my next project!

Someone suggested that I look at a 7447 or 74247. These work fine for
driving ordinary 7-segment displays (I prefer the CD4511 -- mainly for the
built-in latch). Unfortunately, I need a *hex* display, and none of these
handle A-F! In fact, I was so disappointed with the lack of affordable hex
displays and/or drivers, that I decided this might make for a good PIC
project.

For those interested, the final circuit will be used as a utility module for
digital experimentation, generating byte-wide data more efficiently than
could be done using data switches. It will consist of a hex keypad, driving
a MM74C922, which feeds 4-bit binary (not BCD, as I originally wrote) data
to a PIC. The PIC will run in an infinite display loop, performing hex
encoding for the 7-segment LED displays, and shifting nybble-wide keypad
data into a byte-wide FIFO buffer. The data byte will be presented for
consumption by other circuits, using a 74HC595 SIPO shift register. I poll
for keypresses during the 7-segment multiplex delay interval, rather than
burning up cycles with NOP's.

Thanks again, to everyone, for their interest, and their suggestions.
Please feel free to add any others you may have.

Regards,

Eric Adamson
Lansing, Michigan
 
T

Tim Shoppa

Jan 1, 1970
0
Eric Adamson said:
As for the suggestion that I use two I/O pins to independently drive the LED
commons, rather than using an inverter as planned, I'm effectively out of
I/O pins.
...
The data byte will be presented for
consumption by other circuits, using a 74HC595 SIPO shift register.

Do not neglect the HC595 (or its bigger brothers, like the TPIC6C596)
as display drivers, especially when you are short on I/O pins.

With only a small amount of effort you can put a SMD HC595 or 6C596
under a 0.56" display digit along with the current limiting resistors.

Sprague (or whatever they're called now, Allegro Micro?) make some nice
SIPO drivers with built-in current regulation. Then there's the venerable
Micrel MM5450/MM5451, which is widely available and has on-chip current
regulation, even if it's no longer the epitome of dense packaging or
high current-handling.

Tim.
 
Top