MOULDLKnowledge BaseElectrical Knowledge Base3D Model DownloadsMembership
中文版Model Store »
Knowledge Base › Electrical Knowledge Base › What is the segment map of a seven-segment display and common-anode versus common-cathode?
HomeModels
Table of contents

On this page

Electrical & Electronic Basics (600 articles)

Quick Reference

  • PLC & Programming
  • Electrical & Electronic Basics (monthly)(每月更新中)
  • Electrical Control & Drawings (monthly)(每月更新中)
  • Drives & Actuators (monthly)(每月更新中)
  • Sensors & Detection (monthly)(每月更新中)
  • Industrial Communication & Networks (monthly)(每月更新中)
  • HMI & Host Systems (monthly)(每月更新中)
  • Industrial Robots & Motion Control (monthly)(每月更新中)
  • Mechatronic System Integration (monthly)(每月更新中)
  • Fault Diagnosis & Standards (monthly)(每月更新中)

What is the segment map of a seven-segment display and common-anode versus common-cathode?

Displays come in common-cathode and common-anode versions, and wiring them backwards means all on or all off. This page explains how the a to g plus dp segments are laid out, why the drive level is inverted between the two types, and how to read the segment-code table.

1. How it works

The seven segments are really eight: a to g plus the decimal point dp at lower right. Standard layout has a at top, b upper right, c lower right, d bottom, e lower left, f upper left, g middle bar. A segment code drives each of the eight bits high or low; for example 8 lights a through g, while 1 lights only b and c.

2. Numbers and practice

Common-cathode ties all LED cathodes to ground, so light a segment by driving it high; common-anode ties all anodes to plus V, so light a segment by driving it low. The two segment codes are bitwise complements. Wire an anode type with high-level drive and nothing lights at all, so confirm the polarity before buying parts and drawing the board.

3. Pitfalls and fixes

Read the segment-code table instead of computing it. Common-cathode codes with dp leading are 0 equals 0x3F, 1 equals 0x06, 2 equals 0x5B, 8 equals 0x7F; common-anode is each value inverted. In multiplexed scans the digit-select pin switches in turn while segment lines are shared, with a current-limit resistor per segment at 5 to 15 mA.

4. Common cathode versus anode segment-code table

DigitCathode code hexAnode code hex
00x3F0xC0
10x060xF9
20x5B0xA4
30x4F0xB0
80x7F0x80
All on0x7F0x80

5. Notes

Confirm display polarity before drawing the board; reversed wiring leaves it dark. Multiplex needs digit-current limiting and a refresh above 50 Hz or it flickers visibly.

6. References

The quantities and component characteristics discussed here follow current national standards and the corresponding IEC documents: Display devices per GB/T 4728 and IEC 60748. Always check the device datasheet and the product design file for ratings and derating.

7. Cautions

⚠️ Three common pitfalls:
① Wrong cathode or anode polarity:Drive level inverted, whole display dark, looks like a dead chip
② Wrong segment-code polarity:Digits show missing strokes or all on
③ Multiplex refresh too slow:Below about 50 Hz the flicker is visible and harsh

Locate the issue with the approach above, then confirm with measurements; safety-related circuits must follow the standards and manufacturer requirements.

Related reading

Related 3D models: Ready to build it? Download free 3D models & CAD drawings at MOULDL »
MOULDL · Electrical Knowledge Base · free self-study reference for electrical & automation engineers, 3D CAD models at MOULDL