Quote Originally Posted by Dave View Post
Well I for one would NEVER operate a relay directly from the processor. looking at the data sheet for the relay, It draws 22 ma. Its bad enough for a pin that is sinking but it looks as if you are also sourcing the current to the coil. Use a transistor to switch the coil and you also get an extra pin to use. Also, I see NO diode to prevent backemf form the relay.
Thanks, Dave. I actually am using a 2N3904 to supply the power to the coils. the MCU connects to the base of each transistor. The collector of each transistor connects to VDD. And the emitter of each transistor connects to its respective coil. I don't know why I didn't draw them on the schematic. I guess I didn't think that part was relevant to my specific problem.

Anyhow!

I resolved the issue. It was a hardware/physical design problem. The .1uF capacitor off of GPIO.3 was causing the problem. I added it to help make the switch less bouncy, but this isn't a good idea when using the MCLR pin when MCLR is turned off. I removed that capacitor and everything works perfectly now.