> Whenever the 5V output from PIC is applied to relay, the microprocessor >will run unexpectedly. If I put relay in a separated board, it's OK. I think >the problem is the noise from the inductance of relay. Can anyone tell me >how to eliminate this problem? Thank you. Hi Peter. I'll try not to avoid the dyslexia that plagued me Sunday when I tried to help someone else with a similar problem. :-( If you could find a relay that would operate on 20mA of current, you could theoretically drive it direct from the PIC, but it would still be a bad idea. Don't drive the relay directly. Drive the base of a switching transistor thru a series resistor. For a typical low voltage relay, use a 2N2222 and put the relay in the collector circuit. Use a 470 ohm resistor to drive the base. In parallel with the relay coil, place a general-purpose diode with the CATHODE toward the (+) supply voltage. It's a good idea to return the (-) side of the relay supply directly to the transistor emitter, which should also be logic ground. Make sure that MCLR is asserted high and that your supply will deliver the current your circuit is demanding from it. If that doesn't stop the resets, email me directly and I'll try to help you further. Reg Neale