7 Segment Scan Jitter: Why Interrupt Timing Variation Creates Uneven Brightness
A multiplexed numeric display is a timing device before it is an optical one. Each digit is lit for a slice of every frame, and the perceived brightness of that digit is the product of the current and the fraction of the frame for which it is actually driven. When the slice varies from frame to frame, the average does not stay the same: some digits appear brighter, some dimmer, and the difference moves as the firmware workload changes. 7 segment scan jitter is the name for that variation, and it is one of the few display faults that cannot be found with a multimeter or repaired with a resistor. This guide explains where the variation originates, how it turns into a measured brightness difference, the timing and buffer limits that constrain the fix, the firmware patterns that reduce it, and the test that proves the result before release.
Quick Answer: Jitter Is a Duty Error
Brightness in a scanned display is proportional to the average current delivered to a segment, which is the instantaneous current multiplied by the duty fraction. If the scan loop runs on an interrupt with a fixed period, the duty fraction is stable and the display looks even. If the interrupt is delayed by another service routine, the digit that is currently on stays on longer, and the digit that should have been switched on waits. The brightness error is therefore not caused by the LED at all, it is caused by the difference between the intended dwell time and the delivered dwell time.
The practical threshold is perceptual rather than absolute. A variation of a fraction of a percent is invisible, a few percent is visible between adjacent digits when the display is viewed as a whole, and the eye is particularly good at detecting a moving difference, which is why jitter appears as flicker or as a shimmer rather than as a static imbalance.
Where the Timing Variation Comes From
Four sources account for most of it. The first is interrupt latency, which is the delay between the timer event and the first instruction of the handler and which grows with the number of higher priority handlers in the system. The second is handler duration variation, caused by conditionals inside the scan routine such as a branch that only runs when a value changes. The third is a long blocking operation that disables interrupts, most commonly a flash write, an EEPROM update or a blocking communication routine. The fourth is scheduling, where the scan is driven from a main loop that also performs other work and therefore inherits the variability of that work.
The fourth source is the one that appears in products that were never intended to be real time. A scan routine called from a cooperative main loop is fine until a new feature is added, and then the display develops a fault that has nothing to do with the display. Multiplex display interrupt timing is therefore worth writing into the firmware requirement as a stated period with a stated worst-case handler duration, rather than leaving it as an implementation detail of whoever writes the loop.

How Jitter Becomes a Brightness Difference
Consider a four-digit display refreshed at a fixed frame rate. Each digit receives a quarter of the frame in the ideal case, and the average current is the same for all four. Introduce a handler that occasionally takes twice as long as nominal, and the digit that was active during that overrun receives twice its intended dwell while the remaining three lose a share of theirs. The average across the frame is unchanged, so the total brightness of the display is correct while the distribution is wrong.
That is why a total-current measurement will not find the fault. An average reading across all digits is exactly the quantity that stays constant. What changes is the per-digit duty, and the difference is only visible with a measurement that resolves each digit separately. The 7 segment scan jitter brightness relationship is therefore best demonstrated with a photodiode on a single digit and an oscilloscope triggered on the frame, not with a luminance meter pointed at the whole panel.

