English
Language : 

PIC24FJ64GA004-IPT Datasheet, PDF (22/52 Pages) Microchip Technology – PIC24FJXXXGA0XX Flash Programming Specification
PIC24FJXXXGA0XX
TABLE 3-7: SERIAL INSTRUCTION EXECUTION FOR WRITING CONFIGURATION REGISTERS
Command
(Binary)
Data
(Hex)
Description
Step 1: Exit the Reset vector.
0000
0000
0000
000000
040200
000000
NOP
GOTO
NOP
0x200
Step 2: Initialize the Write Pointer (W7) for the TBLWT instruction.
0000
2xxxx7
MOV
<CW2Address15:0>, W7
Step 3: Set the NVMCON register to program CW2.
0000
0000
24003A
MOV
#0x4003, W10
883B0A
MOV
W10, NVMCON
Step 4: Initialize the TBLPAG register.
0000
0000
200xx0
MOV
<CW2Address23:16>, W0
880190
MOV
W0, TBLPAG
Step 5: Load the Configuration register data to W6.
0000
2xxxx6
MOV
#<CW2_VALUE>, W6
Step 6: Write the Configuration register data to the write latch and increment the Write Pointer.
0000
0000
0000
0000
000000
BB1B86
000000
000000
NOP
TBLWTL
NOP
NOP
W6, [W7++]
Step 7: Initiate the write cycle.
0000
0000
0000
A8E761
000000
000000
BSET
NOP
NOP
NVMCON, #WR
Step 8: Repeat this step to poll the WR bit (bit 15 of NVMCON) until it is cleared by the hardware.
0000
0000
0000
0000
0000
0001
0000
040200
000000
803B02
883C22
000000
<VISI>
000000
GOTO 0x200
NOP
MOV
NVMCON, W2
MOV
W2, VISI
NOP
Clock out contents of the VISI register.
NOP
Step 9: Reset device internal PC.
0000
0000
040200
000000
GOTO
NOP
0x200
Step 10: Repeat Steps 5-9 to write CW1.
DS39768D-page 22
© 2008 Microchip Technology Inc.