BCD to Seven Segment Decoder: The 7447 and Common Anode Displays
Learn how a 7447 drives a common anode seven segment display: BCD input, active low outputs, segment patterns, resistors, the lamp test and ripple blanking.
BCD and the seven segment display
Binary coded decimal, BCD, writes each decimal digit as its own 4 bit binary number: 0 is 0000 and 9 is 1001. The codes 1010 to 1111 are not used. BCD is easy to convert to and from decimal digits, which is why counters, clocks and meters use it.
A seven segment display shows a digit with seven LED bars named a to g. The letter a is the top bar. The others follow clockwise: b upper right, c lower right, d bottom, e lower left, f upper left. The bar g is in the middle. Lighting the right set of bars draws each digit.
What the 7447 does
The 7447 is a decoder that turns a BCD input on pins A, B, C and D into the seven segment outputs a to g. D is the most significant bit. The chip has a 5 V supply on pin 16 and ground on pin 8.
Its outputs are active low and open collector. An output goes low, which means it sinks current, to light a segment, and it is off when high. This suits a common anode display, in which all the anodes of the segments are joined to the positive supply. Each segment cathode is connected to the matching 7447 output through a resistor.
Segments for each digit
| Digit | BCD (DCBA) | Segments lit |
|---|---|---|
| 0 | 0000 | a b c d e f |
| 1 | 0001 | b c |
| 2 | 0010 | a b d e g |
| 3 | 0011 | a b c d g |
| 4 | 0100 | b c f g |
| 5 | 0101 | a c d f g |
| 6 | 0110 | c d e f g |
| 7 | 0111 | a b c |
| 8 | 1000 | a b c d e f g |
| 9 | 1001 | a b c f g |
The 7447 draws 6 without the top bar and 9 without the bottom bar. This is how this chip works, and it is not a fault. For codes 1010 to 1111 the chip shows odd symbols, which tell you the input is not a valid BCD digit.
The resistors
Each segment is an LED, and it needs a resistor to set its current. A typical segment current is 10 mA. With a 5 V supply, an LED drop of about 2 V and the chip output low at about 0.3 V, the resistor is:
R = (5 V − 2 V − 0.3 V) / 10 mA = 270 Ω (use 330 Ω for about 8 mA)
You need seven resistors, one for each segment. A single resistor at the common anode would make the brightness change with the number of lit segments. If you leave the resistors out, an LED burns out or the chip is overloaded.
The control pins
- LT, the lamp test, is active low. When it is low, every segment lights. Use it to check the display and the wiring. Keep it high in normal use.
- RBI, ripple blanking input, is active low. When it is low and the input is 0000, the display is blank. This hides leading zeros.
- BI/RBO is a combined blanking input and ripple blanking output. Pulling it low blanks the display. When used as an output it goes low when a zero is blanked, so you can chain it to the RBI of the next digit.
In a multi digit display, connect RBO of the left digit to RBI of the digit on its right. A number like 0072 then shows as 72, and the last digit always shows, because its RBI is kept high.
Common anode and common cathode
A common cathode display has all the cathodes joined to ground. It needs a decoder with active high outputs, such as the 7448. A 7447 on a common cathode display does not work: the LEDs stay off or glow weakly. Check the display type first. The data sheet of the display shows the common pin.
Testing
Wire the four inputs to switches and set them through 0000 to 1001. Watch each digit. If a segment is always off, check that its resistor and output wire are in place. If a segment is always on, check for a short or a swapped wire. If the digits look wrong in a regular pattern, A and D may be swapped.
Try it in the virtual lab
SinBench has free 3D benches and interactive demos for this topic. Open one to try the ideas above with real instruments, no sign up needed.
Questions and answers
Why does the 7447 need a common anode display?
Its outputs are active low and sink current, so each LED cathode is pulled to ground by the chip. The anodes must therefore be joined to the positive supply.
What does the lamp test pin do?
When it is held low, every segment turns on. It is used to check the display and the wiring.
Do I need resistors with a 7447?
Yes. Each segment needs its own resistor, about 270 to 330 ohms for a 5 V supply, to limit the LED current.
What does the 7447 show for codes above 9?
It shows odd, unreadable symbols, since those inputs are not valid BCD digits.
Related topics
Gray Code, Excess-3 and 2421 Code Converters
Convert between binary, Gray, excess-3 and 2421 codes. Learn the XOR rules, a 74283 excess-3 converter, self complementing codes and 9's complement.
Digital Logic DesignKarnaugh Maps: Simplify Boolean Functions Step by Step
A step by step guide to Karnaugh maps: how to fill a 4 variable map, group cells, use don't cares and write the simplest sum of products, with a worked example.
Digital Logic Design3-to-8 Line Decoder: How the 74138 Works
Learn how a 3 to 8 line decoder works, the 74138 enable pins and active low outputs, how to build any function from minterms, and expand to 4 to 16 lines.