Timing and Buffer Limits in the Scan Loop
Two limits bound what the firmware can do. The first is the minimum dwell time per digit, set by the driver's rise and fall behaviour and by the current the LEDs need to reach their rated output. Below that dwell the digit never reaches full current and dims even with perfect timing. The second is the frame period, which has to stay short enough that the display does not visibly flicker and long enough that each digit receives a usable dwell. The duty and frequency trade-offs discussed in the 7 segment display PWM dimming guide apply directly, because a scanned display is a PWM system with several channels sharing one time base.
The buffer limit is a separate constraint. A scan routine that reads a display buffer while the application writes to it can produce a frame that contains half of the old value and half of the new one. The requirement is therefore not only a stable dwell but an atomic update, so that a value change takes effect at a frame boundary rather than in the middle of one. The tearing symptom that results from a non-atomic update is described in the same terms as the visual artefacts in the multiplexed LED display EMI discussion, except that one is caused by switching noise and the other by software timing.
Firmware Patterns That Reduce Jitter
The first pattern is to drive the scan from a hardware timer interrupt with a fixed period and to keep the handler short enough that its worst case stays well inside that period. The second is to remove conditionals from the handler by precomputing the segment pattern for every digit and storing it in a table, so the handler performs the same number of operations every time. The third is to protect the handler from long blocking operations by scheduling flash writes and communication outside the scan window, or by using hardware that can complete those operations without stalling the CPU.
The fourth pattern is to measure rather than assume. A 7 segment ISR that records its own entry and exit timestamps into a small ring buffer costs a few microseconds per frame and produces a jitter histogram that can be reviewed during development. That histogram turns an argument about perceived evenness into a number, and it identifies which of the four sources is dominant before any code is restructured.
Test Pattern and Measurement
The test pattern should make the fault visible rather than hide it. Displaying the same character on all digits removes the content variable and leaves only the timing. Displaying a value that changes every frame exercises the update path and the buffer boundary. Displaying a pattern that alternates between two very different segment counts exercises the current load step, which is where supply interaction and electromagnetic effects enter the measurement.
Measurement needs three things: a photodiode or a fast phototransistor on one digit, an oscilloscope triggered from the frame, and a second channel on the digit drive line. This is a display dwell time measurement rather than a brightness reading, and the distinction is what makes the result attributable. The dwell time distributions for each digit can then be compared directly, and any difference in the distribution identifies which digit is favoured by the timing. A 7 segment display current consumption calculation is a useful cross-check, because the total current should stay flat even when the per-digit dwell does not, and a moving total indicates a different fault.

Four Failure Modes and Their Tests
| Failure mode | Symptom | Test that separates it |
|---|---|---|
| Interrupt latency | Random single-digit brightening | Log ISR entry timestamps across a minute |
| Handler duration variation | Regular imbalance between two digits | Count instructions per branch in the handler |
| Blocking operation | Display freezes or flashes during a write | Trigger the scope on the write event |
| Non-atomic buffer update | Half-updated value for one frame | Change a value every frame and record the frame |
Each row maps to a different repair, which is the reason for separating them before changing code. A blocking operation cannot be fixed by shortening the handler, and an atomic update cannot be fixed by increasing interrupt priority. The 7 segment display driver IC selection also matters here, because a driver with an internal scan oscillator removes the software timing dependency entirely at the cost of flexibility in duty control.
Frequently Asked Questions
What is 7 segment scan jitter and why does it matter?
It is variation in the dwell time each digit receives across successive frames, caused by interrupt latency or scheduling rather than by the LEDs. It matters because the eye detects the resulting difference as flicker or as an uneven panel even when the total current is correct.
Can jitter be seen with a luminance meter?
Not easily, because a meter measuring the whole panel averages across digits and the average is the value that stays constant. A photodiode on a single digit with a scope triggered on the frame shows the effect directly.
Does a higher scan frequency fix the problem?
No, because a faster frame shortens every dwell proportionally without making the dwells more equal. Raising the frequency can make flicker less visible while leaving the imbalance intact.
How much multiplex timing jitter is acceptable?
Acceptable means the dwell distribution for each digit is narrow enough that the brightness difference stays below the visible threshold for the application. It is a specification derived from the product, not a universal number.
Should the scan run in an interrupt or in the main loop?
An interrupt with a fixed period is the safer default because it isolates the scan from the variability of application work. A main-loop scan is acceptable only while nothing else in the loop can block.
Why does the display flicker only when a value changes?
Because the update path touches the buffer that the scan routine is reading, so one frame is assembled from two different values. Making the update atomic at a frame boundary removes the symptom.
Conclusion: Measure the Dwell, Then Fix the Cause
Uneven brightness in a scanned display is usually treated as an optical problem and is almost always a timing one. The evidence that settles it is a per-digit dwell distribution, and the four causes that produce it each require a different repair. A display that has been characterised this way stops being judged on how it looks in a meeting and starts being judged on numbers that hold across firmware revisions, temperature and supply variation.
Where the imbalance sits between elements of different area, the aperture mismatch covered in the decimal point brightness matching guide explains the remainder, since a small element at the same current density is perceived differently. To review a scan architecture or a display design against a specific flicker or evenness requirement, describe the frame rate, digit count and driver through the HOUKEM inquiry page.
7 Segment Display Tearing: Keeping Multi-Digit Values Consistent
7 Segment Perceptual Dimming Table: Mapping Software Duty to Visible Steps