7-Segment Display

A single-digit numeric LED display: seven individually addressable bar segments plus a decimal point, wired as common-cathode LEDs.

7-Segment Display: Single numeric digit

What is the 7-Segment Display?

A 7-segment display packs seven bar-shaped LEDs, labeled a through g and arranged in a figure-8, plus a decimal-point LED, into one digit position. Lighting different combinations forms the numerals 0-9 and a handful of letters (such as A-F for hexadecimal). This is the common single-digit module, roughly 12.7mm wide and 19mm tall, with 10 pins broken out.

Each segment is an independent LED with a forward voltage of about 2V, so every segment needs its own current-limiting resistor. In this common-cathode variant, all eight cathodes join at the shared common pins: you tie the common to ground and drive each segment's anode pin HIGH to turn that segment on. The two common pins (com and com2) are internally connected, so grounding either one is enough.

Because the part exposes every segment directly, driving all eight lines from a microcontroller consumes eight I/O pins plus eight resistors. To save pins, builders commonly feed the display from a shift register (74HC595) or a dedicated driver (MAX7219), and multiplex multiple digits by rapidly switching their common lines.

7-Segment Display pinout

PinFunctionType
e Segment EPassivePassive
d Segment DPassivePassive
com Common (-)PassivePassive
c Segment CPassivePassive
dp Decimal Pt.PassivePassive
b Segment BPassivePassive
a Segment APassivePassive
f Segment FPassivePassive
g Segment GPassivePassive
com2 Common 2 (-)PassivePassive

Specifications

Forward voltage
2 V
Dimensions
12.7 × 19 × 8 mm

Verified from the Tinkered component library.

Circuit requirements

  • Put a current-limiting resistor in series with every segment and decimal-point pin (typically around 220Ω on a 5V rail), not one shared resistor on the common line, so each segment draws its own controlled current.
  • Common-cathode wiring: connect a common pin to GND and drive each segment pin HIGH to light it. A common-anode display is the inverse (common to VCC, drive segment LOW), so confirm the type before wiring.
  • Each segment is a ~2V LED drawing roughly 20mA at full brightness; a fully lit digit with decimal point can pull close to 160mA total through the common line.
  • The two common pins are internally tied together; you only need to ground one, but a multiplexed display should switch the common through a transistor since the combined segment current exceeds a microcontroller pin's limit.
  • Segment pins are not laid out in a-b-c order around the package, so map each physical pin to its segment from the pinout before writing the driver code.

Board compatibility

The 7-Segment Display connects to any of the microcontrollers supported in Tinkered.

Simulate the 7-Segment Display in your browser

The 7-Segment Display is fully simulated in Tinkered. Wire it into a circuit, write your firmware, and read real values back with no physical hardware. Test your logic before you touch a breadboard.

Open it in the simulator

Common 7-Segment Display mistakes

Confusing common cathode with common anode

The two variants use inverted drive logic. A common-cathode part grounds the common and lights a segment by driving its pin HIGH; wire it as if it were common anode and nothing (or everything) lights. Verify the type first.

Using a single resistor on the common pin

Sharing one resistor on the common line makes brightness change with how many segments are on, because the current splits across them. Give every segment and the decimal point its own series resistor instead.

Driving segments straight from an MCU pin with no resistor

Connecting a segment directly to a GPIO pin exceeds both the LED's forward current and the pin's source/sink limit, and can damage the pin or the segment. Always include the series resistor.

Direct-driving the common line of a multiplexed display

When multiplexing digits, the common carries the summed current of every lit segment (up to ~160mA), well beyond a microcontroller pin. Switch the common through a transistor or driver, not straight from a GPIO.

Assuming pins run in a-b-c-d order

The physical pin sequence does not follow the segment letters, and the two common pins sit in the middle of each row. Map pins from the datasheet rather than guessing, or the digit displays garbled patterns.

Popular 7-Segment Display projects

Single-digit counter

Count 0-9 on button presses or a sensor trigger, cycling through the segment patterns for each numeral.

Countdown timer

Show a one-digit countdown that decrements each second, lighting the decimal point as a status indicator.

Electronic dice

Display a random value from 1 to 6 on each press, a classic first project for learning segment lookup tables.

Reaction-time game

Flash a digit and measure how fast the player responds, using the display for the round number and score.

Shift-register or MAX7219 multi-digit display

Chain several digits driven through a 74HC595 or MAX7219 to build clocks and counters while saving microcontroller pins.

Build with the 7-Segment Display.

Drop the 7-Segment Display into a circuit, write firmware, and simulate it in your browser, then deploy to real hardware. All in one editable Tinkered project.