Hey that's a neat trick. For those who missed it, drive two leds off one
port pin by not pulsing for neither led, pulsing high to tri-state for one,
low to tristate for the other, or high to low for both. Thanks, Mike.
Sorry, don't understand. Could you do an ASCII drawing please?
Sorry, ASCII impaired.
Take a 12C671 (or F variant), an 8 pin pic. You use AN0 as the analog
input. You use GP1,2,4,5 as the 4 outputs. There are 12 ways you can
hook a led across 4 pins (you use a current limit resistor in each of
the 4 legs). You have a software comparison chain to trigger one of
these combinations for each of 12 voltage ranges between [0..255]
out of the a/d converter. You choose your own breakpoints.This gives
you a flying dot display with 12 dots. Using time division mpxing you
can get a bargraph instead of dots. For more leds, use a bigger PIC. A
12 dot display using a <$2 chip appeals to me.
Thanks Mike.
I understand exactly what you say above, the bit where I'm
having trouble is the top paragraph with driving 2 LEDs from
one port pin. Are both anodes connected to the pin or
both cathodes or one anode and one cathode - whichever
way, I cannot see how to drive the 2 from one pin???