0% found this document useful (0 votes)
197 views

Drive of 8-Digit 7-Segment Display

1) The document describes a circuit design that allows an 8-digit LED display and up to 8 buttons to connect to a microcontroller using only 9 I/O pins. It does this through a technique called "multiplexing" which rapidly switches between the pins in a sequence. 2) A key challenge is avoiding "ghosting" effects where unintended LED segments briefly light up due to timing issues. The design addresses this with diodes and resistor networks that isolate the segments when not in use. 3) Experimental findings on leakage currents help determine resistor values that maintain isolation without excessively limiting current to the LEDs when active. Tests confirm the design successfully eliminates ghosting even when buttons are pressed.

Uploaded by

abba123
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
197 views

Drive of 8-Digit 7-Segment Display

1) The document describes a circuit design that allows an 8-digit LED display and up to 8 buttons to connect to a microcontroller using only 9 I/O pins. It does this through a technique called "multiplexing" which rapidly switches between the pins in a sequence. 2) A key challenge is avoiding "ghosting" effects where unintended LED segments briefly light up due to timing issues. The design addresses this with diodes and resistor networks that isolate the segments when not in use. 3) Experimental findings on leakage currents help determine resistor values that maintain isolation without excessively limiting current to the LEDs when active. Tests confirm the design successfully eliminates ghosting even when buttons are pressed.

Uploaded by

abba123
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

designideas

EditEd By Martin rowE


and Fran GranvillE

readerS SOLVe deSIGN PrOBLeMS

increase efficiency DIs Inside


in embedded digital-i/o lines 57 Modulating a reference
allows maximum-value search
vasile Surducan and Emanoil Surducan, national institute
for phase detection
for r&d of isotopic and Molecular technologies, Cluj-napoca, romania


58 offline supply drives lEds
Digital-I/O-multiplexing tech- programmable device with LED-driving
niques, such as “Charlieplexing” capabilities, such as small PIC (www. 59 light an lEd
or “Gugaplexing,” let an eight-digit, microchip.com) or Atmel (www.atmel. without wasting energy
seven-segment LED display connect to com) microcontrollers. ▶to see all of EDN’s design
nine I/O pins of a microcontroller (ref- In Figure 1, R8 is a segment cur- ideas, visit www.edn.com/
erences 1 and 2). These methods use rent-limiting network resistor for the designideas.
lower-duty-cycle timing, which requires IC1 common-anode LED display and
a driver between the microcontroller’s the IC 2 common-cathode LED dis-
I/O lines and the display to achieve play. Any combination of standard “Ghosting,” or faint illumination, is the
good visibility. The circuit in Figure 1 and superbright displays for this IC1/ partial illumination of the segments,
uses an 8+N/2 I/O bus for interfacing an IC2 pair is acceptable with proper duty- which should be in an off state, as a
N-digit display and as many as eight cycle timing adjustment in firmware. result of switching glitches or unsuitable
buttons on the same bus. This method The R7 network and D1 to D8 switch- voltage levels on the driving pins when
needs no driver. You can apply it to any ing diodes act as antighosting devices. those pins are in a high-impedance

AK4
AK3
AK2
AK1
D2 D4 D6 D8

D1 D3 D5 D7 1N4148

16 15 14 13 12 11 10 9
R7
330 A1 A2 A3 A4 K1 K2 K3 K4
1 2 3 4 5 6 7 8
A 1 16 A A IC2 CC56-12SRWA
B 2 15 B IC1 CA56-12HWA B
C 3 14 C C
D 4 13 D D
E 5 12 E E
F 6 11 F F

1 2 3 4 5 6 7 8
G 7 10 G G
DP 8 9 DP DP
R8
220 R3 S3 1
A 2
5V
R2 S 1 2 R4
B 2
4.7k
R1 S1 1 2
C
180
R5
10k Q1
NPN
R6
3.9k

Figure 1 Common-anode and common-cathode lEd displays and buttons can connect to the same bus.

54 EDN | APRIL 21, 2011


designideas
state. Ghosting results from using all
Figure 2 Without
the microcontroller’s I/O: output-high,
R7, ghosting is
output-low, and high-impedance logic
visible (left). With
levels, switching between them in an
R7, the display
infinite-loop sequence (Table 1).
is clean (right),
The following equation calculates the
even when you
value of R7: R7=(VSAFE−0.6V)/10IGHOST,
push buttons S1
where 0.6V is the voltage drop of diodes
through S3.
D1 through D8 at 25°C, IGHOST is the
threshold value of the static-leakage
current for which the ghosting effect compensating the VGHOST dispersion of rent. Note that the weak pullup of the
is visible but minimal, and VSAFE is the displays. In this example, VSAFE is 0.7V A, B, and C microcontroller inputs is
voltage potential value that may appear for a superbright LED display and 1V on during the button-reading sequence.
on any segment when the segment is for a standard display. If you combine You can download the firmware source
not illuminated. normal and superbright display types, for the PIC16F886 driving the display
You can experimentally find IGHOST choose the smallest VSAFE for the com- in Figure 1 from http://bit.ly/e1cwCu.
at an ambient-light level of less than puted value of R7. Adding R7 and D1 through D8 eliminates
10 lux by injecting a small current into Reading electrode buttons is an ghosting (Figure 2). EDN
a separately powered digit segment and asynchronous procedure, unlike digital
observing the current value and segment multiplexing; thus, any combination RefeRences
voltage drop at the moment when the of button presses must not turn on any 1 Sangalli, Luke, “Charlieplexing at

segment begins to light up. For a super- segment of IC1’s or IC2’s digit group. R1, high duty cycle,” EDN, June 25, 2009,
bright display, IGHOST should be approxi- R2, and R3 limit the current through IC1 pg 44, http://bit.ly/ehxi3w.
mately 70 μA. The IGHOST current cre- segments below IGHOST when Q1 is on 2 Gupta, Saurabh, and Dhananjay V

ates an unwanted voltage drop on the and AK1 is at an output-high level. R4, Gadre, “Multiplexing technique yields a
segment LED, VGHOST: VGHOST=1.54V R5, and R6 polarize Q1; R6 keeps Q1 off reduced-pin-count LED display,” EDN,
and VSAFE≤kVGHOST, where k, a factor even when AK1 is in a high-impedance Oct 16, 2008, pg 58, http://bit.ly/
of confidence, ranges from 0.5 to 0.7, state; and R4 limits the Q1 collector cur- fJhrE8.

TabLE 1 Switching Sequence for LeD DiSpLayS


Segments
Common electrode buttons
Display Read bus
Sequence on digit buttons AK1 AK2 AK3 AK4 A, B, … DP

High High High High Output


1 IC1-1 X
impedance impedance impedance impedance low=data

High High High Output


2 IC1-2 X High
impedance impedance impedance low=data

High High High Output


3 IC1-3 X High
impedance impedance impedance low=data

High High High Output


4 IC1-4 X High
impedance impedance impedance low=data

5 X Yes High X X X Input

High High High Output


6 IC2-5 X Low
impedance impedance impedance high=! data

High High High Output


7 IC2-6 X Low
impedance impedance impedance high=! data

High High High Output


8 IC2-7 X Low
impedance impedance impedance high=! data

High High High Output


9 IC2-8 X Low
impedance impedance impedance high=! data

56 EDN | APRIL 21, 2011

You might also like