Ashley Roll wrote: > > > Another thought I just had (beware - its 2:30AM here, so > > sentience is not guaranteed) was to have the LED setup like: > > > > > > ^ V+ > > | > > === Cap > > ,-|<-, | > > PIC PIN >------+ +-----+ > > '->|-' | > > === Cap > > | > > V GND > > > > > > Then you float the pin.. When you want to light one of the > > LEDs you set the pins data register to either high or low and > > rapidly switch the pin between input and output. > > > > I've no idea if this would work, but you should be able to > > draw some power thought the caps and may get enough to light the LED. I really don't think it can work. You can only charge or discharge the caps through the leds, meaning that you will only be able to get an amber light when oscillating, never a red or green. My circuit below tries to circumvent this problem but was a 2 minute throw together and probably won't work in the configuration shown. BUT the idea is valid, ie, PIC pin tied low is green led on, then when oscillating; * short burst of LO pulls a chunk of charge from 0.1uF C1, via CX and the diode. With a larger CX value (1uF??) it should enable a decent percentage of charge pulled from C1 without lighting the green led. Then when PIC pin goes HI, current will flow through the red led (and some via R1 and CX). The only requirement to light the red led with ac is too make sure that we draw more charge from C1 with each short LO pulse than the charge we put back in with each HI pulse that lights the red led. Or any way we can discharge C1 without lighting the green led. Any thoughts? --------------------------------- circuit below --------------------------------- I have a feeling something like this could be made to work, with some fiddling, to drive a bi-colour led from one PIC pin. I don't know if it has any real merits compared to the usual solutions. At least it uses zero power in the "off" state if it could be made to work. -Roman +5v ------------------------------------*------ | ? 1N4148 | -----, ,-------CX--------*--|<----, R1 470 ohm | | | | | PIC | | '---RX---* | | | | | | | ,----|<---, | | | | | Green | | | |-----*-----* *----------*---------* | | | | | '---->|---' | | Red | | Bi-colour LED C1 0.1uF | | -----' | | Gnd ------------------------------------*----- ,--------, ,--------, ,--------, Red on = | | | | | | -' '--' '--' '-- Green on = (low) ------------------------------------- Both off = .................................... (high imp) -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu