Hi Jinz, You could add a series resistor into AN0, not too big & not too small, say 470R. This will reduce the current flowing into the PIC diodes from glitches. Also a diode across your current sensing resistor to limit negative spikes, best would be a schottky as it will keep it under 0.6V. If you don't need full range on your input put another diode in the other direction to limit positive peaks as they could cause latchup too. -- Brent Brown, Electronic Design Solutions 16 English Street, Hamilton, New Zealand Ph/fax: +64 7 849 0069 Mobile/txt: 025 334 069 eMail: brent.brown@clear.net.nz -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body