- Discrete LEDs
- Dot/Bar LEDs
- Matrix LEDs
- 7-Seg LEDs
- Serial -- Software
- Serial -- Hardware
- RS-232 via the MAX3232
- I2C -- EEPROM
- I2C -- DS1307 Real Time Clock
- 1-Wire -- DS18B20, Powered, Single-Drop
- 1-Wire -- DS18B20, Powered, Multi-Drop
- 1-Wire -- DS18B20, Parasitic, Multi-Drop
- TI Link Protocol -- Calculator Demo
- Infrared Communication
- MIDI -- Output Demo
- MIDI -- Input Demo
- MIDI to Analog Synth
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