dsPIC33F/PIC24H PROGRAMMING SPECIFICATION
TABLE 5-5:
Command
(Binary)
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
SERIAL INSTRUCTION EXECUTION FOR WRITING CODE MEMORY
Data
(Hex)
000000
000000
040200
000000
24001A
883B0A
200xx0
880190
2xxxx7
2xxxx0
2xxxx1
2xxxx2
2xxxx3
2xxxx4
2xxxx5
EB0300
000000
BB0BB6
000000
000000
BBDBB6
000000
000000
BBEBB6
000000
000000
BB1BB6
000000
000000
BB0BB6
000000
000000
BBDBB6
000000
000000
BBEBB6
000000
000000
BB1BB6
000000
000000
NOP
NOP
GOTO
NOP
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
Description
Step 1:
Exit the Reset vector.
0x200
Step 2:
Set the NVMCON to program 64 instruction words.
#0x4001, W10
W10, NVMCON
#<DestinationAddress23:16>, W0
W0, TBLPAG
#<DestinationAddress15:0>, W7
#<LSW0>, W0
#<MSB1:MSB0>, W1
#<LSW1>, W2
#<LSW2>, W3
#<MSB3:MSB2>, W4
#<LSW3>, W5
Step 3:
Initialize the write pointer (W7) for
TBLWT
instruction.
Step 4:
Initialize the read pointer (W6) and load W0:W5 with the next 4 instruction words to program.
Step 5:
Set the read pointer (W6) and load the (next set of) write latches.
CLR
W6
NOP
TBLWTL [W6++],
NOP
NOP
TBLWTH.B[W6++],
NOP
NOP
TBLWTH.B[W6++],
NOP
NOP
TBLWTL [W6++],
NOP
NOP
TBLWTL [W6++],
NOP
NOP
TBLWTH.B[W6++],
NOP
NOP
TBLWTH.B[W6++],
NOP
NOP
TBLWTL [W6++],
NOP
NOP
[W7]
[W7++]
[++W7]
[W7++]
[W7]
[W7++]
[++W7]
[W7++]
Step 6:
Repeat steps 4-5 sixteen times to load the write latches for 64 instructions.
Step 7:
Initiate the write cycle.
0000
0000
0000
A8E761
000000
000000
BSET
NOP
NOP
NVMCON, #WR
Step 8:
Wait for Row Program operation to complete and make sure WR bit is clear.
DS70152D-page 60
Preliminary
漏
2007 Microchip Technology Inc.