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.
7 Segment Display Pin Configuration
| Pin | Common cathode (e.g. SC56-11) | Common anode (e.g. SA56-11) | Position |
|---|---|---|---|
| 1 | Segment e anode | Segment e cathode | Bottom row |
| 2 | Segment d anode | Segment d cathode | Bottom row |
| 3 | Common cathode → 0 V | Common anode → +V | Bottom row |
| 4 | Segment c anode | Segment c cathode | Bottom row |
| 5 | Segment DP anode | Segment DP cathode | Bottom row |
| 6 | Segment b anode | Segment b cathode | Top row |
| 7 | Segment a anode | Segment a cathode | Top row |
| 8 | Common cathode → 0 V | Common anode → +V | Top row |
| 9 | Segment f anode | Segment f cathode | Top row |
| 10 | Segment g anode | Segment g cathode | Top row |
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
| Common cathode (CC) | Common anode (CA) | |
|---|---|---|
| Common pin (3, 8) goes to | Ground (0 V) | Positive supply (+5 V, +3.3 V, etc.) |
| To light a segment | Drive its pin HIGH through a resistor | Pull its pin LOW through a resistor |
| Microcontroller logic | 1 = ON | 0 = ON (inverted) |
| Suits drivers that | Source current (CD4511B, PNP/sourcing outputs) | Sink current (open-collector, NPN/sinking outputs) |
| Kingbright part prefix | SC (e.g. SC56-11) | SA (e.g. SA56-11) |
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
- 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.
- 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.
- 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.
- If nothing lights, reverse the leads (negative on pin 3, positive on pin 7). If a lights now, it is common cathode.
- 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.
| Supply | Red (2 V) at 10 mA | Blue/green (3.2 V) at 10 mA | Red at 20 mA |
|---|---|---|---|
| 3.3 V | 130 Ω | 10 Ω | 68 Ω |
| 5 V | 300 Ω | 180 Ω | 150 Ω |
| 9 V | 750 Ω | 620 Ω | 360 Ω |
| 12 V | 1000 Ω | 910 Ω | 510 Ω |
| 24 V | 2200 Ω | 2200 Ω | 1100 Ω |
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”.
| Digit | Segments ON | a b c d e f g | Hex, CC (gfedcba) | Hex, CA (gfedcba) |
|---|---|---|---|---|
| 0 | a, b, c, d, e, f | 1 1 1 1 1 1 0 | 0x3F | 0xC0 |
| 1 | b, c | 0 1 1 0 0 0 0 | 0x06 | 0xF9 |
| 2 | a, b, d, e, g | 1 1 0 1 1 0 1 | 0x5B | 0xA4 |
| 3 | a, b, c, d, g | 1 1 1 1 0 0 1 | 0x4F | 0xB0 |
| 4 | b, c, f, g | 0 1 1 0 0 1 1 | 0x66 | 0x99 |
| 5 | a, c, d, f, g | 1 0 1 1 0 1 1 | 0x6D | 0x92 |
| 6 | a, c, d, e, f, g | 1 0 1 1 1 1 1 | 0x7D | 0x82 |
| 7 | a, b, c | 1 1 1 0 0 0 0 | 0x07 | 0xF8 |
| 8 | a, b, c, d, e, f, g | 1 1 1 1 1 1 1 | 0x7F | 0x80 |
| 9 | a, b, c, d, f, g | 1 1 1 1 0 1 1 | 0x6F | 0x90 |
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 pin | Function | CD4511B pin | Function |
|---|---|---|---|
| 1 | B (BCD input) | 16 | VDD (supply) |
| 2 | C (BCD input) | 15 | f output |
| 3 | LT (lamp test, active low) | 14 | g output |
| 4 | BL (blanking, active low) | 13 | a output |
| 5 | LE/strobe (latch enable) | 12 | b output |
| 6 | D (BCD input) | 11 | c output |
| 7 | A (BCD input) | 10 | d output |
| 8 | VSS (ground) | 9 | e output |
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
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.
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
- Kingbright SC56-11EWA datasheet (PDF): common cathode pinout, forward voltage and current ratings.
- Kingbright SA56-11EWA datasheet (PDF): common anode version with the same pin positions.
- Texas Instruments CD4511B datasheet (PDF): BCD-to-7-segment latch decoder driver.
- Wikipedia: Seven-segment display: segment naming, encodings and multiplexing.
- ProtoSupplies: LED 7-segment 0.36″ CC 4-digit: multiplexing, current ratings and resistor values.
