
2010 Microchip Technology Inc.
DS70102K-page 51
dsPIC30F Flash Programming Specification
11.11 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 instead of 24-bit
words. Since there are seven Configuration registers,
they are read one register at a time.
reading all of the configuration memory. Note that the
TBLPAG register is hard-coded to 0xF8 (the upper byte
address of configuration memory), and the read pointer
W6 is initialized to 0x0000.
TABLE 11-11: SERIAL INSTRUCTION EXECUTION FOR READING ALL CONFIGURATION MEMORY
Command
(Binary)
Data
(Hexadecimal)
Description
Step 1: Exit the Reset vector.
0000
040100
000000
GOTO 0x100
NOP
Step 2: Initialize TBLPAG, and the read pointer (W6) and the write pointer (W7) for TBLRD instruction.
0000
200F80
880190
EB0300
EB0380
000000
MOV
#0xF8, W0
MOV
W0, TBLPAG
CLR
W6
CLR
W7
NOP
Step 3: Read the Configuration register and write it to the VISI register (located at 0x784).
0000
BA0BB6
000000
883C20
000000
TBLRDL [W6++], [W7]
NOP
MOV
W0, VISI
NOP
Step 4: Output the VISI register using the REGOUT command.
0001
0000
<VISI>
000000
Clock out contents of VISI register
NOP
Step 5: Reset device internal PC.
0000
040100
000000
GOTO 0x100
NOP
Step 6: Repeat steps 3-5 six times to read all of configuration memory.