charlieplexing

Charlieplexing LEDs with an AVR ATmega328

Charlieplexing LEDs with an AVR ATmega328

How many times has this happened to you? You have a little LED project with an AVR ATmega328 microcontroller (or Arduino) at its core and you need to light up a boatload.... A dingyload of LEDs. Maybe it doesn't happen a lot to you. It's happened on three recent projects for me. My latest two LED projects are a timekeeping piece that illuminates 21 characters from behind and a simple LED chaser thing.

As usual I wanted to keep the component count down on these projects. I also tend to prefer not to use a ton of ICs with busses between them and whatnot, if I can help it. So much darn soldering and stuff. Meh. Luckily, back in 1995, so the Wikipedia story goes, a super-smart dood named Charlie Allen at Maxim Integrated devised a super-ingenius way to control a large number of LEDs using a not-so-large number of microcontroller pins. The method is called, "Charlieplexing" and it seems a but daunting, at first, but it's not that bad once you figger it out.