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