CC Blog Quick Bits Resources

Charlieplexing

Written by Andrew Levido

Charlieplexing is a multiplexing technique that allows the control of the largest number of elements (usually LEDs) with the smallest number of microcontroller I/O pins. It takes advantage of the bidirectional property of most such I/O pins and the unidirectional nature of LEDs.

There are plenty of examples online, but I thought it might be interesting to look at how Charlieplexing differs from more traditional multiplexing techniques – and its advantages and disadvantages.

The term Charlieplexing was first used in a Maxim (now Analog Devices) application note 1880 “Charlieplexing – Reduced Pin Count LED Display Multiplexing” published in 2003. Charlieplexing is named for Charles Allen, an applications engineer at Maxim who suggested using it in certain parts. He was also responsible for defining the classic MAX232 series of RS232-TTL converters – so he has made significant contribution to our industry. The technique itself has roots that go back to the 1970s but until the advent of low-cost microcontrollers it was mostly of academic interest.   

Figure 1 shows a very basic classically multiplexed display consisting of 4 LEDs configured into 2 rows by 2 columns. The concept can be easily expanded to R rows and C columns to drive a total of RxC LEDs. I have omitted the series current limiting resistors for clarity.

Figure 1
Classic row-column multiplexing is simple to implement but is limited in the number of LEDs it can drive. The pin drivers need only be capable of sourcing and sinking current.

The microcontroller drives the display by sequentially setting each column driver low to enable each column in turn. As a given column is selected, the driver sets the row outputs high for each LED that should be on. If this multiplexing cycles fast enough the LED array appears to be lit steadily.

This type of multiplexing is often used to drive 7-segment displays. Seven (or eight if a decimal point is used) row drivers correspond to the display segments and one column driver is used for each digit. This arrangement makes the software side fairly straightforward since the digits are addressed in turn by selecting the column and the appropriate 7-segment code is placed on the row drivers.

This type of multiplexing can address a maximum of N2/4 LEDs where N is the total number of outputs. So, 4 outputs can address 4 LEDs, 6 outputs can address 9 LEDs, and 8 outputs can address 16 LEDs.

Looking closely at the circuit of Figure 1 we can see that the row-column scheme does not maximise the number of LEDs driven since there are no LEDs between row pins or between column pins. This is where we make the mental shift to Charlieplexing.

We have to throw out the concept of rows and columns and think instead of pin-pairs. We can put two LEDs between any two pins (one in either direction) and light them independently depending on which pin is driven high, and which is driven low. With three pins we could have 6 LEDs (two between pins 1 and 2, two between pins 2 and 3 and two between pins 3 and 1).

The pre-requisite for this to work in practice is the ability to tri-state any output other than the two connected to the LED we want to light. This means putting those pins in a high-impedance state – most easily achieved in a microcontroller by setting them to be inputs.

Figure 2 shows the circuit with 4 I/O pins controlling 12 LEDs. Again, current limiting resistors have been left out for clarity.  To switch a given LED on, the pin connected to its anode is set high, that connected to the cathode is set low and all others are tri-stated. The number of LEDs we can drive with Charlieplexing is N2-N. So, for 4 pins we can drive 12 LEDs, with 6 pins 30 LEDs and with 8 pins 56 LEDs.

Figure 2
Charlieplexing allows many LEDs to be driven from a relatively small number of microcontroller I/O pins. The pins must be capable of sourcing and sinking current, and of being tri-stated.

Note that with this topology, any LED that is forward biased between two active pins actually has at least one set of two other LEDs in series across it. For example, the LED marked A in Figure 2 has two sets of LEDs marked B and C in parallel with it. Charlieplexing relies on the voltage drop of the active LED preventing the other LEDs lighting. This means you usually have to place the current limiting resistors in series with the I/O pins. This can be a challenge if you have LEDs in the array with different characteristics.

There is another price to pay. If you want to display completely arbitrary patterns of LEDs, you have to effectively multiplex through each LED in turn. So, using our 4-pin examples, instead of scanning two columns for classic multiplexing, you have to run through all 12 possibilities. As this number grows the on-time for each LED reduces and higher current pulses are required to maintain brightness.

These limitations aside Charlieplexing is the optimum way to efficiently use a small number of I/O pins to drive a large number of LEDs.

“Wayback Machine,” April 24, 2016. https://web.archive.org/web/20160424053450/http://pdfserv.maximintegrated.com/en/an/AN1880.pdf.

Keep up-to-date with our FREE Weekly Newsletter!

Don't miss out on upcoming issues of Circuit Cellar.


Note: We’ve made the Dec 2022 issue of Circuit Cellar available as a free sample issue. In it, you’ll find a rich variety of the kinds of articles and information that exemplify a typical issue of the current magazine.

Would you like to write for Circuit Cellar? We are always accepting articles/posts from the technical community. Get in touch with us and let's discuss your ideas.

Sponsor this Article
+ posts

Andrew Levido (andrew.levido@gmail.com) earned a bachelor’s degree in Electrical Engineering in Sydney, Australia, in 1986. He worked for several years in R&D for power electronics and telecommunication companies before moving into management roles. Andrew has maintained a hands-on interest in electronics, particularly embedded systems, power electronics, and control theory in his free time. Over the years he has written a number of articles for various electronics publications and occasionally provides consulting services as time allows.

Supporting Companies

Upcoming Events


Copyright © KCK Media Corp.
All Rights Reserved

Copyright © 2026 KCK Media Corp.

Charlieplexing

by Andrew Levido time to read: 3 min