Pinguino Forum

Full Version: Unable to program PIC18F45K50 with PICkit2
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
The schematic is the same but you need to adapt the program.
I wrote something more universal some time ago. I can share it with you. Just send me an email.
From the PICkit2 README:

Quote:Display of HEX file Code / Data Protect settings
 When a hex file with Code Protect and/or Data Protect bits
 asserted in the Configuration bits is loaded, this is noted
 by displaying "Code/Data/All Protect" next to the Configuration
 Word(s) display.  Similarly, the protect settings are noted for
 Configuration read from a device.  Note that protection
 settings in an imported hex file or read from a device may not
 be turned off in the application.

Code protection is enabled via the config words on the chip which is why you can't write to it.

Solution: Erase the chip (and make sure you're not setting the config words with the PICkit2).
(12-08-2015, 12:16 PM)Pinguino Wrote: [ -> ]Solution: Erase the chip (and make sure you're not setting the config words with the PICkit2).

Sorry, but I have tried it thousands of times and no effects. It's definetely some kind of strange bug, maybe with pickit, or maybe the chips are somehow flawed. But this chip is not officialy supported by pickit2, so I think it's the pickit2.
All your screenshots show that the PIC is "All protect" -> completely Code protected. You cannot overwrite it without erasing it first. If the code protect bits are being reset after that, check your configuration words (and in the PICkit2 program which can also set them).

Yes, I'm familiar with this issue - I once spent an entire day trying to program a chip because the PICkit2 software was setting the code protect bits and I hadn't noticed. Erasing the chip, if successful, will unset those bits and then the chip can be written.

Not sure what you mean by the chip not being supported... it shows up in your screenshots as identified.
Pages: 1 2