Charlieplexing is an electronics technique pioneered by Charlie Allen at Maxim in which relatively few I/O pins on a microcontroller can be used to drive a large number of devices, in my case LEDs. It has become known as Charlieplexing in his honour. This technique is possible because each pair of pic pins can be used either way around or made inputs which makes the pin high impedence and essentially invisible to the rest of the circuit.
With Charlieplexing, N output pins can be used to drive N x (N-1) LEDs. This is a huge advantage over a traditional multiplexed display. So for 72 LEDs we can use just 9 pins to address 72 pins, 9 x 8 = 72. A conventional matrix would need a 9 x 8 configuration or 17 pins to achieve the same result.
I started to design my first charlie clocks on this basis and they worked just fine.
An etched board and an assembled clock. This one is for a dual LED clock and uses all combinations of an 11 x 12 charlieplex to drive 132 LEDs.
After a few experiments and changes of layout, I discovered that a 72 LED clock face lends itself much better to twelve sets of six LEDs, although this means using more pic pins and intellectually is less satisfying. So if I used twelve outputs I found I could simplify any hand wiring, especially useful as I etch single-sided boards. Eventually I have settled on a system where the LEDs are divided into two sets of six cathode groups, with the six unused anodes on one side providing the cathodes for the other side. I can best explain this by means of a diagram:
Left: the 12 colours represent the wiring from the 12 pins from the microcontroller. Right: a PCB design derived from the concept.
The circuit layout includes the cathode resistors for each group of 6 LEDs, switches, watch crystal and caps, the PIC microcontroller, a 5v voltage regulator and its associated caps. That is the sum total components. The board measures 4″ or 100mm square.