Complex Engineering Problem Modern Electronics: Submitted To Sir Salman Ahmad Submitted by
Complex Engineering Problem Modern Electronics: Submitted To Sir Salman Ahmad Submitted by
Complex Engineering Problem Modern Electronics: Submitted To Sir Salman Ahmad Submitted by
Modern Electronics
Submitted To
SIR SALMAN AHMAD
Submitted By
Ismail Shahid UW-18-ME-BSc-050
Department of Mechanical
Engineering
Wah Engineering College (WEC)
BCD to 7-Segment Display Decoder
A Digital Decoder IC, is a device which converts one digital format into another and one of the most
commonly used device for doing this is called the Binary Coded Decimal (BCD) to 7-Segment Display
Decoder. 7-segment LED (Light Emitting Diode) or LCD (Liquid Crystal Display) type displays,
provide a very convenient way of displaying information or digital data in the form of numbers, letters
or even alpha-numerical characters.
Typically 7-segment displays consist of seven individual coloured LED's (called the segments), within
one single display package. In order to produce the required numbers or HEX characters
from 0 to 9and A to F respectively, on the display the correct combination of LED segments need to be
illuminated and BCD to 7-segment Display Decoders such as the 74LS47 do just that.
A standard 7-segment LED display generally has 8 input connections, one for each LED segment and
one that acts as a common terminal or connection for all the internal display segments. Some single
displays have also have an additional input pin to display a decimal point in their lower right or left hand
corner.
The display is only sensible if the binary number is between DCBA=0000 (0) and DCBA=1001 (9); this
is called Binary Coded Decimal or BCD for short. If the number is larger than 9 you get a strange output
on the display. Try this out by moving your mouse over the truth table.
Simple use :
1. Connect Vcc [pin 16], [pin 3], / [pin 4] and [pin 5] to 5v.
2. Connect Gnd [pin 8] to 0v.
3. connect DCBA [pins 1, 2, 6 and 7] to DCBA on your counter.
4. Connect [pins 9-15] to abcdefg on the common anode 7-segment display.
Inputs Outputs
DCBA / Display
0 0 0 0 1 1 1 0000001
0 0 0 1 1 1 1 1001111
0 0 1 0 1 1 1 0010010
0 0 1 1 1 1 1 0000110
0 1 0 0 1 1 1 1001100
0 1 0 1 1 1 1 0100100
0 1 1 0 1 1 1 1100000
0 1 1 1 1 1 1 0001111
1 0 0 0 1 1 1 0000000
1 0 0 1 1 1 1 0001100
1 0 1 0 1 1 1 1110010
1 0 1 1 1 1 1 1100110
1 1 0 0 1 1 1 1011100
1 1 0 1 1 1 1 0110100
1 1 1 0 1 1 1 1110000
1 1 1 1 1 1 1 1111111
The actual colour of the visible light emitted by an LED, ranging from blue to red to orange, is decided
by the spectral wavelength of the emitted light which itself is dependent upon the mixture of the various
impurities added to the semiconductor materials used to produce it.
7-segment Display
Light Emitting Diodes have many advantages over traditional bulbs and lamps, with the main ones being
their small size, long life, various colours, cheapness and are readily available, as well as being easy to
interface with various other electronic components and digital circuits.
But the main advantage of light emitting diodes is that because of their small die size, several of them
can be connected together within one small and compact package producing what is generally called a 7-
segment Display.
The 7-segment display, also written as “seven segment display”, consists of seven LEDs (hence its
name) arranged in a rectangular fashion as shown. Each of the seven LEDs is called a segment because
when illuminated the segment forms part of a numerical digit (both Decimal and Hex) to be displayed.
An additional 8th LED is sometimes used within the same package thus allowing the indication of a
decimal point, (DP) when two or more 7-segment displays are connected together to display numbers
greater than ten.
Each one of the seven LEDs in the display is given a positional segment with one of its connection pins
being brought straight out of the rectangular plastic package. These individually LED pins are labelled
from a through to g representing each individual LED. The other LED pins are connected together and
wired to form a common pin.
So by forward biasing the appropriate pins of the LED segments in a particular order, some segments
will be light and others will be dark allowing the desired character pattern of the number to be generated
on the display. This then allows us to display each of the ten decimal digits 0 through to 9 on the same
7-segment display.
In electronics there are two important types of 7-segment LED digital display.
1. The Common Cathode Display (CCD) – In the common cathode display, all the cathode connections
of the LED's are joined together to logic "0" or ground. The individual segments are illuminated by
application of a "HIGH", logic "1" signal to the individual Anode terminals.
2. The Common Anode Display (CAD) – In the common anode display, all the anode connections of the
LED's are joined together to logic "1" and the individual segments are illuminated by connecting the
individual Cathode terminals to a "LOW", logic "0" signal.
Electrical connection of the individual diodes for a common cathode display and a common anode
display and by illuminating each light emitting diode individually, they can be made to display a variety
of numbers or characters.
The displays common pin is generally used to identify which type of 7-segment display it is. As each
LED has two connecting pins, one called the “Anode” and the other called the “Cathode”, there are
therefore two types of LED 7-segment display called: Common Cathode (CC) and Common Anode
(CA).
The difference between the two displays, as their name suggests, is that the common cathode has all the
cathodes of the 7-segments connected directly together and the common anode has all the anodes of the
7-segments connected together and is illuminated as follows.
1. The Common Cathode (CC) – In the common cathode display, all the cathode connections of the
LED segments are joined together to logic “0” or ground. The individual segments are illuminated by
application of a “HIGH”, or logic “1” signal via a current limiting resistor to forward bias the individual
Anode terminals (a-g).
Common Cathode 7-segment Display
2. The Common Anode (CA) – In the common anode display, all the anode connections of the LED
segments are joined together to logic “1”. The individual segments are illuminated by applying a
ground, logic “0” or “LOW” signal via a suitable current limiting resistor to the Cathode of the
particular segment (a-g).
In general, common anode displays are more popular as many logic circuits can sink more current than
they can source. Also note that a common cathode display is not a direct replacement in a circuit for a
common anode display and vice versa, as it is the same as connecting the LEDs in reverse, and hence
light emission will not take place.
7-Segment Display Format :
Depending upon the decimal digit to be displayed, the particular set of LEDs is forward biased. For
instance, to display the numerical digit 0, we will need to light up six of the LED segments
corresponding to a, b, c, d, e and f. Then the various digits from 0 through 9 can be displayed using a 7-
segment display as shown.
It can be seen that to display any single digit number from to 9 or letter from A to F, we would need 7
separate segment connections plus one additional connection for the LED's "common" connection. Also
as the segments are basically a standard light emitting diode, the driving circuit would need to produce
up to 20mA of current to illuminate each individual segment and to display the number 8, all 7 segments
would need to be lit resulting a total current of nearly 140mA, (8 x 20mA).
Obviously, the use of so many connections and power consumption is impractical for some electronic or
microprocessor based circuits and so in order to reduce the number of signal lines required to drive just
one single display, display decoders such as the BCD to 7-Segment Display Decoder and Driver IC's are
used instead.
Then for a 7-segment display, we can produce a truth table giving the individual segments that need to
be illuminated in order to produce the required decimal digit from 0 through 9 as shown below.
7-segment Display Truth Table :
0 × × × × × ×
1 × ×
2 × × × × ×
3 × × × × ×
4 × × × ×
5 × × × × ×
6 × × × × × ×
7 × × ×
8 × × × × × × ×
9 × × × × ×
0 0 0 0 0 0 8 1 0 0 0 8
1 0 0 0 1 1 9 1 0 0 1 9
2 0 0 1 0 2 10 1 0 1 0 Invalid
3 0 0 1 1 3 11 1 0 1 1 Invalid
4 0 1 0 0 4 12 1 1 0 0 Invalid
5 0 1 0 1 5 13 1 1 0 1 Invalid
6 0 1 1 0 6 14 1 1 1 0 Invalid
7 0 1 1 1 7 15 1 1 1 1 Invalid
An example of the 4-bit BCD input ( 0100 ) representing the number 4 is given below.
Example No1
In practice current limiting resistors of about 150Ω to 220Ω would be connected in series between the
decoder/driver chip and each LED display segment to limit the maximum current flow. Different display
decoders or drivers are available for the different types of display available, e.g. 74LS48 for common-
cathode LED types, 74LS47 for common-anode LED types, or the CMOS CD4543 for liquid crystal
display (LCD) types.
Liquid crystal displays (LCD´s) have one major advantage over similar LED types in that they consume
much less power and nowadays, both LCD and LED displays are combined together to form larger Dot-
Matrix Alphanumeric type displays which can show letters and characters as well as numbers in
standard Red or Tri-colour outputs.