3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Charlieplexing 7 segment displays

Step 4Charlieplexed displays

Charlieplexed displays
As shown in the previous step we needed 14 (or 16 if we had 8 displays) connections to the microcontroller to control 6 displays.

If we instead use the Charlieplexing technique we can reduce the connection count to just 9, this regardless if we have 2, 3, 4, 5, 6 ,7 or even 8 displays.

The drawback of using Charlieplexing is that the connections to the displays is a bit more complex and the software that will scan each display one by one will also become somewhat more complex. But hey! If you can save 7 output pins on the microcontroller I think a couple of more lines of code is a cheap price. As you can see in the software step in this instructable the scanning software isn't really that complex and can easily be implemented in your language of choice.

The hardware is actually the same as in the standard multiplex example only some of the connections are changed.

The major change is that an additional line for the segments is added. On the first display the new line is connected to the A-segment, on the second display the B segment and so on. All other segments are connected as usual. All A's together, All B's together (with the exception of previously mentioned specials)...

The transistor for the first display is then connected to the the line where the A-segment should have been. The transistor for the second display is connected to the line where the B-segment should have been and so on.

To address on of the displays now the processor have to first output a high value on the line that its transistor is connected to, then output a low value on the lines that are connected to the segments that should be lit and disconnect (high impedance) the lines for the segments that should be off.

The last part is the most important here, because if the processor would output a high level for the segments that should be off the transistors connected to those segments would also be activated and cause some other displays to be activated at the same time. And that is not a good thing. Multiplexing always relies on that only one display at a time is activated. One by one in a rapid fashion so the brain/eyes gets fooled and thinks that they are all on at the same time.

Since each display is connected in a slightly different way than the others the scanning software must handle this by special code for each display.

« Previous StepDownload PDFView All StepsNext Step »
3 comments
Mar 18, 2009. 5:44 PMDuFFxP93 says:
Yo dude, I have a TI MSP430 with 8 I/O pins n I'm trying to control (4) 7-segment displays. I only need the 7 segments (no dot) and it seems according to this way of charlieplexing that it might be possible after all. Could you help me understand how exactly the charlieplexing works in simpler terms. It seems to me that if you power one of the segments with another segment's transistor on the same wire, you'd get some unwanted results, unless i'm totally confused.
Feb 21, 2011. 6:35 AMdantu says:
Hi DuFFxP93,

I was quite confused at first, but I think I've got it. The real trick is to realize that the uCPU lines are actually tri-state: high, low, and high-impedance (disconnect). This design takes advantage of all 3 states. Using this matseng has used HIGH to select a display and LOW to select a segment:

1. The "sink" on each display is connected to a DIFFERENT line (look very closely at the diagram). You drive this line HIGH to select the display.

2. Now, the actual segments are wired almost like normal, except that one of them will no be connected to the new data line (the one that would have been connected to the line you just drove high). You need to drive the segments you want on LOW.

3. Unlike a standard design, you MUST set the segments you don't want enabled to high-impedance (singe high would select a 2nd display, and low would select another segment).

PS: matseng - very clever, and useful!
Jul 13, 2008. 3:37 PMUnit042 says:
Awesome 'ible! Have you thought of using a demultiplexor for LED alphanumeric display selection?

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
12
Followers
10
Author:matseng
Swedish expat living now living in Malaysia after spending some years working in Dubai.