A seven-segment display (SSD) is a widely used electronic display device for displaying decimal numbers from 0 to 9. They are most commonly used in electronic devices like digital clocks, timers and calculators to display numeric information. As its name indicates, it is made of seven different illuminating segments which are arranged in such a way that it can form the numbers from 0-9 by displaying different combinations of segments. It is also able to form some alphabets like A, B, C, H, F, E, etc.
7 segment displays are among the simplest display units to display the numbers and characters. As shown in the above image of a 7-segment display, it consists of 8 LEDs, each LED used to illuminate one segment of unit and the 8thLED used to illuminate DOT in 7 segment display. We can refer each segment as a LINE, as we can see there are 7 lines in the unit, which are used to display a number/character. We can refer each segment "a,b,c,d,e,f,g" and for dot character we will use "h". There are 10 pins, in which 8 pins are used to refer a,b,c,d,e,f,g and h/dp, the two middle pins are common anode/cathode of all he LEDs. These common anode/cathode are internally shorted so we need to connect only one COM pin.
7 Segment Display Pinout
There are two types of 7 segment displays: Common Anode and Common Cathode:
Common Cathode: In this all the Negative terminals (cathode) of all the 8 LEDs are connected together (see diagram below), named as COM. And all the positive terminals are left alone.
Common Anode: In this all the positive terminals (Anodes) of all the 8 LEDs are connected together, named as COM. And all the negative thermals are left alone.
How to Display Numbers on 7 Segment Display?
If we want to display the number “0”, then we need to glow all the LEDs except LED which belongs to line “g” (see 7 segment pin diagram above, so we need a bit pattern 11000000. Similarly to display “1”we need to glow LEDs associated with b and c, so the bit pattern for this would be 11111001. A table has been given below for all the numbers while using Common Anode type 7 segment display unit.
Digit to Display
h g f e d c b a
To learn more about 7 segment display units, read below tutorials which explains the practical applications to use 7 segment displays:
Interfacing 7 segment display with 8051 microcontroller
0-99 counter with AVR mircontroller
Digital Dice using Arduino
A seven-segment display is commonly used in electronic display device for decimal numbers from 0 to 9 and in some cases, basic characters. Use of light emitting diodes (LEDs) in seven segment displays made it more popular, whereas of late liquid crystal displays (LCD) displays have also come into use. Electronic devices like microwave ovens, calculators, washing machines, radios, digital clocks etc. to display numeric information are the most common applications. Let’s take a look at the 7 segment display pinout to have a better understanding.
7 segment display pinout
A 7 segment display is made of seven different illuminating segments. These are arranged in a way to form numbers and characters by displaying different combinations of segments. The binary information is displayed using these seven segments. LED or light emitting diode is P-N junction diode which emits the energy in the form of light, differ from normal P-N junction diode which emits in the form of heat. Whereas LCD use properties of liquid crystal for displaying and do not emit the light directly. These LED’s or LCD’s are used to display the required numeral or alphabet.
Types of 7 segments
There are basically 2 types of 7 segment LED display.
Common Anode: All the Negative terminals (cathode) of all the 8 LEDs are connected together. All the positive terminals are left alone.
Common Cathode: All the positive terminals (anode) of all the 8 LEDs are connected together. All the negative thermals are left alone.
Working on 7 segments
Seven segment devices are generally made up of LEDs. These LEDs will glow when they are forward biased. Intensity of the LEDs depends on forward current. So, sufficient forward current has to be provided to these LEDs to glow with full intensity. This is provided by the driver and is applied to the seven segments.
|Number||g f e d c b a||Hex code|
Table: Display numbers on a seven segment display in common anode configuration
Things change for common cathode configuration.
|Number||g f e d c b a||Hex Code|
Table: Display numbers on a seven segment display in common cathode configuration
A sample interfacing of the 7 segment display to Arduino uno is provided for reference.
You can find some sample projects to work on involving 7 segment display here.