English
Language : 

PIC24F04KA200 Datasheet, PDF (4/26 Pages) Microchip Technology – Flash Programming Specifications
PIC24FXXKA2XX
3.0 ICSP PROGRAMMING
The ICSP method is a special programming protocol
that allows reading and writing to the PIC24FXXKA2XX
device family memory. This is accomplished by apply-
ing control codes and instructions, serially to the
device, using PGCx and PGDx pins.
In ICSP mode, the system clock is taken from the
PGCx pin, regardless of the device‘s oscillator
Configuration bits. All of the instructions are shifted
serially to an internal buffer, loaded into the Instruction
Register (IR) and then executed. No program is fetched
from the internal memory. Instructions are fed in 24 bits
at a time. PGDx is used to shift data in, and PGCx is
used as both the serial shift clock and the CPU
execution clock.
Note:
During ICSP operation, the operating
frequency of PGCx should not exceed
8 MHz.
3.1 Overview of the Programming
Process
Figure 3-1 illustrates the high-level overview of the
programming process.
After entering the ICSP mode, perform the following:
1. Bulk Erase the device.
2. Program and verify the code memory.
3. Program and verify the device configuration.
4. Program the code-protect Configuration bits if
required.
3.2 ICSP Operation
Upon entry into ICSP mode, the CPU is Idle. An
internal state machine governs the execution of the
CPU. A 4-bit control code is clocked in, using PGCx
and PGDx, and this control code is used to command
the CPU (see Table 3-1).
The SIX control code is used to send instructions to the
CPU for execution, and the REGOUT control code is
used to read data out of the device via the VISI register.
FIGURE 3-1:
HIGH–LEVEL ICSP™
PROGRAMMING FLOW
Start
Enter ICSP™ Mode
Perform Bulk
Erase
Program Memory
Verify Program
Program Configuration Bits
Verify Configuration Bits
Exit ICSP Mode
End
TABLE 3-1: CPU CONTROL CODES IN
ICSP™ MODE
4-Bit
Control Code
Mnemonic
Description
0000
0001
0010-1111
SIX
REGOUT
N/A
Shift in 24-bit instruction
and execute.
Shift out the VISI
(0784h) register.
This is reserved.
DS39991A-page 4
 2010 Microchip Technology Inc.