Andrew Mayo said: >The PIC chip is very sensitive to noise on MCLR. Keep the line to the >MCLR pullup very very short and well away from noise sources. Decouple >the PIC directly across power and ground with a 0.1 monolithic >capacitor. Ensure that power and signal grounds are separate and join >them at the edge of the board and go straight from there to ground. > Good advice. Also, it is desirable to use a fairly low pull-up resistor. I certainly wouldn't go any higher than 1K between Vdd and MCLR. You can tell if this is contributing to the problem by trying different pull-up resistors and seeing if higher values increase the frequency of undesired resets. Ferrite beads can be very helpful; wind a few turns around them and put them in series with power and signal lines. If the resets are only occasional, it can be difficult to tell whether a particular modification has improved the situation. Connect a big relay in "buzzer" mode and power it from the same line that powers the PIC circuit. Hold it physically near the chip and the rest of the circuit. This often broadcasts enough wide-band noise to expose marginal conditions. If you can harden it against such "brute-force" attacks, it should improve the situation. Reg Neale