

A 7-segment display is an electronic display device that uses seven individual LED segments arranged in a figure-eight pattern to represent decimal numbers and some letters. The 13mm Common Cathode variant is a popular choice for numeric displays due to its simplicity and ease of use. In the common cathode configuration, all the cathodes of the LED segments are connected together to a single ground pin, while the anodes are individually controlled to illuminate specific segments.








The 7-segment display has 10 pins, with each pin corresponding to a specific segment or the common cathode. Below is the pinout for a standard 13mm Common Cathode 7-segment display:
| Pin Number | Segment/Function | Description |
|---|---|---|
| 1 | E | Controls segment E |
| 2 | D | Controls segment D |
| 3 | Common Cathode (CC) | Connects to ground (GND) |
| 4 | C | Controls segment C |
| 5 | Decimal Point (DP) | Controls the decimal point (if available) |
| 6 | B | Controls segment B |
| 7 | A | Controls segment A |
| 8 | Common Cathode (CC) | Connects to ground (GND) |
| 9 | F | Controls segment F |
| 10 | G | Controls segment G |
The segments are labeled as follows for reference:
--A--
| |
F B
| |
--G--
| |
E C
| |
--D-- (DP)
Below is an example of how to connect and control a single 7-segment display with an Arduino UNO:
| Segment | 7-Segment Pin | Arduino Pin |
|---|---|---|
| A | 7 | 2 |
| B | 6 | 3 |
| C | 4 | 4 |
| D | 2 | 5 |
| E | 1 | 6 |
| F | 9 | 7 |
| G | 10 | 8 |
| DP | 5 | 9 |
// Arduino code to display the number "8" on a 7-segment display
// Define the Arduino pins connected to each segment
const int segmentPins[] = {2, 3, 4, 5, 6, 7, 8, 9}; // A, B, C, D, E, F, G, DP
// Segment states for displaying the number "8"
// 1 = ON, 0 = OFF
const int number8[] = {1, 1, 1, 1, 1, 1, 1, 0}; // DP is OFF
void setup() {
// Set all segment pins as OUTPUT
for (int i = 0; i < 8; i++) {
pinMode(segmentPins[i], OUTPUT);
}
}
void loop() {
// Display the number "8"
for (int i = 0; i < 8; i++) {
digitalWrite(segmentPins[i], number8[i]);
}
delay(1000); // Keep the number displayed for 1 second
}
Segments Not Lighting Up:
Dim or Uneven Brightness:
Overheating:
Incorrect Display Output:
Q: Can I control multiple 7-segment displays with an Arduino?
A: Yes, you can use multiplexing or a driver IC like the MAX7219 to control multiple displays with fewer pins.
Q: What resistor value should I use?
A: A 220Ω resistor is a common choice, but you can calculate the exact value using Ohm's Law:
( R = \frac{V_{supply} - V_{forward}}{I_{forward}} )
Q: Can I use this display with a 3.3V microcontroller?
A: Yes, but ensure the forward voltage of the LEDs is compatible with the 3.3V supply. Use appropriate resistors to limit the current.