Driving a Four-Digit Seven-Segment Display: Common Anodes, Multiplexing and Ghosting
A four-digit LED display looks like a single component, but electrically it contains many LED segments and shared connections. It usually needs a driver circuit and a scanning strategy, not just a list of numbers to send from a microcontroller.
The seven-segment numeric LED collection includes the 0.36-inch blue four-digit common-anode clock display. The listing describes a centre colon rather than ordinary decimal points. This guide explains the design decisions for that class of bare display while leaving its exact pin map to the matching component documentation.
Check polarity before choosing a driver
In a common-anode display, the positive sides of the segments within a digit share a connection. A typical multiplexed arrangement selects that digit’s positive supply while suitable segment outputs sink current. A common-cathode display uses the opposite shared polarity.
This distinction determines driver compatibility. For example, the MAX7219/MAX7221 data sheet explicitly describes common-cathode display drivers. They are not a direct drop-in driver for a bare common-anode display simply because both products mention seven segments.
Start the schematic with the display’s actual internal connection diagram. Identify digit commons, segment lines and colon connections. Do not assume two displays with the same digit height use the same pinout or punctuation wiring.
Make a segment map before writing numbers
The conventional segment names are a through g, with a separate decimal-point connection where present. Draw the digit shape and record which physical pin controls each segment. For a clock display, map the colon separately rather than forcing it into an assumed decimal-point arrangement.
Verify one segment at a time with a suitably current-limited test circuit, using the actual display’s ratings. Keep the test current modest and avoid applying excessive reverse voltage while searching for pins. A random connection to a supply without current limiting is not a useful identification method.
Once the map is known, create a software lookup table for the digits zero through nine. Keep that logical table separate from the board’s pin assignment. Then a revised PCB can change its wiring without rewriting every displayed number.
Understand why multiplexing needs both timing and drivers
Multiplexing lights one digit at a time while sharing the segment-control lines. The controller rapidly repeats the sequence so the complete number appears continuous. Each digit is illuminated for only part of the cycle.
TI’s application report on LED indication and ghosting describes direct and multiplexed drive arrangements. A constant-current segment driver can simplify current control, while an appropriate digit-selection stage handles the combined current of the active digit.
That combined current is easy to overlook. If seven segments each carry an illustrative 5 mA during their on-time, the active digit’s common path carries 35 mA. Check the driver, transistor, connector and PCB path against the actual maximum segment combination.
Do not multiply the current limit by the digit count
A four-digit scan gives each digit roughly one quarter of the available time, less any blanking interval. It can be tempting to multiply the LED current by four to recover brightness. That is only valid if the display and driver explicitly permit the resulting peak current at the chosen pulse width, duty cycle and temperature.
The Kingbright CA04-41SURKWA data sheet is a useful example of how a display manufacturer specifies pulse-current conditions separately from continuous current. Its ratings belong to that particular red display and must not be transferred to the PMD Way blue display.
Use a resistor or suitable constant-current control for each segment path. A single resistor in a digit’s common lead makes current and brightness depend on how many segments are lit. Compare an “1” with an “8” to expose that problem.
Choose a predictable scan schedule
As an illustrative starting point, four digit slots of 1 ms each produce a 4 ms frame, or a 250 Hz complete-display refresh rate before accounting for blanking. The segment current still needs to suit that timing. This example is not a universal flicker-free or camera-safe setting.
Keep scan timing regular. A long delay for a button, sensor or serial message can leave one digit bright while the others disappear. A dedicated display driver or appropriately designed timer-driven scan can separate display refresh from the slower application tasks.
Update the displayed value separately from refreshing it. A clock may change its shown seconds once per second while the display continues scanning many times during that interval.
Blank between digits to reduce unwanted segments
A sensible sequence disables the current digit, changes the segment pattern, allows the required switching interval and then enables the next digit. Changing segment data while a previous digit remains active can briefly display the wrong pattern.
Ghosting can also involve charge stored in the circuit and the behaviour of the switching components. If timing changes do not solve it, inspect the driver design and waveforms rather than assuming all ghosting is a software delay problem. The TI application report discusses these electrical causes and driver approaches.
Bring up the display in stages
- Inspect the unpowered wiring and verify the common-anode or common-cathode arrangement.
- Test one segment on one digit at a controlled current.
- Test every segment and punctuation element individually.
- Display a fixed digit on each position without application logic.
- Run the multiplex scan and compare brightness across positions.
- Display patterns such as 1111, 8888 and alternating blank digits.
- Add the clock or measurement application while monitoring scan stability.
Check supply voltage and current with the highest intended segment load. Then test dimming and startup behaviour. If firmware stops during a scan, consider whether one digit could remain continuously energised at a current intended only for pulses.
Design the displayed information as well as the electronics
Decide how to show blank leading digits, negative values, overflow and invalid data. A four-digit display cannot show every number, and silently truncating a measurement can mislead the user. Use a documented error pattern or blank state where appropriate.
For a clock, verify the colon behaviour and distinguish a valid retained time from an unset clock. Save the segment map, driver configuration and scan timing with the schematic. That makes the finished display easier to test, repair and reuse in the next project.