Hi Paul,

Two things come to mind. Your powersupply may not be able to handle the pulsating current. A beefy capacitor should take care of that, try a 10000uF/35V electrolythic and see if that helps. It may also be that you have weak and/or common ground wires for your pic and motor. They should be separate, heavy and short.