Part

Seven segment display

Common anode or cathode, with the decimal point.

See every part
  • 10 pins
  • 2 settings
  • In 4 projects
  • In 4 lessons
Drawn live by the editor's own code, at the size you see it.
At a glance

The Seven segment display in brief

What it is, and every setting the properties panel gives it.

A seven-segment display is not a smart part: it is eight ordinary LEDs in one black package, sharing one internal node that is brought out on two legs so the footprint stays symmetric. There is no decoder, no latch and no multiplexing inside it, exactly like the real thing. Each segment is the same diode model the plain LED uses, so a segment left with no series resistor still lights, at a current the probe will happily report as unrealistic rather than refusing to show it. The common leg’s polarity is the detail that catches people: a common-cathode part sinks the combined current of every lit segment through its grounded common leg, and wiring a common-anode part the common-cathode way lights nothing at all, which is precisely the mistake a real seven-segment display lets you make on a real breadboard too. Driving all eight lines from a microcontroller with pins to spare is the usual reason to reach for a 74HC595 alongside it.

Family
Displays
Pins
10
common
cathode (or anode)
cathode or anode.
color
red (or green, blue, yellow, white)
the LED color, which also sets the forward drop per segment.

A circuit built around it, running and explained: the 7 segment display simulator.

Pins

10 pins

Named as the editor names them, so a wire lands where you expect it.

Pin
What it does
E
The eight segment anodes (or cathodes, on a common-anode part).
D
The eight segment anodes (or cathodes, on a common-anode part).
COM1
The shared common leg, brought out twice.
C
The eight segment anodes (or cathodes, on a common-anode part).
DP
The eight segment anodes (or cathodes, on a common-anode part).
G
The eight segment anodes (or cathodes, on a common-anode part).
F
The eight segment anodes (or cathodes, on a common-anode part).
COM2
The shared common leg, brought out twice.
A
The eight segment anodes (or cathodes, on a common-anode part).
B
The eight segment anodes (or cathodes, on a common-anode part).
How to use it

How to wire a 7-segment display to an Arduino

A single-digit display is eight LEDs in one package, the segments a to g and the decimal point, with all their cathodes joined (common cathode) or all their anodes joined (common anode). On a common cathode display, each segment pin goes to an Arduino pin and the common pin to GND; a segment lights when its pin goes HIGH.

The circuit here is an electronic dice: segments a to g on pins 2 to 8, the common cathode through one 220 ohm resistor to GND, and a button on pin 9. One shared resistor is the cheap way and the more segments are lit, the dimmer each one is; a resistor per segment is the right way.

Part pin
Board pin
a, b, c, d, e, f, g
Pins 2, 3, 4, 5, 6, 7, 8
Common cathode
220 ohms to GND
Roll button
Pin 9 and GND

For four digits with only two pins, the TM1637 module does the multiplexing itself; its pages under the boards list show the wiring for each board.

Arduino Uno: electronic dicelive0.000 s 0.00x
Hold the button
This is the simulator itself, running here. Click anything to open it in the editor.
Showing a digit: one bit per segment, bit 0 is a
const int SEG_PINS[] = {2, 3, 4, 5, 6, 7, 8};

void show(uint8_t mask) {   // 0x06 is a 1, 0x7D a 6
  for (int i = 0; i < 7; i++) {
    digitalWrite(SEG_PINS[i], (mask >> i) & 1 ? HIGH : LOW);
  }
}
How it is modeled

What is true about the Seven segment display, here

In its help article’s own words: what the simulation gets right, and where it stops.

Modeled

Each segment is the same diode model the LED uses, literally the same forward drop and dynamic resistance, by color. Seen from a segment leg the part is the common node plus one diode; seen from a common leg it is every lit segment in parallel. A common-cathode digit with its common grounded sinks the sum of the segment currents, exactly as it does on a real board.

Not modeled

No decoder, no BCD input, no built-in current limiting.

Each segment is the same Shockley diode the LED is, so the same caveats apply: one curve per color, no dice-to-dice variation, no junction capacitance and no temperature. The probe calls a segment lit above 1 mA, which is a threshold rather than a brightness. The bitmask is on or off per segment, so a multiplexed digit at a tenth of full current reads exactly as bright as a steady one. There is no per-segment brightness, no persistence-of-vision averaging (unlike the plain LED), no digit multiplexing and no current or power rating.

LEDs, seven-segment dies and RGB LEDs (`led`)

modelwhat sets it
the same equation, with N = 2 and 12 ohm of bulkthe color's drop at 20 mA: red 1.8 V, yellow 2.0, green 3.0, blue 3.0, white 3.1

From Seven-segment display, in full.

Projects

See the Seven segment display in a project

4 built-in projects use it. Each opens in the editor, already wired.

Boards

The boards it is shown on

Each of these 2 boards has a built-in project with the Seven segment display in it.

Boards

The Seven segment display on each board

The pins, the voltage and the code change from board to board. Each page has that board’s wiring and a circuit you can run.

Wire up the Seven segment display

Open the editor and push it into the breadboard. It is free, and it runs on your own machine.