Wow, i just worked this out a couple of days ago. Genius minds think alike, no? ;-) Here are your problems: 1. You need a limiting resistor to control current into the LED. 2. Your red and your green LED have different forward voltages. The LED I am getting from Kingbright has a forward voltage of 1.8 volts on red, 2.05 volts on green, at 10mA forward current in each case. Also, the green is about 1/5th as efficient as the red. The result will be, with the same resistor, the green will be much dimmer. I am building a sample board soon to test this idea. Kingbright L937SRSGW-RV. 3. You may end up adjusting the 2.5 volt supply to, say, 2.75 or 3 volts to get your LED's balanced. 4. Back-to-back LED's are not so common. but Kingbright does make them and are quick with samples. Most two-color LED's are three pin, like this: ---aDk--kDa--- | (My first piece of ascii art, Roman would be proud of me. ) 5. A lot of these dual color LEDs are low-efficiency types. I didn't find many suppliers for dual high efficiency LED's. I like the high efficiency types because they have more punch. You may be dissappointed with the color on some LED's - try them out in your application before deciding. 6. I never came up with a scheme to drive the standard, three-pin dual LED's with one PIC pin, without a bunch of external transistors. So I am stuck with the two-pin back-to-back dual LEDs, which may be specials but still cheaper than two transistors and several resistors, plus a square foot of board space. 7. 2.5 volt regulators are not so common, but they do exist. When all your PIC outputs are high, you'll be pumping current INTO your 2.5 volt supply, which it cannot regulate if it is a standard 3 pin regulator. I've got power to waste,so I just loaded the regulator with a resistor big enough to swamp the current sourced out of my PIC. If you are counting microwatts, this won't serve for you. Zeners stink below 3.9 volts, they don't have a sharp "knee", and don't regulate worth a darn. I gave up on them a while ago. Despite the problems, I am going ahead with a project with an array of 8 dual color LED's, red and green. The display will be lit up like Hong Kong at night. --Lawrence ----- Original Message ----- From: "Josh Koffman" To: Sent: Thursday, January 31, 2002 5:27 PM Subject: [PIC]: Driving a dual LED > 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? > > Thanks, > > Josh > > -- > A common mistake that people make when trying to design something > completely foolproof is to underestimate the ingenuity of complete > fools. > -Douglas Adams > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads