
dsPIC30F Flash Programming Specification
DS70102K-page 46
2010 Microchip Technology Inc.
Step 5: Set the read pointer (W6) and load the (next set of) write latches.
0000
EB0300
000000
BB0BB6
000000
BBDBB6
000000
BBEBB6
000000
BB1BB6
000000
BB0BB6
000000
BBDBB6
000000
BBEBB6
000000
BB1BB6
000000
CLR
W6
NOP
TBLWTL
[W6++], [W7]
NOP
TBLWTH.B
[W6++], [W7++]
NOP
TBLWTH.B
[W6++], [++W7]
NOP
TBLWTL
[W6++], [W7++]
NOP
TBLWTL
[W6++], [W7]
NOP
TBLWTH.B
[W6++], [W7++]
NOP
TBLWTH.B
[W6++], [++W7]
NOP
TBLWTL
[W6++], [W7++]
NOP
Step 6: Repeat steps 4-5 eight times to load the write latches for 32 instructions.
Step 7: Unlock the NVMCON for writing.
0000
200558
883B38
200AA9
883B39
MOV
#0x55, W8
MOV
W8, NVMKEY
MOV
#0xAA, W9
MOV
W9, NVMKEY
Step 8: Initiate the write cycle.
0000
—
0000
A8E761
000000
—
000000
A9E761
000000
BSET
NVMCON, #WR
NOP
NOP
BCLR
NVMCON, #WR
NOP
Step 9: Reset device internal PC.
0000
040100
000000
GOTO 0x100
NOP
Step 10: Repeat steps 2-9 until all code memory is programmed.
TABLE 11-8:
SERIAL INSTRUCTION EXECUTION FOR WRITING CODE MEMORY (CONTINUED)
Command
(Binary)
Data
(Hexadecimal)
Description