Hi Jerome, The following is untested, but I think it will work. It requires the two LEDs, one resistor, and two of almost any kind of slilcon diodes (1N4148 would work fine). I think this circuit is simple enough to explain in words rather than attempting a schematic. The LED which should come on when the PIC pin is low should be connected from Vcc (5V) to point A, pointing away from Vcc. Between point A and point B we should have the two silicon diodes, pointing away from Vcc. Point B should be connected to the PIC pin by a resistor, and then the LED which should come on when the PIC pin is high should go between point B and ground, pointing toward ground. When the PIC pin is high, current flows through the bottom (closer to gnd) LED , limited by the resistor. The voltage at point B is about 2.5 V, and the voltage from Vcc to point B is also about 2.5, which is too low to put significant current through the combination of the top LED and two diodes. When the PIC pin is low, current flows through the top LED/diode combination, lighting the top LED. The voltage at point B will be about 5-(2.5+0.65+0.65)=1.2V, which is too low to light the bottom LED. When the PIC pin is tristated, there will be 5V across the combination of two LEDs and two Si diodes. Since the voltage is insufficient for the typical total voltage drop of this combination (2.5+2.5+0.65+0.65=6.3V), only a tiny current flows and there is no light. If your supply voltage can vary significantly (more than 0.5V, let's say), you might have to remove the resistor on the PIC pin and replace it with two resistors, between the top LED and Vcc and between the bottom LED and gnd. You might also need to use three Si diodes instead of two (just putting all three in series) if your supply voltage is higher than 5V or if you are using red LEDs and they are high efficiency. Please let me know if it works! Sean At 02:32 PM 9/10/01 -0500, you wrote: > Im trying to connect two LEDs to a pic port pin so that one lights >when the output is low, the other lights when the output is high, and they are >both off when the pin is tri-stated as an input. The first two >requirements are >easily met in a lot of ways but I cannot figure out a simple way to get both >leds off when the pin is put into a hiZ state. I am looking for a solution >that uses just a few extra transistors and resistors - not something with >PALs or OpAmps. > > I have spent a bit of time puzzling over this and I am overlooking >something obvious or it is not as simple as it seems. I think it can be >done using both a p-channel and n-channel mosfets. > > Does anyone have any simpler, more elegant ideas? > >Thanks, >Jerome Knapp > >-- >http://www.piclist.com hint: The list server can filter out subtopics >(like ads or off topics) for you. See http://www.piclist.com/#topics --------------------------------------------------------------- NetZero Platinum Only $9.95 per month! Sign up in September to win one of 30 Hawaiian Vacations for 2! http://my.netzero.net/s/signup?r=platinum&refcd=PT97 -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics