Seven segment displays are very commonly used today. 7 segment displays are kind of led displays. You can find 7 segment displays on different electronic devices which display some status in the form of numbers. They are used to display time in digital watches, display speed of automobile in cars, on old buffers, washing machines and electrical panels etc. Though there use is tremendously decreased due to the invention of lcd's. But they are in used today in many appliances. Seven segment display contains 7 led's in it. Which are toggled to make a specific number. Maximally you can display a digit 9 on a single 7 segment starting from 0.
In this tutorial i am going to explains about the little difference between them and at the bottom of the post few demo projects links are given in which seven segment displays are interfaced with different microcontrollers. Each project circuit diagram, code and detail description is given in the post. All the project's source codes and circuit diagrams are free and one can use and manipulate it according to its need.
Seven segment display is composed of led's that are arranged in 2 configuration. First configuration has all the led's anode's connected together and this configuration 7 segment display is known as common anode 7 segment display. The other configuration is opposite to the first one where all the led's cathodes are connected together and this configuration is know as common cathode 7 segment display. On these configuration bases seven segments are divided in to two types common anode(CA) and common cathode(CC). Both configuration has some pros and cons.
​For common anode apply +5 volts to vcc pin in series to a 510 ohm-1k ohm resistor. This resistor is very important always include it other wise your seven segment display will be damaged by over current. Note both the vcc pins are short so apply +5 volts on only one pin and leave other empty.
Ground the dp(decimal/display point) pin if you want it to illuminate for ever. If you to control dp(decimal/display point) led than connect it to some control system, microcontroller etc.
In common anode seven segment display's led becomes lit when we ground any a,b,c,d,e,f,g pin.
Common Anode seven segment display's color is usually gray.
For common cathode make GND pin ground. Only make one GND pin ground leave the other empty because both the GND pins are shorted.
Apply +5 volts to dp(decimal/display point) pin in series to a 510 ohm-1k ohm resistor to limit the current. If you want it to illuminate for ever apply +5v. If you want to control dp(decimal/display point) led than connect it to some control system, microcontroller etc.
Now if your small circle led lit's it means that your seven segment is properly working and now you can use it.
In common cathode seven segment display's led becomes lit when we apply some +positive voltage on any a,b,c,d,e,f,g pin.
Common Cathode seven segment display's color is usually black.
Below you can see the 7 segment display pinout for both common anode and cathode 7 segment display. Note the only difference is in power pins. Each 7 segment display has two power pins. You need to power only one rail at a time leave the other vacant.
Seven segment displays comes in many sizes. Each size power requirements are different due to bigger led's installed in bigger 7 segment displays. Small displays are used for near field view. Larger displays are used for far field view. 7 segment display led's comes in different colors red, green, blue, white and yellow. Each color is used in different appliances. Red is a sharp color and is used for viewing from grater distances. Normally digital clocks with bigger 7 segment displays led's are rd in color.
Special seven segment displays designed for special and a single task are also available in market. For example a combination of 4 seven 7 segment displays is used show time in digital displays. In this special display first two displays are used to display hour and next two shows minutes. In then the four seven segment display is a dot which sets a part the hour and minute. These special type of seven segment displays have their own pin outs. Check their data sheet for their pin out.
Seven Segment display interfacing with Arduino Uno.
Seven Segment display interfacing with 89c51 Microcontroller.