December 5, 2026

Seven-Segment Display Multiplexing: 12 Pins Instead of 32, and the Current Math Behind It

A four-digit red seven-segment display glowing on a breadboard

A four-digit seven-segment display wired the obvious way needs 32 connections, one for every segment of every digit. Multiplexed, it needs 12. The trick is that only one digit is ever lit at a time, and the digits take turns fast enough that the eye sees all four at once. That trick has a cost most tutorials skip: each digit is lit only a quarter of the time, so it looks dimmer, and pushing more current to compensate runs straight into limits printed in the display’s datasheet. Working through the numbers with a common Kingbright display and the MAX7219 driver chip shows where those limits sit.

Video: Ralph S Bacon on YouTube

How one digit works

Eight LEDs and a common pin

A seven-segment digit is seven bar-shaped LEDs labelled a through g, usually plus an eighth for the decimal point. In a common-cathode display, all eight LEDs share one cathode pin; in a common-anode display, they share an anode. The Kingbright SC56-11EWA, a widely sold 0.56-inch red digit, is a common-cathode part with a right-hand decimal point, according to its datasheet (Kingbright spec DSAA5198).

To show a number, the circuit connects the common pin to ground and drives the anodes of the segments that should light. A “7” needs segments a, b and c. An “8” needs all seven.

What one segment wants

The same datasheet lists a typical forward voltage of 2.0 V, with a maximum of 2.5 V, at 20 mA, and a typical luminous intensity of 6,400 µcd at 10 mA. Its absolute maximum DC forward current is 30 mA per segment. A single digit driven directly is simple: eight resistors, eight microcontroller pins and one ground.

A brightly lit carousel at night in a park

Why multiplexing saves pins

Sharing the segment lines

With four digits, the matching segments of every digit are wired together: all four “a” anodes on one line, all four “b” anodes on another, and so on. That makes eight segment lines. Each digit keeps its own common cathode, which makes four digit lines. Eight plus four is 12, against 32 for four separately wired digits.

Taking turns

The controller then cycles: put the pattern for digit 1 on the segment lines, connect digit 1’s cathode to ground, wait, disconnect it; put digit 2’s pattern on the lines, connect digit 2, and so on. Only one cathode is ever grounded, so only one digit can light, and it shows only its own pattern even though the segment lines are shared.

The same arithmetic scales. Eight digits need 8 segment lines and 8 digit lines, 16 pins instead of 64.

The refresh rate

How fast is fast enough

If each digit stays on for 1 millisecond, a four-digit cycle takes 4 ms and repeats 250 times per second. At 2 ms per digit the rate falls to 125 Hz, and at 5 ms per digit to 50 Hz, which leaves little margin: any extra delay in the loop, such as a slow sensor read, stretches one digit’s turn and shows up as uneven brightness or visible flicker.

Digits Time per digit Full refresh rate
4 1 ms 250 Hz
4 2 ms 125 Hz
4 5 ms 50 Hz
8 0.156 ms about 800 Hz

What a dedicated driver does

The last row is what a commercial driver chip chooses. The MAX7219 datasheet from Analog Devices describes “a typical display scan rate of 800Hz with 8 digits displayed,” with a specified range of 500 to 1,300 Hz. At 800 Hz across eight digits, each digit is lit for about 0.156 milliseconds per scan. That is far faster than a typical hand-written Arduino loop with delay() calls, and the chip keeps it steady regardless of what the microcontroller is doing.

Close-up of a digital clock showing 2:05

The brightness trap

Duty cycle

A multiplexed digit is lit only part of the time. With four digits, each is on one quarter of the time; with eight, one eighth. If a segment is driven at 20 mA while lit, its average current is 20 ÷ 4 = 5 mA on a four-digit display and 2.5 mA on an eight-digit one.

Digits Peak current while lit Average current
1 20 mA 20 mA
2 20 mA 10 mA
4 20 mA 5 mA
8 20 mA 2.5 mA

