ArticleslgStudy

engineering

Charlieplexing

Charlieplexing is a engineering topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Charlieplexing rather than just read about it. In short: Charlieplexing (also known as tristate multiplexing, reduced pin-count LED multiplexing, complementary LED drive and crossplexing) is a technique for accessing a large number of LEDs, switches, micro-capacitors or other I/O entities, using relatively few tri-state logic wires from a microcontroller. These I/O entities can be wired as discrete components, x/y arrays, or woven in a diagonally intersecting pattern to f…

Charlieplexing — main illustration
Charlieplexing — illustration

Key takeaways

  • Charlieplexing belongs to engineering; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Charlieplexing to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Charlieplexing from memory before moving on to harder problems.

Reference excerpt

Charlieplexing (also known as tristate multiplexing, reduced pin-count LED multiplexing, complementary LED drive and crossplexing) is a technique for accessing a large number of LEDs, switches, micro-capacitors or other I/O entities, using relatively few tri-state logic wires from a microcontroller. These I/O entities can be wired as discrete components, x/y arrays, or woven in a diagonally intersecting pattern to form diagonal arrays.

Etymology Although the technique was introduced in 2001 by Maxim Integrated, the name "Charlieplexing", however, first occurred in a 2003 application note. It was named after Charles "Charlie" M. Allen, an applications engineer of MAX232 fame, who had proposed this method internally.

Origin The Charlieplexing technique was introduced by Maxim Integrated in 2001 as a reduced pin-count LED multiplexing scheme in their MAX6951 LED display driver. Also in 2001, when the name "Charlieplexing" became common, Don Lancaster illustrated the method as part of his musings about the "N-connectedness" problem, referring to Microchip Technology, who had already discussed it as "complementary LED drive technique" in a 1998 application note and would later include it in a tips & tricks booklet. While Microchip did not mention the origin of the idea, they might have picked it up in the PICLIST, a mailing list on Microchip PIC microcontrollers, where, also in 1998, Graham Daniel proposed it to the community as a method to drive rows and columns of bidirectional LEDs. Daniel at the time had created simple circuits with PIC 12C508 chips driving 12 LEDs off 5 pins with a mini command set to set various lighting displays in motion. The method, however, was known and utilized by various parties much earlier in the 1980s, and has been described in detail as early as in 1979 in a patent by Christopher W. Malinowski, Heinz Rinderle and Martin Siegle of the Department of Research and Development, AEG-Telefunken, Heilbronn, Germany for what they called a "three-state signaling system". Reportedly, similar techniques were already in use as early as 1972 for track signaling applications in model railroading. Display multiplexing is very different from multiplexing used in data transmission, although it has the same basic principles. In display multiplexing, the data lines of the displays are connected in parallel to a common databus on the microcontroller. Then, the displays are turned on and addressed individually. This allows the use of fewer I/O pins than it would normally take to drive the same number of displays directly. Here, each "display" could, for instance, be one calculator digit, not the complete array of digits. With traditional multiplexing N I/O pins can drive a maximum of (N2)2=N24 LEDs, or listen to that many input switches. Charlieplexing can drive N2−N LEDs, or listen to N2−N2 buttons even if directionality is not enforced by a diode.

Tri-state multiplexing (Charlieplexing)

The Charlieplexing configuration may be viewed as a directed graph, where the drive pins are vertices and the LEDs are directed edges; there is an outward-pointing edge connected from each vertex to each other vertex, hence with n drive pins there are (n)(n-1) total edges (a pronic number). This equates to n pins being able to drive n2 − n segments or LEDs.

If the number of LEDs (L) is known, then the number of pins (n) can be found from the equation: n=⌈1+L⌋, the result being rounded to the nearest whole number. Example: If L = 57, then √L = 7.549, and 1 + √L = 8.549; the nearest whole number to this is 9, so 9 pins are needed to drive 57 LEDs (9 pins could drive up to 72 LEDs, but 8 pins could drive only 56 LEDs at most). If L = 56, then √L = 7.483, and 1 + √L = 8.483; the nearest whole number to this is 8, so 8 pins are needed to drive 56 LEDs.

Origin of the (n2 − n) equation in Charlieplexing

Unlike in a traditional x/y multiplexed array, where a sub-set of conductive elements crosses a different sub-set of conductive elements, in a "fully Charlieplexed" multiplexed array, each conductive element crosses every other conductive element. Six (n) conductive elements in a standard x/y multiplexed array forms a maximum of nine ((n / 2)2) unique intersections (see figure on far left). The other diagrams also show six (n) conductive elements, but here all six elements cross over themselves, forming a multiplexed array of 36 (n2) intersections. LEDs are shown placed at every intersection. However, each conductor also crosses itself at the diagonal. Horizontal conductor 1 crosses vertical conductor 1, horizontal conductor 2 crosses vertical conductor 2, etc. This means that six of these LEDs are short-circuited (e.g. D1 and D5 are short-circuited). The six (n) diagonal LEDs will, therefore, never light up, because no voltage can ever develop across them, so (n) has to be subtracted from the total. There is no point in installing these LEDs (they are simply included here for illustrative purposes). This leaves 30 LEDs (n2 − n) that can be uniquely addressed and lit up independently. Conductor "a" crossing conductor "b" is distinguishable from conductor "b" crossing conductor "a" because LED polarity is reversed. For example, when conductor 3 is positive and conductor 2 is negative, current flows through, and lights up LED D8, but when conductor 3 is negative and conductor 2 is positive, current flows through, and lights up LED D9. These reverse polarity LED pairs are called complementary pairs. This diagram has 15 complementary pairs, allowing 30 LEDs to be lit independently.

… excerpt ends here. Continue reading the full article.

Illustrations

Charlieplexing: Illustrates how a diagonal array enables nearly twice as many unique intersections as an x/y array.
Illustrates how a diagonal array enables nearly twice as many unique intersections as an x/y array.
Charlieplexing: A Charlieplexed digital clock which controls 90 LEDs with 10 pins of a PIC 16C54 microcontroller.
A Charlieplexed digital clock which controls 90 LEDs with 10 pins of a PIC 16C54 microcontroller.
Charlieplexing: A symmetric layout of Charlieplexed LEDs. On left, 3 pins drive 6 LEDs arranged in a triangle. On right, 4 pins drive 12 LEDs arranged in a tetrahedron.
A symmetric layout of Charlieplexed LEDs. On left, 3 pins drive 6 LEDs arranged in a triangle. On right, 4 pins drive 12 LEDs arranged in a tetrahedron.
Charlieplexing: Six conductors allow nine LEDs to be individually controlled in a standard x/y multiplexed array, but 30 LEDs in a "Charlieplexed" array.
Six conductors allow nine LEDs to be individually controlled in a standard x/y multiplexed array, but 30 LEDs in a "Charlieplexed" array.
Charlieplexing: n I/O forms a n (n - 1) Charlieplexed "off-set" x/y LED array.
n I/O forms a n (n - 1) Charlieplexed "off-set" x/y LED array.

Worked examples

Example 1 — a first encounter with Charlieplexing

Start with the simplest possible case. Write down what Charlieplexing claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In engineering, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Charlieplexing before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Charlieplexing ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Charlieplexing

In research
Charlieplexing appears in engineering research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Charlieplexing in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Charlieplexing is common in secondary-school and first-year university syllabi. It links to neighbouring topics Digital circuits, so understanding it makes those chapters shorter.
In everyday life
Look for Charlieplexing outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Charlieplexing” →

How to study Charlieplexing in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Charlieplexing means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Charlieplexing out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Charlieplexing in simple terms?

Charlieplexing (also known as tristate multiplexing, reduced pin-count LED multiplexing, complementary LED drive and crossplexing) is a technique for accessing a large number of LEDs, switches, micro-capacitors or other I/O entities, using relatively few tri-state logic wires from a microcontroller…

Why does Charlieplexing matter?

Because it connects several engineering ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Charlieplexing?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Charlieplexing.

Tags

  • Digital circuits

Keep exploring