> reading a 0-5V value from a potentiometer on an ADC pin of a > PIC16f876. The problem is there's a nice big (several thousand > Watt) electric motor nearby Be sure to include a Shottky diode (anode - pin, cathode - ground) to protect the ADC pin. In a situation similar to yours I blew an ADC pin by allowing negative spikes to reach it, although the rest of the 877 seems to still work. Easiest one for me to get hold of is the 1N5819. A normal diode like 1N4148 or 1N4001 will not offer any protection - you need that spike clipped before the PIC's internal diode conducts (see manual). Across the Shottky is a 22n ceramic, and source voltage comes in through a 470R resistor. If you can get a scope on the circuit you'll have a better idea of what steps you need to take and how successful they were -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu