English
Language : 

PIC16LF1503 Datasheet, PDF (91/340 Pages) Microchip Technology – 14-Pin Flash, 8-Bit Microcontrollers
PIC16(L)F1503
FIGURE 10-6:
FLASH PROGRAM MEMORY WRITE FLOWCHART
Start
Write Operation
Determine number of words
to be written into Program or
Configuration Memory.
The number of words cannot
exceed the number of words
per row.
(word_cnt)
Enable Write/Erase
Operation (WREN = 1)
Load the value to write
(PMDATH:PMDATL)
Disable Interrupts
(GIE = 0)
Select
Program or Config. Memory
(CFGS)
Select Row Address
(PMADRH:PMADRL)
Select Write Operation
(FREE = 0)
Load Write Latches Only
(LWLO = 1)
Update the word counter
(word_cnt--)
Last word to Yes
write ?
No
Unlock Sequence
F(Figiguurere1x0-x3)
No delay when writing to
Program Memory Latches
Increment Address
(PMADRH:PMADRL++)
Write Latches to Flash
(LWLO = 0)
Unlock Sequence
F(Figiguurere1x0-x3)
CPU stalls while Write
operation completes
(2ms typical)
Disable
Write/Erase Operation
(WREN = 0)
Re-enable Interrupts
(GIE = 1)
End
Write Operation
 2011 Microchip Technology Inc.
Preliminary
DS41607A-page 91