> > The opto-isolator WOULD be the "safest" way to go, > > however I agree with you, taking that much current from the > > line might cause problems (it probably wouldn't but I > > wouldn't chance it myself). I have done something similar and > > I used the "high impedance" idea, a 1M resister going into > > the PIC I/O. The protection diodes on most PIC I/O pins > > SHOULD protect you enough. This technique is OK for a one > > off/personal project, however if you are going into volume > > I'd recommend other techniques (i.e. an NPN transistor). TTYL > > > > -- > > > Did you drive 12v (via the 1Mohm) directly into the pic? Isn't that out of > spec? or did you use ~ 2M & 1M ish in a potential divider to give the pic > ~4v Direct into the PIC. PICs have protection diodes going to the power rail and ground on most inputs, using them in this sort of application is, well, not COMMON, but it has been done. Is it out of spec? Yup, which is why I don't recommend doing it for anything other then hobbyist/personal one off applications. TTYL -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu