7 Segment Display Pinout: Common Cathode and Common Anode Explained

By editor 11 min read
Seven segment display with numbered pins and segment letters a to g showing the standard pinout

A standard single-digit 7 segment display has 10 pins. Viewed from the front with pin 1 at the bottom left, the pinout is: 1 = e, 2 = d, 3 = common, 4 = c, 5 = decimal point, 6 = b, 7 = a, 8 = common, 9 = f, 10 = g. Pins 3 and 8 are the common, connected to ground on a common cathode display or to the positive supply on a common anode display. Common cathode and common anode versions use the same pin positions; only the LED direction is reversed.

10
pins on a single digit
3 & 8
common pins
a–g + DP
segment pins
12
pins on most 4-digit modules
Seven segment display pinout with pin numbers and segment lettersFront view of a standard 10-pin single-digit seven segment display. Bottom row, left to right: pin 1 e, pin 2 d, pin 3 common, pin 4 c, pin 5 decimal point. Top row, left to right: pin 10 g, pin 9 f, pin 8 common, pin 7 a, pin 6 b.Standard 10-pin single-digit pinout (front view)agdfbecDP10g9f8COM7a6b1e2d3COM4c5DPpin 1Pin → segmentPin 1ePin 2dPin 3commonPin 4cPin 5DPPin 6bPin 7aPin 8commonPin 9fPin 10gTop rowpins 10 → 6Bottom rowpins 1 → 5IndustrialBasicsindustrialbasics.com
Figure 1: Pin map from the Kingbright SC56-11 (common cathode) and SA56-11 (common anode) datasheets. Pins 3 and 8 are the common and are connected internally.

7 Segment Display Pin Configuration

PinCommon cathode (e.g. SC56-11)Common anode (e.g. SA56-11)Position
1Segment e anodeSegment e cathodeBottom row
2Segment d anodeSegment d cathodeBottom row
3Common cathode → 0 VCommon anode → +VBottom row
4Segment c anodeSegment c cathodeBottom row
5Segment DP anodeSegment DP cathodeBottom row
6Segment b anodeSegment b cathodeTop row
7Segment a anodeSegment a cathodeTop row
8Common cathode → 0 VCommon anode → +VTop row
9Segment f anodeSegment f cathodeTop row
10Segment g anodeSegment g cathodeTop row
Pin assignment from the Kingbright SC56-11EWA and SA56-11EWA datasheets (0.56-inch, right-hand decimal). Most 0.5–0.56 inch single digits from other makers use the same layout, but confirm with the datasheet.

The segments are always named the same way. Wikipedia describes them as “a” to “g” with an optional decimal point (DP). By convention a is the top bar and the letters run clockwise (b upper right, c lower right, d bottom, e lower left, f upper left), with g as the middle bar. A fully lit digit with the DP needs 8 LED pins plus the common, which is why the package has 10 pins (two of them are commons).

Common Cathode vs Common Anode

Internal wiring of common cathode and common anode seven segment displaysIn a common cathode display all segment LED cathodes join at the common pin, which goes to 0 volts, and a segment lights when its pin is driven high. In a common anode display all anodes join at the common pin, which goes to the positive supply, and a segment lights when its pin is pulled low.Common cathode vs common anode inside the packageCommon cathode (CC)abcdefgCOM (pins 3, 8) → 0 VDrive a segment HIGH to light itCommon anode (CA)abcdefgCOM (pins 3, 8) → +VPull a segment LOW to light itIndustrialBasicsindustrialbasics.com
Figure 2: Same pins, opposite diode direction. The decimal point LED (pin 5) is wired the same way as the segments.
Common cathode (CC)Common anode (CA)
Common pin (3, 8) goes toGround (0 V)Positive supply (+5 V, +3.3 V, etc.)
To light a segmentDrive its pin HIGH through a resistorPull its pin LOW through a resistor
Microcontroller logic1 = ON0 = ON (inverted)
Suits drivers thatSource current (CD4511B, PNP/sourcing outputs)Sink current (open-collector, NPN/sinking outputs)
Kingbright part prefixSC (e.g. SC56-11)SA (e.g. SA56-11)
Common cathode vs common anode. Driver information from the TI CD4511B datasheet; part prefixes from Kingbright.

Neither type is better: pick the one that matches your driver. A CD4511B or a PLC sourcing output pushes current out, so it pairs with common cathode. A sinking driver, or a microcontroller pin that can sink more current than it sources, pairs with common anode.

How to Identify an Unknown Display

  1. Read the part number printed on the side and look up its datasheet. This is the only way to be certain of a multi-digit pinout.
  2. Set up a test source: a 3 V coin cell or bench supply with a 330 Ω resistor in series. Never connect a supply straight to an LED.
  3. Find the common: put the positive lead on pin 3 and touch the negative lead to pin 7. If segment a lights, it is common anode.
  4. If nothing lights, reverse the leads (negative on pin 3, positive on pin 7). If a lights now, it is common cathode.
  5. Map the rest by touching each pin in turn and noting which segment lights. A multimeter on diode test also works, but some meters do not supply enough current to light a segment visibly.

