If the only requirement is to detect a switch position I'd agree. However, Jinx's reply had indicated he was considering the "open" and "Short" circuit detection possibilities as well so I suggested the adc input. Rather than running a raw adc input directly connected to the remote wire, I would probably use an opamp to add an additional degree of protection. RP At 11:59 AM 2/27/2005, Richard.Prosser@Powerware.com wrote: >If available, I'd probably use an adc input. - with heavy protection on the >incoming line. Probably with an opamp stage to isolate things even more >unless the environment is unusually benign. Why bother with the op-amp? The requirement is to detect whether a switch is open or closed - a simple binary choice. Yes - you can use an a/d input and yes - you would filter and maybe even clamp the heck out of the signal before feeding it to that input. But suggesting to use an op-amp where is no need for one simply adds needless complexity. Keep in mind that you can make a nice 2 pole RC filter that still meets the minimum input bias current specs for a few pennies. Add clamping diodes at the mid-point of the filter for a couple of pennies more. Add another diode across the resistor between the mid-point of the RC filter & a/d pin and make the capacitor at the a/d pin large enough and you eliminate the need for software debounce. Change the a/d input to any input that has a schmitt trigger input and eliminate the need for the a/d. Lots and lots of choices. But no need for an op-amp dwayne -- Dwayne Reid Trinity Electronics Systems Ltd Edmonton, AB, CANADA (780) 489-3199 voice (780) 487-6397 fax Celebrating 21 years of Engineering Innovation (1984 - 2005) .-. .-. .-. .-. .-. .-. .-. .-. .-. .- `-' `-' `-' `-' `-' `-' `-' `-' `-' Do NOT send unsolicited commercial email to this email address. This message neither grants consent to receive unsolicited commercial email nor is intended to solicit commercial email. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist