Datasheet

PIC24FJXXXGA1/GB1
DS39907A-page 32 © 2007 Microchip Technology Inc.
4.6.2 PROGRAMMING METHODOLOGY
Configuration bits may be programmed a single byte at
a time using the PROGP command. This command
specifies the configuration data and Configuration
register address. When Configuration bits are
programmed, any unimplemented or reserved bits
must be programmed with a ‘1’.
Two PROGP commands are required to program the
Configuration bits. A flowchart for Configuration bit
programming is shown in Figure 4-5.
4.6.3 PROGRAMMING VERIFICATION
After the Configuration bits are programmed, the
contents of memory should be verified to ensure that
the programming was successful. Verification requires
the Configuration bits to be read back and compared
against the copy held in the programmers buffer. The
READP command reads back the programmed
Configuration bits and verifies that the programming
was successful.
FIGURE 4-5: CONFIGURATION BIT PROGRAMMING FLOW
Note: If the General Segment Code-Protect bit
(GCP) is programmed to ‘0’, code memory
is code-protected and can not be read.
Code memory must be verified before
enabling read protection. See Section 4.6.4
“Code-Protect Configuration Bits” for
more information about code-protect
Configuration bits.
Send PROGP
Command
ConfigAddress = 0XXXFAh
(1)
Is
PROGP response
PASS?
No
Yes
No
Failure
Report Error
Start
Finish
Yes
Is
ConfigAddress
0XXXFEh?
(1)
ConfigAddress =
ConfigAddress + 2
Note 1: Refer to Table 2-2 for Flash Configuration Word addresses.