Resistor Calculator

Each segment is an LED and needs current limiting. The Kingbright SC56-11EWA datasheet gives a typical forward voltage of 1.9 V (2.3 V max) at 10 mA and an absolute maximum DC forward current of 30 mA per segment, and it notes that current-limiting resistors may be needed. ProtoSupplies gives about 2 V for red and yellow and 3.2 V for green and blue displays.

R = (Vsupply − VF) ÷ IF
7-Segment Resistor Calculator (per segment)
IndustrialBasics calculator. R = (supply − forward voltage − driver drop) ÷ current. Check the forward voltage and maximum current in your display’s datasheet; red segments are typically about 2 V and blue, green or white about 3.2 V.
SupplyRed (2 V) at 10 mABlue/green (3.2 V) at 10 mARed at 20 mA
3.3 V130 Ω10 Ω68 Ω
5 V300 Ω180 Ω150 Ω
9 V750 Ω620 Ω360 Ω
12 V1000 Ω910 Ω510 Ω
24 V2200 Ω2200 Ω1100 Ω
Resistor per segment, rounded up to the next E24 value. Higher supplies need higher-wattage resistors: at 24 V and 10 mA each resistor dissipates about 0.22 W.
Wiring tip: Put a resistor on every segment pin, not one on the common. With a shared resistor the brightness changes with the digit shown, because a “1” lights 2 segments and an “8” lights 7.

Digit Truth Table and Hex Codes

To show a number, light the segments listed below. Wikipedia notes that one byte can hold the whole display state; the common encodings are gfedcba and abcdefg. In gfedcba order, 0x06 lights segments b and c to show “1”.

DigitSegments ONa b c d e f gHex, CC (gfedcba)Hex, CA (gfedcba)
0a, b, c, d, e, f1 1 1 1 1 1 00x3F0xC0
1b, c0 1 1 0 0 0 00x060xF9
2a, b, d, e, g1 1 0 1 1 0 10x5B0xA4
3a, b, c, d, g1 1 1 1 0 0 10x4F0xB0
4b, c, f, g0 1 1 0 0 1 10x660x99
5a, c, d, f, g1 0 1 1 0 1 10x6D0x92
6a, c, d, e, f, g1 0 1 1 1 1 10x7D0x82
7a, b, c1 1 1 0 0 0 00x070xF8
8a, b, c, d, e, f, g1 1 1 1 1 1 10x7F0x80
9a, b, c, d, f, g1 1 1 1 0 1 10x6F0x90
Codes with the decimal point off (bit 7). For common anode the bits are inverted, so a 0 turns a segment on.

Driving a Display with the CD4511B

Rather than drive seven pins yourself, a BCD-to-7-segment decoder converts a 4-bit number into segment signals. TI’s CD4511B datasheet describes it as a CMOS BCD-to-7-segment latch decoder driver with high-output-sourcing capability up to 25 mA, latches for BCD code storage, lamp test and blanking, and outputs that blank for BCD input codes above 1001 (9). TI lists driving common-cathode LED displays among its applications, and it runs from 3 V to 18 V.

CD4511B pinFunctionCD4511B pinFunction
1B (BCD input)16VDD (supply)
2C (BCD input)15f output
3LT (lamp test, active low)14g output
4BL (blanking, active low)13a output
5LE/strobe (latch enable)12b output
6D (BCD input)11c output
7A (BCD input)10d output
8VSS (ground)9e output
CD4511B terminal assignment (top view) from the Texas Instruments datasheet. Fit a series resistor between each output and its segment.

For normal operation tie LT and BL high and LE low, apply the BCD number to A–D, and connect outputs a–g through resistors to the matching display pins (a = pin 7, b = pin 6 and so on) with the display common to ground.

4-Digit 7 Segment Display Pinout and Multiplexing

Multiplexed four digit seven segment displayFour digits whose segment lines a to g and DP are connected together, with a separate common pin D1 to D4 for each digit. The digits are lit one at a time in quick succession so all four appear to be on.A 4-digit display shares the segment pins and switches the digitsD1 commonD2 commonD3 commonD4 commona–g, DPsharedLight D1 for a few milliseconds with the segments for its digit, then D2, D3 and D4, and repeatfaster than the eye can follow.IndustrialBasicsindustrialbasics.com
Figure 3: Multiplexing, as described by Wikipedia and ProtoSupplies. A 4-digit module needs 8 segment pins plus 4 digit pins, which is why most have 12 pins.

Wikipedia explains that multi-digit displays are multiplexed: the a segments of every digit are connected together, and so on, while each digit has its own common. The controller enables one digit, sets its segments, then moves to the next. ProtoSupplies describes the same for its 12-pin, 4-digit common cathode module: D1–D4 are pulled low in turn while the segment pins are driven high, quickly enough that all four digits appear lit.

