4-Digit 7-Segment Display¶
4-Digit 7-segment display consists of four 7- segment displays working together.
The 4-digtal 7-segment display works independently. It uses the principle of human visual persistence to quickly display the characters of each 7-segment in a loop to form continuous strings.
For example, when “1234” is displayed on the display, “1” is displayed on the first 7-segment, and “234” is not displayed. After a period of time, the second 7-segment shows “2”, the 1st 3th 4th of 7-segment does not show, and so on, the four digital display show in turn. This process is very short (typically 5ms), and because of the optical afterglow effect and the principle of visual residue, we can see four characters at the same time.
Display Codes
To help you get to know how 7-segment displays(Common Cathode) display Numbers, we have drawn the following table. Numbers are the number 0-F displayed on the 7-segment display; (DP) GFEDCBA refers to the corresponding LED set to 0 or 1, For example, 00111111 means that DP and G are set to 0, while others are set to 1. Therefore, the number 0 is displayed on the 7-segment display, while HEX Code corresponds to hexadecimal number.
Numbers |
Binary Code |
Hex Code |
---|---|---|
0 |
00111111 |
0x3f |
1 |
00000110 |
0x06 |
2 |
01011011 |
0x5b |
3 |
01001111 |
0x4f |
4 |
01100110 |
0x66 |
5 |
01101101 |
0x6d |
6 |
01111101 |
0x7d |
7 |
00000111 |
0x07 |
8 |
01111111 |
0x7f |
9 |
01101111 |
0x6f |
A |
01110111 |
0x77 |
B |
01111100 |
0x7c |
C |
00111001 |
0x39 |
D |
01011110 |
0x5e |
E |
01111001 |
0x79 |
F |
01110001 |
0x71 |
Example
5.3 Time Counter (For MicroPython User)
7.4 Passenger Counter (For MicroPython User)
7.5 GAME - 10 Second (For MicroPython User)
7.6 Traffic Light (For MicroPython User)
5.3 - Time Counter (For Arduino User)