If you are using the same code and the same PIC® it has to be a hardware problem.

Check to OSC to make sure it is OK. Maybe wrong/bad capacitor??