The Raspberry Pi provides a 40-pin GPIO header, to which this little gem is connected. Note that there are several GPIO numbering schemes for the Pi (don’t ask me why). The numbering here is based on the data at the official GPIO documentation page. So, for example, D10 is connected to GPIO21, which is pin 40 on the header. This numbering is used throughout the project, including in the software.
The connections are as follows:
Segment Anode | GPIO |
---|---|
A | 12 |
B | 24 |
C | 26 |
D | 27 |
E | 9 |
F | 25 |
G | 14 |
H | 15 |
J | 17 |
K | 5 |
L | 4 |
M | 2 |
N | 18 |
P | 8 |
DP | 22 |
Digit Cathode | GPIO |
---|---|
D1 | 10 |
D2 | 23 |
D3 | 7 |
D4 | 16 |
D5 | 3 |
D6 | 11 |
D7 | 6 |
D8 | 13 |
D9 | 19 |
D10 | 21 |
D11 | 20 |
D12 | 1 |
The general idea is that the Pi will loop through each of the 12 digits, setting the segment anodes to the appropriate value, and pulsing the digit cathode for the corresponding digit. There is no intelligence in the display; it’s all down to the Pi to manage.