

It is always good to know the type of display you are using before including it in your setup and writing code. Testing the type of display with a multimeter. The diagram below shows the internal structure of the common cathode and common anode seven-segment displays. In this case the COM pin is connected to 5V and the individual segments will be turned on by grounding their cathode pins. The common anode display is the exact opposite therefore the anode of all the LEDs are connected together to form the COM pin. When using this display, the COM pin is connected to the GROUND of the microntroller and the segment pins will be turned on by supplying a +5v signal to the corresponding digital pin where the anode is connected. In a common cathode seven-segment display, the cathodes of all seven LEDs and the dot LED are connected giving a COM(common) pin. Since the seven segment display is a collection of LEDs, and each LED has a cathode(negative) and anode(postive) terminal, the way these LEDs are connected internally determines the type of display which then affects how the code for running the display is written. This makes some segments light and others dark thereby giving the desired character pattern for the digit or letter to be displayed. To be able to turn on a specific part of the display, you simply turn the pin connected to that segment HIGH or LOW.

The other LED pins are connected together to form a common pin. Internally, one pin of each of the segment LED is connected to the outer pin that can be seen. The COM pin is connected to either GND or VCC of the microcontroller depending on the type of display. The DP pin is for controlling the decimal point. The pins a, b, c, d, e and f control the lighting of the individual segments.

The diagram below shows the arrangement of the segments and the corresponding pins. Another segment is usually added to represent a decimal point which is important in some applications. These are turned on in a given pattern to be able to show a given digit or letter. 7 segment Display Hardware overview.Ī 7-segment display is simply an arrangement of seven LEDs where each segment represents an LED. In this tutorial I will show how to interface a 7 segment display with Arduino. It is a relatively cheaper option compared to other display devices like LCDs. A seven segment display is used in projects where we want to display simple digits or letters like in digital counters and clocks.
