dsPIC33F/PIC24H PROGRAMMING SPECIFICATION
TABLE 5-8:
SERIAL INSTRUCTION EXECUTION FOR WRITING CONFIGURATION REGISTERS
Command
(Binary)
Data
(Hex)
Description
Step 1: Exit the Reset vector.
0000
0000
0000
0000
000000
000000
040200
000000
NOP
NOP
GOTO
NOP
0x200
Step 2: Initialize the write pointer (W7) for the TBLWTinstruction.
0000 200007 MOV #0x0000, W7
Step 3: Set the NVMCON register to program one Configuration register.
0000
0000
24000A
883B0A
MOV
MOV
#0x4000, W10
W10, NVMCON
Step 4: Initialize the TBLPAG register.
0000
0000
200F80
880190
MOV
MOV
#0xF8, W0
W0, TBLPAG
Step 5: Load the Configuration register data to W6.
0000 2xxxx0 MOV #<CONFIG_VALUE>, W0
Step 6: Write the Configuration register data to the write latch and increment the write pointer.
0000
0000
0000
BB1B96
000000
000000
TBLWTL W0, [W7++]
NOP
NOP
Step 7: Initiate the write cycle.
0000
0000
0000
A8E761
000000
000000
BSET
NOP
NOP
NVMCON, #WR
Step 8: Wait for the Configuration Register Write operation to complete and make sure WR bit is clear.
-
-
Externally time ‘P20’ msec (see Section TABLE 8-1: “AC/DC
Characteristics and Timing Requirements”) to allow suffi-
cient time for the Configuration Register Write operation to
complete.
0000
0000
0000
0001
807600
887840
000000
<VISI>
MOV, NVMCON, W0
MOV
NOP
W0, VISI
Clock out contents of VISI register. Repeat until the WR bit
is clear.
Step 9: Reset device internal PC.
0000
0000
040200
000000
GOTO
NOP
0x200
Step 10: Repeat steps 5-9 until all twelve Configuration registers are written.
© 2007 Microchip Technology Inc.
Preliminary
DS70152D-page 63