You are on page 1of 11

Complex Engineering Problem

Modern Electronics
Submitted To
SIR SALMAN AHMAD
Submitted By
Ismail Shahid UW-18-ME-BSc-050

Hassan Asif UW-18-ME-BSc-056

Saad Ali Khan UW-18-ME-BSc-059

Mamoon Ahmad Khilji UW-18-ME-BSc-060

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.

Seven segment decoder / driver:


Seven segment decoder / driver is a digital circuit that can decode a digital input to the seven segment
format and simultaneously drive a 7 segment LED display using the decoded information. What that will
be displayed on the 7 segment display is the numerical equivalent of the input data. For example a BCD
to seven segment decoder driver can decode a 4 line BCD ( binary coded decimal) to 8 line seven
segment format and can drive the display using this information. For example, if the input BCD code is
0001, the display output will be 1 , for 0010 the display output will be 2 and so on. The circuit diagram
shown below is of a BCD to seven segment decoder / driver using 7446 IC.

7446 seven segment decoder driver


7446 is a BCD to 7 segment display driver IC with active low outputs. The IC is stand alone and
requires no external components other than the LED current limiting resistors. All output of the IC have
complete ripple blanking and requires no external driver transistors. There is also a built in lamp test
function which can be used to test the LED segments. Pin 5 of the IC is the ripple blanking input (RBI)
and pin 4 is the ripple blanking output (RBO). Pin 3 is the lamp test (LT) input pin. When the RBI and
RBO pins are held high and the lamp test (LT) input pin 3 is held low all LED segment output goes
high. The display used here must be a common anode type because the IC has active low outputs.

Using the 74xx47 BCD to Seven-segment display :


The 74xx47 chip is used to drive 7 segment display. You must use the 74xx47 with a common anode 7-
segment display (e.g. Kingbright part number SA03). The input to the 74xx47 is a binary number
DCBA where D is 8s, C is 4s, B is 2s and A is 1s. The inputs DCBA often come from a binary counter.

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.

The inputs / , and are usually connected to 5v

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 7-segment Display :


An LED or Light Emitting Diode, is a solid state optical PN-junction diode which emits light energy in
the form of “photons” when it is forward biased by a voltage allowing current to flow across its junction,
and in Electronics we call this process electroluminescence.

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.

Common Cathode and Common Anode Format :

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).

Common Anode 7-segment Display

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 :

So in order to display the number 3 for example, segments a, b, c, d and g would need to be illuminated.


If we wanted to display a different number or letter then a different set of segments would need to be
illuminated. Then for a 7-segment display, we can produce a truth table giving the segments that need to
be illuminated in order to produce the required character.

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.

7-Segment Display Segments for all Numbers.

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 :

Individual Segments Illuminated


Decimal
Digit
a b c d e f g

0 × × × × × ×

1 × ×

2 × × × × ×

3 × × × × ×

4 × × × ×

5 × × × × ×

6 × × × × × ×

7 × × ×

8 × × × × × × ×

9 × × × × ×

Binary Coded Decimal :


Binary Coded Decimal (BCD or "8421" BCD) numbers are made up using just 4 data bits (a nibble or
half a byte) similar to the Hexadecimal numbers we saw in the binary tutorial, but unlike hexadecimal
numbers that range in full from 0 through to F, BCD numbers only range from 0 to 9, with the binary
number patterns of 1010 through to 1111 (A to F) being invalid inputs for this type of display and so are
not used as shown below.
Binary Pattern BCD Binary Pattern BCD
Decimal Decimal
8 4 2 1 8 4 2 1

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

BCD to 7-Segment Display Decoders :


A binary coded decimal (BCD) to 7-segment display decoder such as the TTL 74LS47 or 74LS48, have
4 BCD inputs and 7 output lines, one for each LED segment. This allows a smaller 4-bit binary number
(half a byte) to be used to display all the denary numbers from 0 to 9 and by adding two displays
together, a full range of numbers from 00 to 99 can be displayed with just a single byte of 8 data bits.

BCD to 7-Segment Decoder


The use of packed BCD allows two BCD digits to be stored within a single byte (8-bits) of data,
allowing a single data byte to hold a BCD number in the range of 00 to 99.

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.

You might also like