dsPIC33F/PIC24H PROGRAMMING SPECIFICATION
3.1
Overview of the Programming
Process
3.0
DEVICE PROGRAMMING –
ENHANCED ICSP
Figure 3-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 pro-
grammed, followed by the nonvolatile device Configu-
ration registers. Code memory (including the
Configuration registers) is then verified to ensure that
programming was successful.
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 dsPIC33F/PIC24H Programming Specification
family devices using a simple command set and com-
munication protocol. There are several basic functions
provided by the programming executive:
After the programming executive has been verified
in memory (or loaded if not present), the dsPIC33F/
PIC24H Programming Specification can be pro-
grammed using the command set shown in Table 3-1.
• Read Memory
• Erase Memory
FIGURE 3-1:
HIGH-LEVEL ENHANCED
ICSP™ PROGRAMMING
FLOW
• 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 3-1 summarizes the commands. A detailed
description for each command is provided in
Section 4.2 “Programming Executive Commands”.
Start
Enter Enhanced ICSP™
Perform Bulk
Erase
TABLE 3-1:
Command
COMMAND SET SUMMARY
Description
Program Memory
Verify Program
SCHECK
READC
Sanity check
Read Configuration registers or Device
ID registers
READP
PROGC
Read code memory
Program a Configuration register and
verify
Program Configuration Bits
Verify Configuration Bits
PROGP
PROGW
Program one row of code memory and
verify
Program one word of code memory
and verify
Exit Enhanced ICSP
Done
QBLANK
QVER
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.
© 2007 Microchip Technology Inc.
Preliminary
DS70152D-page 33