PIC18FXX20
DS39583C-page 8 2010 Microchip Technology Inc.
3.1.1 LOW VOLTAGE ICSP BULK ERASE
When using low voltage ICSP, the part must be
supplied by the voltage specified in parameter #D111,
if a bulk erase is to be executed. All other bulk erase
details as described above apply.
If it is determined that a program memory erase must
be performed at a supply voltage below the bulk erase
limit, refer to the erase methodology described in
Sections 3.1.2 and 3.2.2.
If it is determined that a data EEPROM erase must be
performed at a supply voltage below the bulk erase
limit, follow the methodology described in Section 3.3
and write ones to the array.
3.1.2 ICSP MULTI-PANEL SINGLE ROW
ERASE
Irrespective of whether high or low voltage ICSP is
used, it is possible to erase single row (64 bytes of
data) in all panels at once. For example, in the case of
a 64-Kbyte device (8 panels), 512 bytes through 64
bytes in each panel can be erased simultaneously dur-
ing each erase sequence. In this case, the offset of the
erase within each panel is the same (see Figure 3-6).
Multi-panel single row erase is enabled by appropri-
ately configuring the Programming Control register
located at 3C0006h.
The multi-panel single row erase duration is externally
timed and is controlled by SCLK. After a “Start Pro-
gramming” command is issued (4-bit, ‘1111’), a NOP is
issued, where the 4th SCLK is held high for the
duration of the programming time, P9.
After SCLK is brought low, the programming sequence
is terminated. SCLK must be held low for the time spec-
ified by parameter P10 to allow high voltage discharge
of the memory array.
The code sequence to program a PIC18FXX20 device
is shown in Table 3-2. The flowchart shown in
Figure 3-4 depicts the logic necessary to completely
erase a PIC18FXX20 device. The timing diagram that
details the “Start Programming” command, and
parameters P9 and P10 is shown in Figure 3-7.
Note: The TBLPTR register must contain the
same offset value when initiating the pro-
gramming sequence as it did when the
write buffers were loaded.