7 Segment Perceptual Dimming Table: Mapping Software Duty to Visible Steps
7 Segment Perceptual Dimming Table: Mapping Software Duty to Visible Steps
A numeric display dimmed by writing duty values straight into the scan timer looks wrong at the bottom of its range. The first steps of a linear ramp seem to do nothing, then the display drops away abruptly over the last few, and a product that offers ten brightness levels ends up with six that a user can distinguish. The reason is that the duty command and the perceived brightness are different quantities, and the mapping between them is not a straight line. This guide covers how to build a 7 segment perceptual dimming table, where the scan structure constrains it, what fails when the table is built badly, and how to validate it with firmware rather than with a bench supply.
Quick Answer: Interpolate Between Calibrated Anchors
A practical perceptual dimming table is a short list of measured anchor points, one per user-visible brightness step, with duty values chosen so that the difference between adjacent steps is roughly constant to the eye rather than to the timer register. Ten to sixteen anchors are enough for a numeric display, interpolated only if the firmware needs finer intermediate levels than the user can select.
Two things make the table usable. The anchors are measured on the real display behind the real window, not derived from a formula and a datasheet, and the table is stored in the units the firmware actually writes, so no runtime conversion sits between the stored value and the timer. A table that needs a conversion at every update will drift from its calibration as soon as the conversion is optimised.
Required Display Behaviour and the Step Count
Start from what the user must be able to do, not from the timer resolution. A display that needs a night mode, a daylight mode and a handful of intermediate settings needs a specific number of distinguishable levels, and that number sets the anchor count. Specifying "256 brightness levels" when the eye can distinguish perhaps a dozen over the usable range produces a specification that cannot be tested and a table that is mostly wasted.
Within the usable range, the requirement should also state how even the steps must be. A perceptual dimming 7 segment specification that names a target ratio per step and a tolerance is testable; one that asks for smooth dimming is not.
The usable range also has to be stated. Below a certain duty a numeric digit stops being legible in the intended ambient, and above a certain level the display is at full brightness with nothing left to gain. The table should cover the range between those two limits, with the endpoints defined by the application rather than by the register width.
Update and Scan Architecture Constraints
Duty is not free in a multiplexed display. Each digit is on for a share of the scan period, and the duty used for dimming sits on top of that share rather than beside it. As the requested brightness falls, the on-time available to hold a clean digit shrinks toward the point where ghosting, reduced contrast or visible flicker appears, and that point limits how deep the table can go.
The resolution the timer can express also depends on the scan. A scan structure that leaves a short digit window gives few timer ticks per digit, so the lowest usable duty is coarse and the table's bottom anchors collapse onto one another. Raising the scan frequency makes this worse; lowering it improves resolution but risks flicker. That trade is the subject of 7 segment display PWM dimming, and the dimming table has to be built after it is settled rather than before.
A second constraint is update atomicity. Changing duty mid-scan for a subset of digits produces a visible brightness difference between digits for one frame. The table should be applied at a frame boundary, with the new values latched together, or the digits should be updated in a fixed order that completes within one frame.

Building the 7 Segment Dimming Table
The build has four steps, and skipping the third is what produces tables that look calibrated and are not. It is worth separating two jobs that are often merged: a 7 segment dimming table maps user-visible levels to register values, while a perceptual brightness steps LED display requirement states how large each step must be to the eye. The first is built to satisfy the second.
Step one: fix the anchors. Decide the number of user-visible steps and the nominal relative brightness each one targets. A geometric progression is a reasonable starting hypothesis because perception is closer to ratio-based than to absolute, but the progression is only a starting point.
Step two: estimate the duty for each anchor. Apply the display's own transfer characteristic to convert a target light output into a duty value. On a display driven at constant current this is close to a power law, with the exponent somewhere between one and about two and a half depending on the emitter and the optics; that exponent is what people mean by a gamma-like curve.
Step three: measure and correct the anchors. Set each estimated duty on the real hardware, measure the resulting luminance at the intended viewing condition, and adjust the duty until the measured luminance matches the target ratio. The estimates from step two will be wrong at the low end because leakage current, driver minimum on-time and the window's own light spill all contribute a floor that no formula includes.
A LED display brightness lookup table is the same artefact in a different format. Whether the values sit in a lookup table, a switch statement or a computed curve, the question is identical: were the anchors measured on this hardware, and does the lowest one still meet the legibility requirement?
Step four: store the corrected values. Write the corrected duties into the table in the register units the firmware uses, in ascending order, and record the measurement condition beside the table in the design file so a later change of window or LED bin can be compared against it.

