Why stop at 1 A2D per tristate pin ? I have a couple of PRETESTED macros gathering mushrooms to do two A2D per pin. Needs a couple of diodes and a feed back resistor. Regards, Graham Daniel. Scott Dattalo wrote: > I tried a variation of this (the above code has not been tested) to cut > the number I/O pins in half needed for Byte Craft Tip #4. BC tip #4 is > an 'A/D converter' made from two PIC I/O pins, a couple resistors, and a > capacitor. Dynamically changing the I/O direction allows you to > implement the tip with just one I/O pin. Unfortunately, 5-bits was about > all it was good for. > > Scott