Seven Segment Display-All You Need To Know

Seven Segment Display
Seven Segment Display, with decimal point

A seven-segment display (SSD), or seven-segment indicator, is a form of electronic display device used for displaying numbers.
Seven Segment Display Labelled
Seven Segment Display Labelled
The segments of a 7-segment display are referred to by the letters A to G, which are used to display any number between 0-9, where the optional DP decimal point (an "8th segment") is used for the display of non-integer numbers.

There can be 128 possible states of this 7 segment display, if the decimal point is not used.
128 states of Seven Segment Diaplay
128 states of Seven Segment Diaplay
In a simple Seven Segment package, typically all of the cathodes (negative terminals) or all of the anodes (positive terminals) of the segment LEDs are connected and brought out to a common point; this is referred to as a "common cathode" or "common anode" device. Hence a 7 segment plus decimal point package will only require nine pins. But it may vary in other commercial products, that are made as per consumer specifications.

Equivalent Circuit Of seven Segment Display When connected to a power Source:
Equivalent Circuit Of seven Segment Display When connected to a power Source
Equivalent Circuit Of seven Segment Display When connected to a power Source
To  common Anode pin we connect the resistor of 470 Ohms & this resistor to the power supply +5V. This amount of voltage is sufficient to drive your seven segment display.

NOTE: In order to avoid burnout of your SSD, you should connect the power / voltage source with the current limiting resistor, which will ensure that the current is not exceeding 15mA(Max. allowable current through it)[refer data sheet for accurate knowledge of Max. allowable current for your SSD, as its materiel dependent]


Hexadecimal Codes Using Seven Segment Diaplay:
Through a Micro-controller output, a single byte can encode the full state of a 7-segment-display. The most popular bit encoding are "gfedcba" and "abcdefg", where each letter represents a particular segment in the display. Example, in the "gfedcba" representation, a byte value of 0x06 would (in a common-anode circuit) turn on segments 'c' and 'b', which would display a '1'.

Different Hexadecimal Codes, Using Seven Segment display

Hexadecimal encodings for displaying the digits 0 to F
Digit gfedcba abcdefg a b c d e f g
0 0×3F 0×7E on on on on on on off
1 0×06 0×30 off on on off off off off
2 0×5B 0×6D on on off on on off on
3 0×4F 0×79 on on on on off off on
4 0×66 0×33 off on on off off on on
5 0×6D 0×5B on off on on off on on
6 0×7D 0×5F on off on on on on on
7 0×07 0×70 on on on off off off off
8 0×7F 0×7F on on on on on on on
9 0×6F 0×7B on on on on off on on
A 0×77 0×77 on on on off on on on
b 0×7C 0×1F off off on on on on on
C 0×39 0×4E on off off on on on off
d 0×5E 0×3D off on on on on off on
E 0×79 0×4F on off off on on on on
F 0×71 0×47 on off off off on on on


One Mode Equivalent Circuit Of a Seven Segment Display
One Mode Equivalent Circuit Of a Seven Segment Display, Common Anode & Common Cathode

BCD to 7-Segment Decoder c/w 4-bit Latch

Connection & Pin Configuration Of A Seven Segment Display & IC 4511

Once 7-Segment LED displays became readily available, a simple IC known as a "BCD to 7-Segment decoder" was quickly developed to simplify their use... Binary formatted data presented to this IC's inputs results in the IC's outputs being placed into the correct state to display the equivalent numeral (0 to 9) on a 7-Segment display...

Although BCD to 7-Segment decoder ICs are available without built in latches, this particular IC includes a built in 4-bit latch which we will make use of in later examples... For now the latch is set to simply allow input data to freely pass through to the decoder...



In the above diagram, the 4 toggle switches, SW0 to SW3 are used to select the desired numeral (0-9) that will appear on the 7-Segment display... By using a decoder, it's simply a matter of setting the correct 4-bit BCD pattern feeding the inputs of the decoder, and the decoder takes care of the rest...


BCD Input Data
 SW3  SW2   SW1  SW0   Numeral Displayed 
00000
00011
00102
00113
01004
01015
01106
01117
10008
10019
 
The decoder section also has two additional inputs... Lamp Test (LT) turns all segments on so you can verify at once that all display segments are working.
The Blanking (BL) input is just the reverse; it forces the entire display off... This is used in many cases to blank out leading or trailing zeros from a long display... LT will override BL so you can test even blanked-out display digits.

Interfacing SSD(Seven Segment Display) With A Microcontroller (General):

SSD, Connection With A MCU Port
SSD, Connection With A MCU Port
 
Use The Below Data, to Write in Your MCU Port & Directly Generate The Required Hex Value on SSD

Hexadecimal encodings for displaying the digits 0 to F
Digit gfedcba abcdefg a b c d e f g
0 0×3F 0×7E on on on on on on off
1 0×06 0×30 off on on off off off off
2 0×5B 0×6D on on off on on off on
3 0×4F 0×79 on on on on off off on
4 0×66 0×33 off on on off off on on
5 0×6D 0×5B on off on on off on on
6 0×7D 0×5F on off on on on on on
7 0×07 0×70 on on on off off off off
8 0×7F 0×7F on on on on on on on
9 0×6F 0×7B on on on on off on on
A 0×77 0×77 on on on off on on on
b 0×7C 0×1F off off on on on on on
C 0×39 0×4E on off off on on on off
d 0×5E 0×3D off on on on on off on
E 0×79 0×4F on off off on on on on
F 0×71 0×47 on off off off on on on