Information
© 2010 Microchip Technology Inc. DS70152H-page 11
dsPIC33F/PIC24H PROGRAMMING SPECIFICATION
FIGURE 3-4: FLOWCHART FOR
PROGRAMMING CODE
MEMORY
3.5.2 PROGRAMMING VERIFICATION
After code memory is programmed, the contents of
memory can be verified to ensure that programming
was successful. Verification requires code memory to
be read back and compared against the copy held in
the programmer’s buffer.
The READP command can be used to read back all the
programmed code memory.
Alternatively, you can have the programmer perform
the verification after the entire device is programmed,
using a checksum computation.
3.5.3 CHECKSUM COMPUTATION
Only the Configuration registers are included in the
checksum computation. The Device ID and Unit ID are
not included in the checksum computation.
TABLE D-1: “CHECKSUM COMPUTATION” shows
how this 16-bit computation can be made for each
dsPIC33F and PIC24H device. Computations for read
code protection are shown both enabled and disabled.
The checksum values shown here assume that the
Configuration registers are also erased. However,
when code protection is enabled, the value of the FGS
register is assumed to be 0x5.
BaseAddress = 0x0
RemainingCmds = 1368
Start
Failure
Report Error
End
Yes
No
RemainingCmds =
RemainingCmds – 1
Yes
PASS?
No
BaseAddress
Command to Program
Send PROGP
RemainingCmds
Is
‘0’?
BaseAddress + 0x80
BaseAddress =
PROGP response
Is