I'm sure we can drive a bi-colour led from one pic pin without having to resort to transistors. :o) Did you want to use the 3-pin led or the 2-pin (dual reversed) type? If you're talking volume production I can see advantages to using the 2-pin type, ie soldering, board cost, footprint etc. If you can spare some timeslice (2% ??) i'm sure it can be done with an RC system of some type. Is there a desired current limit for when the leds are off? -Roman Lawrence Lile wrote: > > Roman, > > Josh and I are in the same boat, so to speak. We are trying to drive the > dual LED with just one pin, on the cheap. > > Most dual LED's come in a common cathode arrangement, and the only way I > could figure out to drive both with one pin was to add a bunch of extra > compnents, specifically an NPN and PNP. > > I had another arrangement for driving 8 common cathode LEDs with 9 pins, the > one extra pin driving a PNP/NPN that turns on the green or the red > respectively. > > THis is another one of those impossible projects where every dime counts, > board space is limited, and if I were sane I'd just throw more pins and > money at it. > > With the kind of volumes my company does, if I spend a month's pay figuring > out how to save $0.10US in product cost, it is still worth it. > > --Lawrence > > ----- Original Message ----- > From: "Roman Black" > To: > Sent: Saturday, February 02, 2002 5:53 PM > Subject: Re: [PIC]: Driving a dual LED > > > 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 -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body