Information

dsPIC33F/PIC24H PROGRAMMING SPECIFICATION
DS70152H-page 8 © 2010 Microchip Technology Inc.
3.0 DEVICE PROGRAMMING –
ENHANCED ICSP
This section discusses programming the device
through Enhanced ICSP and the programming
executive. 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 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 3-1 summarizes the commands. A detailed
description for each command is provided in
Section 4.2 “Programming Executive Commands”.
TABLE 3-1: COMMAND SET SUMMARY
The programming executive uses the device’s data
RAM for variable storage and program execution. After
the programming executive is run, no assumptions
should be made about the contents of data RAM.
3.1 Overview of the Programming
Process
Figure 3-1 illustrates 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 nonvolatile device
Configuration registers. Code memory (including the
Configuration registers) is then verified to ensure that
programming was successful.
After the programming executive has been verified
in memory (or loaded if not present), the dsPIC33F/
PIC24H Programming Specification can be
programmed using the command set shown in
Table 3-1.
FIGURE 3-1: HIGH-LEVEL ENHANCED
ICSP™ PROGRAMMING
FLOW
Command Description
SCHECK Sanity check.
READC Read Configuration registers or
Device ID registers.
READP Read code memory.
PROGC Program a Configuration
register and verify.
PROGP Program one row of code
memory and verify.
ERASEP Erase Page command.
CRCP SIGNATURE Performs CRC on memory.
QBLANK Query to check whether code
memory is blank.
QVER Query the software version.
Start
End
Program Memory
Verify Program
Enter Enhanced ICSP
Program Configuration Bits
Verify Configuration Bits
Exit Enhanced ICSP
Perform Bulk Erase
Program PE Into
(using ICSP™)
Executive Memory
(using ICSP)