Count on a single seven-segment display
Drive segments A, B, C, D, E, F, G and DP from D2 through D9 using separate one-kilohm resistors. Count from zero to nine on a common-cathode display.
Drive segments A, B, C, D, E, F, G and DP from D2 through D9 using separate one-kilohm resistors. Count from zero to nine on a common-cathode display.
Use the Uno R3 Learning Kit. Build with power disconnected, check the labelled connections, then upload the supplied sketch. Drag or zoom the 3D model to inspect it from any angle.
Identify your part
The kit does not publish a display part number. This lesson explicitly targets the common-cathode ten-pin map in its table and requires a resistor-limited pin-identification check first.
Step 1 — Watch the complete build
Press Play for the narrated build. You can rotate and zoom the model while it plays, or follow the individual steps below.
Loading assembly…
Keep U S B disconnected while you build. On this breadboard, each group of five holes shares a connection; the centre channel separates the two halves. You can drag the 3D view to look around. Connect Arduino ground to the ground rail. This wiring uses the common-cathode ten-pin layout shown in the connection table. Before building, use a one kilohm resistor and 5 volts to identify its two common pins and segments. If your part differs, follow your measured map. Add the 1 kiloohm resistor. Its Pin 1 lead goes into column 15 row A; the highlights show the remaining holes. Add the 1 kiloohm resistor. Its Pin 1 lead goes into column 16 row B; the highlights show the remaining holes. Add the 1 kiloohm resistor. Its Pin 1 lead goes into column 15 row J; the highlights show the remaining holes. Add the 1 kiloohm resistor. Its Pin 1 lead goes into column 13 row J; the highlights show the remaining holes. Add the 1 kiloohm resistor. Its Pin 1 lead goes into column 12 row I; the highlights show the remaining holes. Add the 1 kiloohm resistor. Its Pin 1 lead goes into column 13 row A; the highlights show the remaining holes. Add the 1 kiloohm resistor. Its Pin 1 lead goes into column 12 row B; the highlights show the remaining holes. Add the 1 kiloohm resistor. Its Pin 1 lead goes into column 16 row I; the highlights show the remaining holes. Connect the display’s 3 pin to the ground rail. Connect the display’s 8 pin to the ground rail. Connect Arduino digital pin 2 to one end of the resistor. Connect Arduino digital pin 3 to one end of the resistor. Connect Arduino digital pin 4 to one end of the resistor. Connect Arduino digital pin 5 to one end of the resistor. Connect Arduino digital pin 6 to one end of the resistor. Connect Arduino digital pin 7 to one end of the resistor. Connect Arduino digital pin 8 to one end of the resistor. Connect Arduino digital pin 9 to one end of the resistor. Check all wiring. Connect the square U S B-B plug to the Uno and the U S B-A plug to your computer. Use Verify and Upload in the code editor below.
Step 2 — Understand the breadboard
Keep USB disconnected while you build. On this breadboard, each group of five holes shares a connection; the centre channel separates the two halves. You can drag the 3D view to look around.
Loading assembly…
Keep U S B disconnected while you build. On this breadboard, each group of five holes shares a connection; the centre channel separates the two halves. You can drag the 3D view to look around.
Step 3 — Connect Uno GND → T- rail 1
Connect Arduino ground to the ground rail.
| Connect | To |
|---|---|
| Uno GND | T- rail 1 |
Loading assembly…
Connect Arduino ground to the ground rail.
Step 4 — Identify the display first
This wiring uses the common-cathode ten-pin layout shown in the connection table. Before building, use a one kilohm resistor and 5V to identify its two common pins and segments. If your part differs, follow your measured map.
Exact breadboard holes
- display · 1 → column 12 row H
- display · 2 → column 13 row H
- display · 3 → column 14 row H
- display · 4 → column 15 row H
- display · 5 → column 16 row H
- display · 6 → column 16 row C
- display · 7 → column 15 row C
- display · 8 → column 14 row C
- display · 9 → column 13 row C
- display · 10 → column 12 row C
Loading assembly…
This wiring uses the common-cathode ten-pin layout shown in the connection table. Before building, use a one kilohm resistor and 5 volts to identify its two common pins and segments. If your part differs, follow your measured map.
Step 5 — Place 1 kΩ resistor
Add the 1 kΩ resistor. Its Pin 1 lead goes into column 15 row A; the highlights show the remaining holes.
Exact breadboard holes
- r0 · Pin 0 → column 19 row A
- r0 · Pin 1 → column 15 row A
Loading assembly…
Add the 1 kiloohm resistor. Its Pin 1 lead goes into column 15 row A; the highlights show the remaining holes.
Step 6 — Place 1 kΩ resistor
Add the 1 kΩ resistor. Its Pin 1 lead goes into column 16 row B; the highlights show the remaining holes.
Exact breadboard holes
- r1 · Pin 0 → column 20 row B
- r1 · Pin 1 → column 16 row B
Loading assembly…
Add the 1 kiloohm resistor. Its Pin 1 lead goes into column 16 row B; the highlights show the remaining holes.
Step 7 — Place 1 kΩ resistor
Add the 1 kΩ resistor. Its Pin 1 lead goes into column 15 row J; the highlights show the remaining holes.
Exact breadboard holes
- r2 · Pin 0 → column 19 row J
- r2 · Pin 1 → column 15 row J
Loading assembly…
Add the 1 kiloohm resistor. Its Pin 1 lead goes into column 15 row J; the highlights show the remaining holes.
Step 8 — Place 1 kΩ resistor
Add the 1 kΩ resistor. Its Pin 1 lead goes into column 13 row J; the highlights show the remaining holes.
Exact breadboard holes
- r3 · Pin 0 → column 9 row J
- r3 · Pin 1 → column 13 row J
Loading assembly…
Add the 1 kiloohm resistor. Its Pin 1 lead goes into column 13 row J; the highlights show the remaining holes.
Step 9 — Place 1 kΩ resistor
Add the 1 kΩ resistor. Its Pin 1 lead goes into column 12 row I; the highlights show the remaining holes.
Exact breadboard holes
- r4 · Pin 0 → column 8 row I
- r4 · Pin 1 → column 12 row I
Loading assembly…
Add the 1 kiloohm resistor. Its Pin 1 lead goes into column 12 row I; the highlights show the remaining holes.
Step 10 — Place 1 kΩ resistor
Add the 1 kΩ resistor. Its Pin 1 lead goes into column 13 row A; the highlights show the remaining holes.
Exact breadboard holes
- r5 · Pin 0 → column 9 row A
- r5 · Pin 1 → column 13 row A
Loading assembly…
Add the 1 kiloohm resistor. Its Pin 1 lead goes into column 13 row A; the highlights show the remaining holes.
Step 11 — Place 1 kΩ resistor
Add the 1 kΩ resistor. Its Pin 1 lead goes into column 12 row B; the highlights show the remaining holes.
Exact breadboard holes
- r6 · Pin 0 → column 8 row B
- r6 · Pin 1 → column 12 row B
Loading assembly…
Add the 1 kiloohm resistor. Its Pin 1 lead goes into column 12 row B; the highlights show the remaining holes.
Step 12 — Place 1 kΩ resistor
Add the 1 kΩ resistor. Its Pin 1 lead goes into column 16 row I; the highlights show the remaining holes.
Exact breadboard holes
- r7 · Pin 0 → column 20 row I
- r7 · Pin 1 → column 16 row I
Loading assembly…
Add the 1 kiloohm resistor. Its Pin 1 lead goes into column 16 row I; the highlights show the remaining holes.
Step 13 — Connect column 14 row J → T- rail 14
Connect the display’s 3 pin to the ground rail.
| Connect | To |
|---|---|
| column 14 row J | T- rail 14 |
Loading assembly…
Connect the display’s 3 pin to the ground rail.
Step 14 — Connect column 14 row A → T- rail 13
Connect the display’s 8 pin to the ground rail.
| Connect | To |
|---|---|
| column 14 row A | T- rail 13 |
Loading assembly…
Connect the display’s 8 pin to the ground rail.
Step 15 — Connect Uno D2 → column 19 row C
Connect Arduino digital pin 2 to one end of the resistor.
| Connect | To |
|---|---|
| Uno D2 | column 19 row C |
Loading assembly…
Connect Arduino digital pin 2 to one end of the resistor.
Step 16 — Connect Uno D3 PWM → column 20 row A
Connect Arduino digital pin 3 to one end of the resistor.
| Connect | To |
|---|---|
| Uno D3 PWM | column 20 row A |
Loading assembly…
Connect Arduino digital pin 3 to one end of the resistor.
Step 17 — Connect Uno D4 → column 19 row H
Connect Arduino digital pin 4 to one end of the resistor.
| Connect | To |
|---|---|
| Uno D4 | column 19 row H |
Loading assembly…
Connect Arduino digital pin 4 to one end of the resistor.
Step 18 — Connect Uno D5 PWM → column 9 row H
Connect Arduino digital pin 5 to one end of the resistor.
| Connect | To |
|---|---|
| Uno D5 PWM | column 9 row H |
Loading assembly…
Connect Arduino digital pin 5 to one end of the resistor.
Step 19 — Connect Uno D6 PWM → column 8 row J
Connect Arduino digital pin 6 to one end of the resistor.
| Connect | To |
|---|---|
| Uno D6 PWM | column 8 row J |
Loading assembly…
Connect Arduino digital pin 6 to one end of the resistor.
Step 20 — Connect Uno D7 → column 9 row C
Connect Arduino digital pin 7 to one end of the resistor.
| Connect | To |
|---|---|
| Uno D7 | column 9 row C |
Loading assembly…
Connect Arduino digital pin 7 to one end of the resistor.
Step 21 — Connect Uno D8 → column 8 row A
Connect Arduino digital pin 8 to one end of the resistor.
| Connect | To |
|---|---|
| Uno D8 | column 8 row A |
Loading assembly…
Connect Arduino digital pin 8 to one end of the resistor.
Step 22 — Connect Uno D9 PWM → column 20 row J
Connect Arduino digital pin 9 to one end of the resistor.
| Connect | To |
|---|---|
| Uno D9 PWM | column 20 row J |
Loading assembly…
Connect Arduino digital pin 9 to one end of the resistor.
Step 23 — Place USB-A to USB-B cable · Uno
Check all wiring. Connect the square USB-B plug to the Uno and the USB-A plug to your computer. Use Verify and Upload in the code editor below.
Loading assembly…
Check all wiring. Connect the square U S B-B plug to the Uno and the U S B-A plug to your computer. Use Verify and Upload in the code editor below.
Step 24 — Program your Uno
Choose Arduino Uno. Verify, pair the board and Upload this sketch. Keep USB connected. Drive segments A, B, C, D, E, F, G and DP from D2 through D9 using separate one-kilohm resistors. Count from zero to nine on a common-cathode display.
Step 25 — Try it and troubleshoot
The display counts 0–9. Its physical map is A=7, B=6, C=4, D=2, E=1, F=9, G=10, DP=5, cathodes=3 and 8, viewed from the front. Confirm this with your part before power.
If it does not work
If a different segment lights, your package has another map. If it is common-anode, this exact circuit and sketch do not apply: identify the display rather than swapping supply pins at random.
Parts List
Required Parts (1)
Use the components named in this tutorial. A computer and any additional power supply are not included.
x1
$64.70
In stockProject Summary
1 part total
Unavailable items will be skipped