Tom=E1s =D3 h=C9ilidhe wrote: > I've already got a 40-pin chip and I'm out of pins. There are plenty of 64 and 80 pin PICs. > Please elaborate on "external hardware". I don't want to get into this too much since I'm not convinced this whole idea makes sense. However, imagine a resistor divider from a PIC output to the base of a transistor to ground (for NPN) or to Vdd (for PNP). You can arrange the divider so that the transistor is off when 2.5V is applied but on when 5V (NPN case) or 0V (PNP case) is applied. Put both the NPN and PNP circuits driven from the same PIC pin, and you've got three states. One transistor is on, the other on, or neither. How to turn that into LED drive is left as a exercise to the reader (hint: it's not as trivial as you probably think). There are other possibilities, like a both a NPN and PNP emitter follower to a 1/2 Vdd voltage divider. You could use a I/O expander. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist