3.2.10 Program Access Enable
The Program Access Enable command is used to enable the access to the
ICSPDIS bit. By default, write access to the
ICSPDIS bit is blocked for safety to prevent inadvertent
and irreversible changes to device configuration. Refer to Enhanced Code
Protection for details. Using the Load Data for
NVM command to write to these CONFIG bits will not work without sending the
Program Access Enable command first. Sending the Program Access Enable
(0x4C) command with the 22'h27A1A5 payload (the
total 32-bit value is 32'h4C4F434B, more easily remembered as LOCK in
ASCII) will grant write access to these Configuration bits for a limited-time command
window. The write access is terminated once the command window has passed, regardless of
the command that is executed during that window. On PIC16 devices, the write-access
window is for a duration of one command, so the Program Access Enable command must be
issued immediately before every write to the ICSPDIS bit.
