Sergey Dryga (Reg dryga.us> writes: > > Attached are picture with 2 approaches for this: > 1. transistor based, > 2. comparator based > > This maybe an overkill, but looks like a fun thing to do! > > Sergey > > http://beaglerobotics.com > Note: Resistors R10-R14 should be the same value to give 1/3 V, and 2/3 V voltages on comparator pins, and 1/2 V on PIC pin. Resistors R3/R4 and R6/R7 should be selected so that Q2 and Q3 do not open when PIC pin in an input. Sergey Dryga http://beaglerobotics.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist