The two zener approach is clever, but a little more expensive. It's also true that the power dissipation in the voltage divider is higher than that in the PIC due to leakage current when the input is trisated. Another trick (but, again, a bit more expensive) is to use a "rail splitter" virtual ground (like http://focus.ti.com/docs/prod/productfolder.jhtml?genericPartNumber=TLE24 26). This is pretty much a voltage divider followed by an op-amp voltage follower. But, again, cost is higher. So, there are some neat tricks out there! Harold On Fri, 6 Sep 2002 16:34:49 +0100 Morgan Olsson writes: > Hej Harold Hallikainen. Tack fvr ditt meddelande 15:09 2002-09-06 > enligt nedan: > >Another trick on 2 pin bi-color LEDs is to put a couple resistors > in series (I use about 240 ohms) between +5V and ground. Put the LED > between the junction of the resistors and the PIC pin. Tristate the > pin to turn the LED off (note that PIC power dissipation will go up > a bit since the pin is held at half Vcc by LED leakage current). > > The bigger power waste is that current also flows in the resistor > that is parallel to th elit diode. And when both are off, current > flows in both resistors. > > One method is to replace both resistors with zeners, and add one > current limiting resistor in series with the led. (if we don4t dare > to rely on totla series resistnace of PIC+LED+zener, which i don4t). > FCC Rules Online at http://hallikainen.com/FccRules Lighting control for theatre and television at http://www.dovesystems.com Reach broadcasters, engineers, manufacturers, compliance labs, and attorneys. Advertise at http://www.hallikainen.com/FccRules/ . ________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/web/. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.