Multiplexing an LED display is a great way to cut down on the number of I/O pins you need to use on your microcontroller, etc. to drive the display. If you are using standard common-cathode 7-segment numeric displays, for example, you would hook the CC from each digit to a separate I/O pin, then connect each group of like-segments to their own I/O pin. If you had 5 digits, you would need 12 I/O pins instead of the 36 you would need if you connected each LED separately.

The great thing about LEDs is that since they are diodes they only light when the current flows in one direction. You can use this fact to cut your I/O pin count down even further. In our 5-digit example above you would only need 8 pins!

Normal Multiplexing:

Normal Multiplexing Schematic

 

This method is sometimes called “Charlieplexing”, named after the fellow (Charlie Allen) over at Maxim who wrote an application note about it.

Charlieplexing:Charlieplexing Schematic

The trick lies in the fact that each I/O pin on your microcontroller can be driven high, low or Hi-Z. Each pin can be used to drive a group of segments and a digit’s common cathode (or anode), depending on its polarity.

Just drive the right combinations of pins high, low or Hi-Z (set it as an input) to light the desired segment. For our example the combinations would look like this:

L (CC)
H (A)
H (B)
H (C)
H (D)
H (E)
H (F)
H (G)
Digit 1
0
7
6
5
4
3
2
1
Digit 2
1
7
6
5
4
3
2
0
Digit 3
2
7
6
5
4
3
1
0
Digit 4
3
7
6
5
4
2
1
0
Digit 5
4
7
6
5
3
2
1
0

Note: Set pins not listed as High or Low as inputs (Hi-Z).

Your schematic will look different depending on how many digits/segments you are driving. Here are the basic steps for creating your schematic:

  • Figure out how many drive pins you will need. This will be one more than either the number of digits or the number of segments per digit, whichever is greater. In our example we only had 5 digits, but we were using 7 segments. Therefore we needed 8 pins.
  • Start drawing your diagram. Draw the digits across the top and however many drive lines horizontally across the bottom.
  • Connect the CC (or CA) pins from each digit to a drive line. Make sure each digit is connected to one and only one drive line.
  • Now start with your first digit and connect all the segments to drive lines. Be sure to skip the one that already has the CC for that digit connected to it. Other than that, order doesn’t really matter.
  • Connect the individual segments for the remaining digits just like you did for the first one.
  • Once you are done, make a chart that lists what combination of pins is required to drive each segment. You will need this when you are writing your software.

That’s it! You are still multiplexing your display, lighting it one digit at a time, but you are using the power of the diode to do it using fewer pins.

Did you find this article interesting or useful? Why not share it!