More information would really help. You have _RC_OSC_1H, which configures the PIC for an external RC oscillator, and you have DEFINE OSC 4.
Are you using an external RC oscillator, crystal, resonator, or what?
Does it work as expected when you do NOT include config settings in your code?
Pickit2 may just be complaining that you don't have all config settings in your code, but if it actually works, when you don't, then it's pretty obvious what's causing the problem.
Just compare your config settings to the default settings in the PBP .INC file.
Bookmarks