Summary of Charlieplexing 7 segment displays using Microcontroller
This project demonstrates charlieplexing six 7-segment LED displays using an Atmel Tiny26 microcontroller to save I/O pins. While standard multiplexing requires 14 pins, this method uses only 9. The author notes that current-limiting resistors are omitted in this specific build due to the low duty cycle of multiplexing, but explicitly warns this is poor design practice for professional or long-term use.
Parts used in Charlieplexing 7-Segment Displays:
- Atmel Tiny26 microcontroller
- Six-digit seven segment display
- Transistors (for buffering)
This instructable describes how to charlieplex a bunch of 7-segment led displays.
Charlieplexing of discrete leds has been the topic of a few other instructables. The Charlieplexing LEDs- The theory and the How to drive a lot of LEDs from a few microcontroller pins comes to mind. They are both excellent and should be read by anyone that wants to gain a deeper knowledge of how charlieplexing really works.
Charlieplexing 7-segment displays is more or less the same as doing it with discrete leds, but with some changes to handle the fact that all the led segments have a common pin instead of being separate, and the need for buffering of the common output so the poor microcontroller can cope with the load.
Step 1: Why
Due to a shortage of available i/o-pins on the Atmel Tiny26 that I’ve used for the pulse generator project I couldn’t use the standard multiplexed way of doing this. The standard multiplex would require 14 i/o-pins – 8 for the segments (don’t forget the dot) plus 6 for the common anode/cathode of each display.
By Charlieplexing the displays I only need 9 i/o-pins and the displays are still muxed in a 1:6 way acheving the same brightness as standard muxing. Charlieplexing usually only light up one led at a time thus giving a reduced brightness if you want several leds to be (visibly) lit at the same time.
Of course I could have used a BCD–to–7segment decoder chip (74LS48) plus a 1-to-8 decoder (74LS138) but that would have been cheating, and i didn’t have any ’48ths as hand and I really wanted to be able to fit the pulse generator in an Altoids-like box.
Step 2: Disclaimer for bad design practices
Normally you must connect leds via a current limiting resistor in order to keep them alive for more than a few milliseconds.
Here I’m not using any resistors since the display is connected to the output pins of a microcontroller that normally can’t sink or source more than a few times the current the leds/displays can handle continuously. Since we’re multiplexing the displays they will only be on for 1/6’th of the time and can handle much more current than if they were on all the time.
In the following schematics and in my construction I’ve left out the current limiting resistors, both for the leds themselves and also the base resistor for the transistors.
Please note the following
It is a really bad construction practice to skip the current limiting and rely on luck and that duty cycle combined with the relatively low sink capability of the processor and the probable underrating of the leds maximum specs.
In anything that you do professionally, or just want to keep running for an extended period of time (longer than your first test run) one should adhere to good construction practices, read the datasheets and to the maths.
And read rgbphils comment about running leds over the rated current in the comments section of this instrucatble.
For more details, click: Charlieplexing 7 segment displays using Microcontroller
- Why was charlieplexing chosen over standard multiplexing?
Charlieplexing reduces the required I/O pins from 14 to 9 on the Atmel Tiny26 while maintaining brightness. - How many I/O pins does standard multiplexing require for this project?
Standard multiplexing requires 14 I/O pins, consisting of 8 for segments and 6 for common anodes or cathodes. - Does charlieplexing typically light up multiple LEDs simultaneously?
No, charlieplexing usually lights up only one LED at a time, which can reduce brightness if multiple LEDs need to appear lit. - What alternative chips could have been used for this setup?
A BCD-to-7segment decoder chip like the 74LS48 plus a 1-to-8 decoder like the 74LS138 could have been used. - Why were current limiting resistors omitted in this build?
Resistors were omitted because the displays are multiplexed to be on only 1/6th of the time, allowing higher current handling. - Is it safe to skip current limiting resistors in professional projects?
No, skipping current limiting resistors is considered bad construction practice and relies on luck and duty cycles. - What is the main drawback of not using current limiting resistors?
Relying on the processor's sink capability and duty cycle without resistors risks damaging components over extended periods.

