English
Language : 

PIC16LF18854 Datasheet, PDF (178/668 Pages) Microchip Technology – C Compiler Optimized RISC Architecture
PIC16(L)F18856/76
10.4.6
MODIFYING FLASH PROGRAM
MEMORY
When modifying existing data in a program memory
row, and data within that row must be preserved, it must
first be read and saved in a RAM image. Program
memory is modified using the following steps:
1. Load the starting address of the row to be
modified.
2. Read the existing data from the row into a RAM
image.
3. Modify the RAM image to contain the new data
to be written into program memory.
4. Load the starting address of the row to be
rewritten.
5. Erase the program memory row.
6. Load the write latches with data from the RAM
image.
7. Initiate a programming operation.
FIGURE 10-6:
FLASH PROGRAM
MEMORY MODIFY
FLOWCHART
Rev. 10-000050B
8/21/2015
Start
Modify Operation
Read Operation
(See Note 1)
An image of the entire row
read must be stored in RAM
Modify Image
The words to be modified are
changed in the RAM image
Erase Operation
(See Note 2)
Write Operation
Use RAM image
(See Note 3)
End
Modify Operation
Note 1:
2:
3:
See Figure 10-1.
See Figure 10-3.
See Figure 10-5.
DS40001824A-page 178
Preliminary
 2016 Microchip Technology Inc.