dsPIC33F/PIC24H PROGRAMMING SPECIFICATION
Table 5-10 shows the ICSP programming details for
reading all of configuration memory. Note that the
5.9
Reading Configuration Memory
The procedure for reading configuration memory is
similar to the procedure for reading code memory,
except that 16-bit data words are read (with the upper
byte read being all ‘0’s) instead of 24-bit words. Since
there are twelve Configuration registers, they are read
one register at a time.
TBLPAG register is hard coded to 0xF8 (the upper byte
address of configuration memory) and the read pointer,
W6, is initialized to 0x0000.
TABLE 5-10: SERIAL INSTRUCTION EXECUTION FOR READING ALL CONFIGURATION MEMORY
Command
(Binary)
Data
(Hex)
Description
Step 1: Exit Reset vector.
0000
0000
0000
0000
000000
000000
040200
000000
NOP
NOP
GOTO
NOP
0x200
Step 2: Initialize TBLPAG, the read pointer (W6) and the write pointer (W7) for TBLRDinstruction.
0000
0000
0000
0000
0000
200F80
880190
EB0300
207847
000000
MOV
MOV
CLR
MOV
NOP
#0xF8, W0
W0, TBLPAG
W6
#VISI, W7
Step 3: Read the Configuration register and write it to the VISI register (located at 0x784) and clock out the
VISI register using the REGOUTcommand.
0000
0000
0000
0001
BA0BB6
000000
000000
<VISI>
TBLRDL [W6++], [W7]
NOP
NOP
Clock out contents of VISI register
Step 4: Repeat step 3 twelve times to read all the Configuration registers.
Step 5: Reset device internal PC.
0000
0000
040200
000000
GOTO
NOP
0x200
© 2007 Microchip Technology Inc.
Preliminary
DS70152D-page 65