On 7/5/06, Olin Lathrop wrote: > Mark Rages wrote: > > My plan was to write a program to disable write > > protection on the boot block, change the byte, then re-enable write > > protection. > > *Think* about it. Write protection is there to prevent writes to program > memory. It's purpose would be defeated if you could disable it from the > program. > For a bootloader, my misconception makes as much sense than the way the PIC actually works. Imagine a program that writes zeroes to all the WRTx config locations. This will entirely disable a bootloaded device as surely as overwriting the bootloader would. I suppose the only safe thing for a bootloader to do is set (to 0) the configuration write protect bit WRTC. Maybe it is common for bootloaders to do this; my only data point is the PICkit 2 bootloader, which does not. Think about it, won't you? Thank you. Regards, Mark markrages@gmail -- You think that it is a secret, but it never has been one. - fortune cookie -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist