There's definately a hardware problem

More than often caused by
  1. unsufficient PSU filtering
  2. Crystal located too far from the PIC
  3. messy/loose protoboard contact
  4. Spaghetti fashionned ProtoBoard wiring

I remember few ProtoBoard where you had to use the Weedeater before seeing a single electronic part... "Sir why i have problem ?"