PIC resets when motors work
You circuit lacks decoupling capacitors for the microcontroller.
Try adding 100 nF / 1 uF ceramic capacitor as close as possible to each pair of Vdd/Vss pins.

Related question and great answer from Olin: PIC16f877A resets due to external noise