Charlieplexed LEDs


Charlieplexing is a clever idea which permits control of more LEDs than you have pins for. It all hinges upon the concept that there are two ways to prevent current from flowing through an LED and hence illuminating it: (1) apply reverse bias, or (2) put one or the other connecting pins into their tristate (high impedance) state. Otherwise, current will flow and light the LED.

If you check the schematic here, you'll note that three port pins are controlling six LEDs.


There's a nice article on Wikipedia should you wish to understand more of the theory. But PIC Micro Pascal contains a built-in unit to handle all the messiness automatically, so there's really no need to get your hands dirty if you simply want to make tracks quickly. Check out the source code for this project and you'll see what I mean; it's easy!

By the way, when you compile the code for this project, you'll get a warning/hint. You can ignore it. It's simply telling you that you've only used three pins thus far, and any others haven't been referenced by the Charlieplex unit. So what!

Click to get the source code.
Click to get the schematic PDF.

Next project: Bi-Colored and Tri-Colored LEDs 

No comments:

Post a Comment