Very clever. I like that. Of course, you need the I/O lines, which for some reason in my designs I'm always short of (sigh!). Also at 20mA per segment you're close to the absolute maximum port current for the PIC, since you'll be trying to source 140mA. I guess it will work fine for smaller displays. Duty cycle is still 1:8, though. The kind of apps I've been building tend to revolve around outdoor use and quite large display panels where we're trying to eke out the last drop of brightness from the displays. > ---------- > From: John Payson[SMTP:supercat@MCS.NET] > Reply To: pic microcontroller discussion list > Sent: Friday, January 30, 1998 12:02 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: Driving LED's -- was Driving LCDs > > > This design will drive 8 digits and can be easily extended to larger > > digit counts. For 8 digits, the duty cycle is 1:8 which is about as > far > > as I like to go, brightness will suffer beyond this point. > > An alternative design will drive 8 digits (no DP's) with eight port > pins, > eight transistors, eight resistors, and no external chips. The > transistors > are wired as emitter-followers on the PIC's eight port pins and feed > the > commons on the eight digits. Each digit's segment wires connect to > the seven > port pins that don't drive that digit's common. The eight resistors, > between > the port pins and the segments, limit the display current. > > Assuming the displays are common-anode, you'd use NPN transistors. To > drive > a digit, you set its common wire HIGH, set the appropriate segment > wires LOW, > and let the other lines FLOAT. If you want decimal points, then you > can get > 9 digits with 9 I/O pins. > > By the way, if you're driving fewer than eight digits, you'll only > need one > transistor per display. If you're driving only a few digits and > you're using > low-current displays, you may be able to elide the transistors > entirely. In > this case, a common-cathode display drive may be preferred since the > PICs are > a little better at sinking than sourcing. >