Failure Modes and Test Patterns
Four failures account for most of the complaints about a dimmed numeric display, and each has a test that finds it.
| Failure mode | What the user sees | Test that exposes it |
|---|---|---|
| Undersized low anchors | The bottom two or three levels look identical | Step through every level at the intended ambient and check that each change is perceptible |
| Over-deep table | The lowest levels ghost, lose contrast or flicker | Run the lowest level with all segments lit and inspect for cross-digit leakage |
| Non-monotonic table | A step up looks dimmer than the one before it | Measure luminance at every level and check the sequence is monotonic |
| Per-digit inconsistency | Digits in one value look different at low brightness | Display the same digit in every position at the lowest level and compare across positions |
A gamma correction numeric display approach that applies an exponent in firmware at every update is the usual alternative to a stored table. It costs a calculation per frame, it assumes a fixed transfer characteristic, and it cannot accommodate the measurement floor at the low end; a stored table can, which is why the measured route is preferred once the display format is fixed.
Non-monotonic tables are almost always an interpolation artefact rather than a measurement error, which is why the table should be stored as measured anchors with interpolation defined explicitly between them. A clamped or rounded interpolation can produce a plateau, and a plateau at the low end is exactly what the table was built to remove.
Per-digit inconsistency has an optical cause as often as an electrical one. The decimal point and the digits beside it do not share an area or an aperture, so they do not dim along the same perceived curve even when the duty is identical; that mismatch is covered in decimal point brightness matching and has to be handled before the table is finalised, because a table tuned against the digits will make the decimal point either too bright or too dim.
Firmware Validation Before Release
The table lives in firmware, so the validation has to run on the product rather than on a bench sample driven by a signal generator. A fixed-duty bench sample proves the display, not the table.
Four checks are worth automating. Walk every level in both directions and log the commanded duty and the measured luminance, so monotonicity is checked over the whole range rather than at sampled points. Change level during a live update and confirm no frame shows mixed brightness across digits. Exercise the transitions at the temperature extremes, because the emitter's output and the driver's accuracy both shift and a table calibrated cold will not be correct hot. Finally, confirm that the lowest level still meets the legibility requirement in the brightest ambient the product specifies, since a table built in a dark room tends to over-dim.
The transfer characteristic that the table is trying to invert is itself not a single curve. Where the display is also corrected for linearity at the driver level, the two corrections can multiply and produce a response that is neither; the interaction is described in LED dimming linearity and should be settled before the perceptual anchors are measured.

Frequently Asked Questions
What is a perceptual dimming table for a 7 segment display?
It is a stored list of duty values, one per user-visible brightness step, chosen so that the perceived change between steps is even. It replaces the straight-line mapping between a brightness level and a timer register.
Why is a linear duty ramp wrong?
Because perceived brightness does not scale linearly with on-time, so equal duty increments produce large visible changes at the top of the range and almost none at the bottom. A linear ramp also tends to make the lowest levels indistinguishable.
How many brightness levels should a numeric display offer?
As many as the user can actually distinguish in the intended viewing condition, which is usually a dozen or fewer over the usable range. More levels than that increase firmware complexity without adding a perceptible step.
Can the table be computed instead of measured?
It can be estimated, and an estimate is a reasonable first pass for the upper anchors. The low end still needs measurement, because leakage, driver minimum on-time and light spill from the window create a floor that no formula captures.
Does a dimmed display change colour?
It can shift slightly at very low duty, and how much depends on whether the driver holds current constant during each pulse. The mechanisms and their limits are covered in the guidance on LED dimming linearity and on PWM dimming.
Can HOUKEM help define the brightness range before firmware is written?
HOUKEM supports customized LED displays with brightness, wavelength and drive conditions defined on an approved drawing for the applicable project. Send the display format and the intended viewing conditions so the achievable range can be confirmed before the table is built.
Conclusion: Measure the Anchors, Lock the Table
A perceptual dimming table is a calibration artefact, not a formula. Fix the number of visible steps and the usable range, estimate duty from the display's transfer characteristic, then measure and correct each anchor on the real hardware behind the real window. Store the corrected values in register units, apply them at a frame boundary, and validate the whole range in both directions at both temperature extremes. A display built that way dims smoothly because the steps were measured, not because the curve was assumed.
To have the brightness range, step count and dimming behaviour defined alongside the display specification, send the display format and viewing conditions to HOUKEM for a project review.
7 Segment Scan Jitter: Why Interrupt Timing Variation Creates Uneven Brightness
7 Segment Resistor Placement: One Per Segment vs Shared Resistors