English
Language : 

PIC24FJ64GA004-IPT Datasheet, PDF (27/52 Pages) Microchip Technology – PIC24FJXXXGA0XX Flash Programming Specification
4.0 DEVICE PROGRAMMING –
ENHANCED ICSP
This section discusses programming the device
through Enhanced ICSP and the programming execu-
tive. The programming executive resides in executive
memory (separate from code memory) and is executed
when Enhanced ICSP Programming mode is entered.
The programming executive provides the mechanism
for the programmer (host device) to program and verify
the PIC24FJXXXGA0XX devices using a simple
command set and communication protocol. There are
several basic functions provided by the programming
executive:
• Read Memory
• Erase Memory
• Program Memory
• Blank Check
• Read Executive Firmware Revision
The programming executive performs the low-level
tasks required for erasing, programming and verifying
a device. This allows the programmer to program the
device by issuing the appropriate commands and data.
Table 4-1 summarizes the commands. A detailed
description for each command is provided in
Section 5.2 “Programming Executive Commands”.
TABLE 4-1:
Command
COMMAND SET SUMMARY
Description
SCHECK
READC
READP
PROGP
PROGW
QBLANK
QVER
Sanity Check
Read Device ID Registers
Read Code Memory
Program One Row of Code Memory
and Verify
Program One Word of Code Memory
and Verify
Query if the Code Memory is Blank
Query the Software Version
The programming executive uses the device’s data
RAM for variable storage and program execution. After
the programming executive has run, no assumptions
should be made about the contents of data RAM.
4.1 Overview of the Programming
Process
Figure 4-1 shows the high-level overview of the
programming process. After entering Enhanced ICSP
mode, the programming executive is verified. Next, the
device is erased. Then, the code memory is
programmed, followed by the configuration locations.
Code memory (including the Configuration registers) is
then verified to ensure that programming was successful.
PIC24FJXXXGA0XX
After the programming executive has been verified
in memory (or loaded if not present), the
PIC24FJXXXGA0XX family can be programmed using
the command set shown in Table 4-1.
FIGURE 4-1: HIGH-LEVEL ENHANCED
ICSP™ PROGRAMMING FLOW
Start
Enter Enhanced ICSP™
Perform Chip
Erase
Program Memory
Verify Program
Program Configuration Bits
Verify Configuration Bits
Exit Enhanced ICSP
Done
4.2 Confirming the Presence of the
Programming Executive
Before programming can begin, the programmer must
confirm that the programming executive is stored in
executive memory. The procedure for this task is
shown in Figure 4-2.
First, In-Circuit Serial Programming mode (ICSP) is
entered. Then, the unique Application ID Word stored in
executive memory is read. If the programming executive
is resident, the Application ID Word is BBh, which means
programming can resume as normal. However, if the
Application ID Word is not BBh, the programming
executive must be programmed to executive code
memory using the method described in Section 5.4
“Programming the Programming Executive to
Memory”.
Section 3.0 “Device Programming – ICSP” describes
the ICSP programming method. Section 3.11 “Reading
the Application ID Word” describes the procedure for
reading the Application ID Word in ICSP mode.
© 2008 Microchip Technology Inc.
DS39768D-page 27