English
Language : 

PIC18FXXK80 Datasheet, PDF (11/52 Pages) Microchip Technology – Flash Microcontroller Programming Specification
PIC18FXXK80 FAMILY
2.5 High-Level Overview of the
Programming Process
Figure 2-9 shows the high-level overview of the
programming process. First, a Block Erase is performed
for each block. Next, the code memory, ID locations and
data EEPROM are programmed. These memories are
then verified to ensure that programming was successful.
If no errors are detected, the Configuration bits are then
programmed and verified.
FIGURE 2-9:
HIGH-LEVEL
PROGRAMMING FLOW
Start
Perform Sequential
Block Erase
Procedure
Program Memory
Program IDs
Program Data EE
Verify Program
2.6 Entering and Exiting High-Voltage
ICSP Program/Verify Mode
As shown in Figure 2-11, entering High-Voltage ICSP
Program/Verify mode requires two steps. First, voltage
is applied to the MCLR pin. Second, a 32-bit key
sequence is presented on PGD.
The programming voltage applied to MCLR is VIHH.
VIHH must be applied to MCLR during the transfer of
the key sequence. After VIHH is applied to MCLR, an
interval of at least P12 must elapse before presenting
the key sequence on PGD.
The key sequence is a specific 32-bit pattern,‘0100
1101 0100 0011 0100 1000 0101 0000’ (more
easily remembered as 4D434850h in hexadecimal).
The device will enter Program/Verify mode only if the
sequence is valid. The Most Significant bit of the most
significant nibble must be shifted in first.
Once the key sequence is complete, Program/Verify
mode is entered, and the program memory can be
accessed and programmed in serial fashion. While in
the Program/Verify mode, all unused I/Os are placed in
the high-impedance state.
Exiting Program/Verify mode is done by removing VIHH
from MCLR, as shown in Figure 2-13. The only require-
ment for exit is that an interval, P16, should elapse
between the last clock and the program signals on
PGC and PGD before removing VIHH.
Verify IDs
Verify Data
Program
Configuration Bits
Verify
Configuration Bits
Done
 2011 Microchip Technology Inc.
DS39972B-page 11