So a four-digit display driven with the same resistors as a single digit delivers a quarter of the average current to each segment, and it looks dimmer. To get a 10 mA average back, each segment would need 40 mA while lit on four digits, or 80 mA on eight.

What the datasheet actually allows

This is where the Kingbright datasheet matters. Its absolute maximum DC forward current is 30 mA. It also lists a peak forward current of 160 mA, but that figure carries a note: it applies at “1/10 Duty Cycle, 0.1ms Pulse Width.” A four-digit display running at 250 Hz has a duty cycle of 1/4 and on-times of a full millisecond, ten times longer than the condition the peak rating was measured under. Neither part of that condition is met. The cautious reading is that for ordinary hobby multiplexing, peak segment current should stay at or below the 30 mA DC rating unless the timing actually matches the datasheet’s test conditions. On four digits that caps the average at 7.5 mA per segment.

The practical answer

The realistic choices are to accept a somewhat dimmer display, pick a more efficient LED colour or a display with higher rated luminous intensity, or move to fewer digits per multiplexing group. Improving contrast, for example with a tinted window over the display, is another option that does not involve driving the LEDs harder.

The current that goes through the digit pin

Eight segments at once

The other number that surprises first builders is the current in the common pin. When digit 3 shows an “8.” with all eight LEDs lit at 20 mA each, 160 mA flows through that digit’s cathode at once. That is far more than a typical microcontroller output pin is designed to sink, so the digit lines are normally switched with transistors, one per digit, while the segment lines can often be driven directly through resistors.

How the MAX7219 handles it

The MAX7219 builds that driver in. Its datasheet lists a digit drive sink current of 320 mA, with an absolute maximum of 500 mA, and a segment source current of typically 40 mA set for all segments by a single external resistor; the minimum resistor of 9.53 kΩ sets about 40 mA. The chip also warns against using its scan-limit register to blank digits, because scanning fewer digits changes the scan rate and brightness, and with three or fewer digits the datasheet lowers the maximum segment current (10 mA for one digit, 20 mA for two and 30 mA for three) to keep the digit drivers from overheating.

Assorted-colored LED lights

Driving it from a microcontroller

Doing it by hand

A software multiplexer is a short loop: for each digit, turn all digit lines off, set the eight segment lines to that digit’s pattern, turn that digit’s line on, then wait about a millisecond. Turning the digits off before changing the segment pattern matters. Without that step, the new pattern briefly appears on the old digit, which shows up as faint “ghost” segments on neighbouring digits. Driving the loop from a timer interrupt instead of delay() keeps the refresh steady while the rest of the program runs.

The polarity of the display decides the logic. On a common-cathode part like the SC56-11EWA, a segment lights when its anode line is driven high and its digit’s cathode is pulled low. On a common-anode display, everything flips: the digit’s common pin is switched to the supply and a segment lights when its line is pulled low. Code written for one type shows a scrambled negative of every number on the other, which is usually the first sign that the wrong part number went into the parts drawer.

Using a driver module

The easier route is a module that already carries a MAX7219 and eight digits:

As an Amazon Associate I earn from qualifying purchases. A commission may be earned if you buy through this link, at no extra cost to you.

The MAX7219 handles the scanning, the current limit and the digit drivers, and a microcontroller only sends the digit values when they change. Writing a multiplexer by hand once is the best way to understand what that chip is doing; using the chip is the best way to stop thinking about it.

Sources

  • Kingbright, SC56-11EWA datasheet (spec DSAA5198): https://media.elv.com/file/101515_sc56_11ewa.pdf
  • Analog Devices, MAX7219/MAX7221 datasheet (19-4452, Rev. 6): https://www.analog.com/media/en/technical-documentation/data-sheets/MAX7219-MAX7221.pdf

920 Posts

Peter Kalafatis writes and edits X9M8. He holds a bachelor's degree from LIU Post and a master's in Media Studies from The New School, with academic work in the philosophy of science, human behavior, AI, and memetics.

View All Posts

Leave a Reply

Your email address will not be published. Required fields are marked *