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
[Click the image to enlarge it]
7 Segment Display Pin Configuration
Controls the left bottom LED of the 7-segment display
Controls the bottom most LED of the 7-segment display
Connected to Ground/Vcc based on type of display
Controls the right bottom LED of the 7-segment display
Controls the decimal point LED of the 7-segment display
Controls the top right LED of the 7-segment display
Controls the top most LED of the 7-segment display
Connected to Ground/Vcc based on type of display
Controls the top left LED of the 7-segment display
Controls the middle LED of the 7-segment display
7-Segment Display Features
- Available in two modes Common Cathode (CC) and Common Anode (CA)
- Available in many different sizes like 9.14mm,14.20mm,20.40mm,38.10mm,57.0mm and 100mm (Commonly used/available size is 14.20mm)
- Available colours: White, Blue, Red, Yellow and Green (Res is commonly used)
- Low current operation
- Better, brighter and larger display than conventional LCD displays.
- Current consumption : 30mA / segment
- Peak current : 70mA
Note: The above current rating is for 14.20mm Red colour 7-segment display. More details can be found at the datasheet given at the end of this page
Equivalent Display Modules
Dot Matrix LED Display, 16×2 LCD Displays, OLED Display, TFT LCD Screen Display
7-segment Display Brief Intro
The seven segments displays are the oldest yet one of the efficient types of display used in embedded applications. This display has nothing more than 8 LED inside it. These 8 LEDs are separated into each segments which can be named as a,b,c,d,e,f,g,DP as shown in the picture above. These entire 8 segment LEDs have one end of their pins pulled out of the module as shown above and the other ends are connected together and pulled out as the Common pin. So to make an LED of a particular segment glow we just have to power common pin along with the segment pin. This way we can power more than one segment at a time to represent the numeric number 0-9 and also few Alphabets as shown on the graphic image below. We also have an option to show a decimal point using the DP pin.
Selecting your 7-Segment Display
As discussed in the Features there are many options to choose for a 7-segment display. There many different types of size and colours to select from. The default and most commonly used / available one is the 14.20mm with Red colour display as show in the above animation. If you are planning to make your project look out of the box, then other colour display can also be used. Also note that as size and colour differs the amount of current consumed by the display will also differ. The Red colour one is universally used since it consumes less current than other colours.
Now, there is another important parameter which you have to concentrate before buying this module. That is either a Common Anode display or a Common Cathode display. We cannot use a circuit/program designed for Common Anode display for Common Cathode or vice versa.
Common Cathode (CC) 7 Segment Display
The common cathode display is commonly called CC display. In this type the common pin on the 7-segment display is connected to all the eight Cathode pins of the LEDs. So In order to make this type of seven segment display to work we should connect he Com pin to the Ground pin and power the other pins with Vcc (+5V typically).
Common Anode (CA) 7 Segment Display
The common anode display is commonly called CA display. In this type the common pin on the 7-segment display is connected to all the eight Anode pins of the LEDs. So In order to make this type of seven segment display to work we should connect he Com pin to the Vcc (+5V typically) and ground the required segment pin to turn it on.
How to use 7-Segment display
One important advantage of a 7-segment display is that, it is very easy to use. Unlike other display modules a 7-segment display can be made to work even without a Microcontroller or a Microprocessor.
This is possible because of the readily available 7-segment counter IC’s like IC CD4026. This IC can be used in combination with the display for projects which have very simple circuits. The IC can drive one 7-segment display module and the number that is being displayed can also be incremented or decremented.
But, most commonly a seven segment display is used along with a MCU/MPU in that case, the eight segment pins will be connected to the I/O pins of the Microcontroller and the com pin will be connected to the ground of Vcc depending upon its type (CC/CA). Then these IO pins can be toggled in a particular sequence to display the desired numbers. This particular sequence is explained through the table below. For displaying each number in the seven segment display its respective sequence is given in the table. 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.
Digit to Display
h g f e d c b a
1 1 0 0 0 0 0 0
1 1 1 1 1 0 0 1
1 0 1 0 0 1 0 0
1 0 1 1 0 0 0 0
1 0 0 1 1 0 0 1
1 0 0 1 0 0 1 0
1 0 0 0 0 0 1 0
1 1 1 1 1 0 0 0
1 0 0 0 0 0 0 0
1 0 0 1 0 0 0 0
Note:The table is applicable only for Common Anode type display, if it is a common Cathode type then simply replace the ‘1’s with ‘0’s and ‘0’s with ‘1’s.
- Used in applications where font size is required to be bigger
- Microcontroller Independent, hence used in small circuit projects
- Used in combination with four segments to display measurement/sensor value with four characters
- Has bright illumination, hence used where display are required to work in low light or dark conditions
2D model (14.20mm package)
7 Segment Display Datasheet