

The 7-SEGMENT-4DIGIT display is a versatile electronic component designed to visually represent decimal numbers. It consists of four individual 7-segment digits, each made up of seven LED segments arranged in a figure-eight pattern. By illuminating specific segments, the display can represent numbers from 0 to 9.
This component is widely used in digital clocks, counters, timers, and other devices requiring numeric displays. Its compact design and ease of use make it a popular choice for both hobbyists and professionals.








The 7-SEGMENT-4DIGIT display typically has 12 or more pins. Below is a general pinout for a common cathode display:
| Pin Number | Label | Description |
|---|---|---|
| 1 | A | Segment A control |
| 2 | B | Segment B control |
| 3 | C | Segment C control |
| 4 | D | Segment D control |
| 5 | E | Segment E control |
| 6 | F | Segment F control |
| 7 | G | Segment G control |
| 8 | DP | Decimal Point control |
| 9 | DIG1 | Common cathode/anode for digit 1 |
| 10 | DIG2 | Common cathode/anode for digit 2 |
| 11 | DIG3 | Common cathode/anode for digit 3 |
| 12 | DIG4 | Common cathode/anode for digit 4 |
Note: The exact pin configuration may vary depending on the manufacturer. Always refer to the datasheet for your specific model.
Below is an example of how to connect and control a 7-SEGMENT-4DIGIT display using an Arduino UNO. This example assumes a common cathode display.
// Define segment pins
const int segmentPins[] = {2, 3, 4, 5, 6, 7, 8, 9}; // A, B, C, D, E, F, G, DP
// Define digit control pins
const int digitPins[] = {10, 11, 12, 13}; // DIG1, DIG2, DIG3, DIG4
// Digit patterns for numbers 0-9 (common cathode)
const byte digitPatterns[] = {
0b00111111, // 0
0b00000110, // 1
0b01011011, // 2
0b01001111, // 3
0b01100110, // 4
0b01101101, // 5
0b01111101, // 6
0b00000111, // 7
0b01111111, // 8
0b01101111 // 9
};
void setup() {
// Set segment pins as outputs
for (int i = 0; i < 8; i++) {
pinMode(segmentPins[i], OUTPUT);
}
// Set digit pins as outputs
for (int i = 0; i < 4; i++) {
pinMode(digitPins[i], OUTPUT);
}
}
void loop() {
// Display the number "1234"
displayNumber(1234);
}
void displayNumber(int number) {
for (int digit = 0; digit < 4; digit++) {
// Extract the digit to display
int digitValue = (number / (int)pow(10, digit)) % 10;
// Set the segments for the current digit
setSegments(digitPatterns[digitValue]);
// Activate the current digit
digitalWrite(digitPins[digit], LOW); // Turn on digit (common cathode)
delay(5); // Small delay for persistence of vision
digitalWrite(digitPins[digit], HIGH); // Turn off digit
}
}
void setSegments(byte pattern) {
for (int i = 0; i < 8; i++) {
digitalWrite(segmentPins[i], (pattern >> i) & 0x01);
}
}
Q: Can I use this display with a 3.3V microcontroller?
A: Yes, but ensure the forward voltage of the LEDs is compatible with 3.3V. You may need to adjust resistor values accordingly.
Q: How do I know if my display is common cathode or common anode?
A: Refer to the datasheet or test the display by connecting a single segment to power and ground.
Q: Can I control this display without multiplexing?
A: Yes, but it would require a large number of GPIO pins or an external driver IC like the MAX7219.
By following this documentation, you can effectively integrate and troubleshoot the 7-SEGMENT-4DIGIT display in your projects.