Because each digit is lit only part of the time, multiplexed displays are often driven harder: the ProtoSupplies module allows 20 mA continuous and 100 mA pulsed per segment. There is no single standard 4-digit pinout; different manufacturers place D1–D4 on different pins, so take the pinout from the datasheet for your exact part. ProtoSupplies recommends a dedicated driver such as the MAX7219, which handles multiplexing and current limiting for up to 8 digits over three wires.

Using 7 Segment Displays in Industrial Panels

Panel meters, counters, timers and temperature controllers still use 7 segment displays because they are readable at a distance and in sunlight. When you drive one from a 24 V PLC output, recalculate the resistor (2.2 kΩ, ½ W per red segment at 10 mA) and match the display type to the output: sourcing (PNP) outputs suit common cathode, sinking (NPN) outputs suit common anode. For counting and displaying process values, a BCD output card feeding a CD4511B per digit saves PLC outputs. See what is a PLC for how discrete outputs work, and our 4-20 mA guide for the analog signals panel meters usually display.

Safety note: Work on panel wiring only with the circuit de-energized and locked out. Keep low-voltage display wiring separated from mains conductors in the enclosure.

Troubleshooting

  • Nothing lights: wrong type (CC wired as CA or the reverse), or the common is not connected.
  • One segment dead: broken resistor or joint, or that segment’s LED has failed; test it directly with the coin-cell method.
  • Wrong digits shown: segment pins swapped; check against the pin table (a = 7, b = 6, c = 4, d = 2, e = 1, f = 9, g = 10).
  • Digits brighter or dimmer with different numbers: a single resistor on the common pin.
  • Ghosting on multi-digit displays: segments change before the previous digit is switched off; add a short blanking gap between digits.

Not sure which end of an LED is which? Our anode vs cathode guide explains the markings and why the anode is positive in a diode.

For the general formula, standard values and resistor wattage, see how to size a current-limiting resistor.

Frequently Asked Questions

What is the pinout of a 7 segment display?

On the standard 10-pin single digit, viewed from the front with pin 1 at bottom left: pin 1 = e, 2 = d, 3 = common, 4 = c, 5 = DP, 6 = b, 7 = a, 8 = common, 9 = f, 10 = g. Pins 3 and 8 are both the common and are joined inside.

How do I know if my 7 segment display is common anode or common cathode?

Check the part number in the datasheet (Kingbright SC = common cathode, SA = common anode), or test it: with a 3 V source and a 330 Ω resistor, put positive on pin 3 and touch the negative to pin 7. If segment a lights, it is common anode. If not, reverse the polarity; if it lights then, it is common cathode.

Which pin is common in a 7 segment display?

Pins 3 and 8 (the middle pin of each row) on the standard 10-pin package. You only need to connect one, but connecting both spreads the current.

What is the difference between common anode and common cathode?

In a common cathode display all LED cathodes share one pin, which goes to ground, and a segment lights when its pin is driven high. In a common anode display all anodes share a pin, which goes to the positive supply, and a segment lights when its pin is pulled low.

What resistor should I use with a 7 segment display?

R = (supply − forward voltage) ÷ current. For a red display on 5 V at 10 mA: (5 − 2) ÷ 0.010 = 300 Ω, which is a standard E24 value (use 330 Ω if you only stock E12; the segment runs at about 9 mA). Use one resistor per segment, not one on the common pin.

Why not use one resistor on the common pin?

All lit segments would share that one resistor, so the current per segment, and the brightness, would change with the number shown: a “1” (2 segments) would be much brighter than an “8” (7 segments).

How many pins does a 4 digit 7 segment display have?

Usually 12: eight shared segment pins (a–g and DP) and four digit-common pins. The pin positions vary between manufacturers, so always check the datasheet for your exact part.

What IC drives a 7 segment display?

The CD4511B decodes a 4-bit BCD number for a common cathode display and sources up to 25 mA per segment. For multi-digit displays, driver ICs such as the MAX7219 handle multiplexing and current limiting over a serial bus.

What is the hex code for each digit?

In gfedcba order for a common cathode display: 0 = 0x3F, 1 = 0x06, 2 = 0x5B, 3 = 0x4F, 4 = 0x66, 5 = 0x6D, 6 = 0x7D, 7 = 0x07, 8 = 0x7F, 9 = 0x6F. For common anode, invert the bits.

Can I drive a 7 segment display from a 24 V PLC output?

Yes, with a larger resistor. For a red segment at 10 mA: (24 − 2) ÷ 0.010 = 2.2 kΩ, which dissipates about 0.22 W, so use a ½ W resistor. A PLC sourcing (PNP) output suits a common cathode display.

Sources and Further Reading

About the author

editor

Leave a Comment