Sometimes a resistor in series from the programing pins to the application circuit works, sometimes diodes.
The sure fire way is to use a removable jumper to disconnect the programing pins from everything else while programing.
If you are using the PicKit2, the PicKit2 User Guide briefly mentions this.
Bookmarks