English
Language : 

PIC18LF2XK22 Datasheet, PDF (25/42 Pages) Microchip Technology – Flash Memory Programming Specification
PIC18(L)F2XK22/4XK22
4.2 Verify Code Memory and ID
Locations
The verify step involves reading back the code memory
space and comparing it against the copy held in the
programmer’s buffer. Memory reads occur a single byte
at a time, so two bytes must be read to compare
against the word in the programmer’s buffer. Refer to
Section 4.1 “Read Code Memory, ID Locations and
Configuration Bits” for implementation details of
reading code memory.
The Table Pointer must be manually set to 200000h
(base address of the ID locations) once the code
memory has been verified. The post-increment feature
of the table read 4-bit command can not be used to
increment the Table Pointer beyond the code memory
space. In a 64-Kbyte device, for example, a post-
increment read of address FFFFh will wrap the Table
Pointer back to 000000h, rather than point to
unimplemented address 010000h.
FIGURE 4-2:
VERIFY CODE MEMORY FLOW
Start
Set TBLPTR = 0
Set TBLPTR = 200000h
Read Low Byte
with Post-increment
Read High Byte
with Post-increment
Does
Word = Expect
data?
Yes
No Failure,
Report
Error
No
All
code memory
verified?
Yes
Increment
Pointer
Read Low Byte
with Post-Increment
Read High byte
with Post-Increment
Does
Word = Expect No
data?
Yes
Failure,
Report
Error
All
No
ID locations
verified?
Yes
Done
 2010 Microchip Technology Inc.
Advance Information
DS41398B-page 25