- 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
LED Bar Graph -- Direct Drive
Now we turn our attention to LED bar graphs, where more than one element is lit at a time. It makes sense to start with a direct-drive approach, being the simplest from a theoretical standpoint.
In this case, we're back to using ten port lines again: PortB.0 through PortB.7 along with PortA.0 and PortA.1. The PMP code is very simple, of course.
Driving all ten LED elements at the same time is a bit problematic for the PIC16F88, so to be safe we'll use our trusty Darlington pair arrays again (IC2 and IC3) to boost the available current. See the schematic.
Since more than one bar is lit at a time, we'll need a resistor for each, of course.
Click to get the source code.
Click to get the schematic PDF.
Next Project: LED Bar Graph -- Multiplexed