donniedj said:
Might be? Must be for commercial project. Code Protect has not prevented me from programming devices from within MPLAB IDE or PICKit Software using either a PICKit or an ICD2 clone. Their softwares verify the code but I suspect the verification is done DURING the programming. WinPIC800 and other third parties verify AFTER the programming. Code protection should not be an inhibitor to programming.
Perhaps Microchip programming software does not actually verify when Code Protection is set, unlikely. I attempted to get some info but the forum over there was just cleaned out. Anyhow, Code Protection should not burden the act of programming, and if there are softwares in existence that make it so, then that software ought to not exist. Or if Code Protection in itself burdens the act of programming, then it ought to be revised because Verification of code and Code Protection are a must.
As far as I'm aware, and certainly the way I've always implemented it, there are basically two methods of verification:
1) You verify every word after it's written, so a failure is found without having to write the entire device, WinPicProg always does this.
2) You verify all of the device after it's all written, in WinPicProg this option can be disabled in the menu.
As for code protection, you first write program memory and verify it, you then write data memory and verify it, last of all you write the configuration word(s) - once you've done that, with code protection set, you can't verify it. So you have either the option of disabling verification of the config word, or simply displaying a failure message - WinPicProg displays a failure message, because it's a sensible indication that you've set code protection ON.
But I'll repeat again - DON'T SET CODE PROTECTION UNLESS THERE'S A GOOD REASON - generally there's no need whatsoever, and it's completely pointless. You've perhaps all seen posts on here asking about breaking the protection on PIC's, claiming they have lost the source code for their program and need to be able to read the HEX file back out?. Personally I consider all such posts are lies, they are just trying to steal someone elses work - if it's NOT a lie, then they are just incredibly stupid, and if they have written it once, they can write it again!.