Hi Roman. Actually, it's to get two colours and one switch on only three wires. My goal is to remote mount these, and three wires is all I'd like to use. As well, I'd like to keep the remote unit as low parts as possible as I'd like to try and squeeze it in the shell of a connector. Looking over some of the other posts, I could use three pins to accomplish this, but I wonder if I could do it with two (two pins, three wires). The addition of a third colour would be cool, but not really needed. I'd like to keep it to two pins if possible, but it'll be cheaper and easier to go to a larger PIC than to add more wires. Of course, if there is no way to get this to work over a bunch of wire other than to start to add gates to the remote ends, then I have a problem. Josh -- A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. -Douglas Adams Roman Black wrote: > > Josh Koffman wrote: > > > > Hi all. I had an idea for driving a bi colour LED using only one pin. My > > basic idea is to get one switch and one bi colour LED (basically 2 LEDs > > back to back) to work over just 3 wires. Here is a pic of the remote end > > of this (drawn by hand as Roman has taken his page down): > > > > (-|>-)bi colour LED _=_ Switch > > ,--( )--,------------o o--, > > | (-<|-) | | > > | | | > > | | | > > | | | > > O O O > > 1 2 3 > > > > 1= PIC Output > > 2= +2.5 Volt > > 3= PIC Input > > > > Basically the idea is to float one end of the LED in the middle of the > > PIC output range so that when I output a low, one LED is forward biased, > > and when I output a high, the other LED is forward biased. If I want the > > LEDs off, I'd tristate the pin. > > > > So...will this work? I'd have to make sure the LEDs have a forward > > voltage of under 2.5V I guess. What will happen with the input pin? What > > will the PIC do with 2.5V on an input? Is that a high (because it is > > greater that .8V)? The other question is will this work over a long > > wire? Since the currents are so low, will line drop become a factor, > > making the voltage too low to forward bias the LEDs? I guess the other > > question is how to generate the 2.5V. Could I use a zener, or is there > > such a thing as a 2.5V zener? > > Is there a specific challenge? Like how to > drive the bicolour led in all 3 colours using > nothing more than one PIC pin? With variable > brightness on both the red and green it would > give a vary-colour display, cool effect for > a "limiting" light on an amp or a one-led > audio level meter. > > Or is it to get 2 colours and a switch all > on one PIC pin? > -Roman -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body