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.





