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

No comments:

Post a Comment