Skip to main content
PartAndStock
Fundamentals

What Are LED Multiplexing and Charlieplexing?

LED multiplexing is a row/column scanning technique to drive many LEDs with few pins; charlieplexing uses tri-state pins to drive n×(n−1) LEDs with n pins. Persistence of vision, brightness, current limiting.

3 min read

LED multiplexing (scanning) is a technique for driving many LEDs with a small number of microcontroller pins by arranging the LEDs in rows/columns and switching them on and off very rapidly in sequence (scanning). Thanks to persistence of vision, the eye perceives the rapid scan as steady light.

How Matrix Multiplexing Works

With N row and M column pins you can drive N×M LEDs; but only one row is active at any instant. The microcontroller scans the rows very rapidly in sequence (e.g. the whole display >100 times per second): write row 1's column data, light the row, turn it off; move to row 2… This way 8×8 = 64 LEDs can be driven with 8+8 = 16 pins. For larger displays a shift register or a dedicated LED driver (e.g. the MAX7219) is used to drive the rows/columns.

Charlieplexing: More LEDs Than Pins

Charlieplexing exploits the fact that microcontroller pins can be tri-state (high / low / high-impedance "input") and that an LED conducts in only one direction (a diode). With this method you can drive n×(n−1) LEDs with n pins: 3 pins → 6 LEDs, 4 pins → 12 LEDs. Only one LED (or group) is lit at a time; the remaining pins are set to high-impedance to remove them from the circuit, and two pins are driven to match the target LED's direction.

Persistence of Vision and Brightness

The scan must be fast enough that the eye doesn't notice flicker (in practice ≳100 Hz for the full frame). But because each LED is lit only a fraction of the time (1/N), the average brightness drops; to compensate, the instantaneous current is raised during the scan or a driver IC is used.

Where Is It Used?

7-segment display panels, LED dot-matrix displays (MAX7219 modules), clock/counter displays, small LED animation boards. Keypad scanning works with a similar row/column logic (see multiplexer).

Things to Watch Out For

  • Current limiting required: Multiplexing saves pins but you still need a current-limiting resistor for each row/segment; don't connect an LED directly to a pin.
  • Brightness drop: Since the duty cycle is 1/N, brightness falls; this becomes noticeable with many rows.
  • Flicker: If the scan is slow the eye notices flicker; keep the refresh rate high.
  • Charlieplexing limits: One LED at a time, risk of leakage/ghosting and the pin current limit make it unsuitable for large/bright displays; for those a driver that does multiplexing in hardware (MAX7219) is preferred.
  • Pull-up effect: On scan lines, pull-up/pull-down and pin states must be managed carefully to avoid unexpected paths.

Frequently Asked Questions

What's the difference between multiplexing and charlieplexing?
Classic matrix multiplexing drives N×M LEDs with N+M pins (one row at a time). Charlieplexing exploits the three pin states to drive n×(n−1) LEDs with n pins — fewer pins, but more complex and low-power.

Why do the LEDs look continuously lit?
Because the scan is faster than the eye's persistence of vision, we perceive individually-lit LEDs as steady light.

To drive large displays easily, look at an LED driver (MAX7219) and shift registers.

Search parts related to "What Are LED Multiplexing and Charlieplexing?"

Find the right part by comparing price, stock and distributors.

Search These Parts