If you have an scope, watch the ground for spikes. I expected to see some caps in the area of 47uF but cant make them out on your board. Stepper drives are NOISEY!!! You may be getting a spike on ground enough to cause the pic to reset.