Quote: Originally Posted by
Rowan 
Is there a 220nF cap on pin 14 (vUSB)? This is required for stability of the internal 3.3vUSB regulator, and could be the possible reason for the random restarts if missing? Other than that, do you have the WDT enabled? If so, try calling CLRWDT moreoften, see if that helps?
There's a 470nF cap.
I'll look into WDT.