PIC reset with PWM

dc motorpicpwmreset

I'm using a PIC18F4550 to control a DC motor with PWM. When I use a PWM of above 50% it works well, but when it starts to go below 50% the PIC resets. I have separated supplies for the PIC and the DC motor with common grounds.

Best Answer

Put a scope on the supply pin of the PIC. I'd be surprised if you didn't see noise, voltage dips or whatnot causing this.

Extra decoupling may be called for. Even if you have ostensibly separate supplies, there could still be sufficient coupling to cause this.