Datasheet

© 2007 Microchip Technology Inc. DS39907A-page 23
PIC24FJXXXGA1/GB1
3.9 Reading Configuration Words
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 ‘0s) instead of 24-bit words.
Configuration Words are read one register at a time.
Table 3-10 shows the ICSP programming details for
reading the Configuration Words. Note that the
TBLPAG register must be loaded with 00h for 64 Kbyte
and below devices and 01h for 128 Kbyte and larger
devices (the upper byte address of configuration mem-
ory), and the Read Pointer, W6, is initialized to the
lower 16 bits of the Configuration Word location.
TABLE 3-10: SERIAL INSTRUCTION EXECUTION FOR READING ALL CONFIGURATION MEMORY
Command
(Binary)
Data
(Hex)
Description
Step 1: Exit Reset vector.
0000
0000
0000
000000
040200
000000
NOP
GOTO 0x200
NOP
Step 2: Initialize TBLPAG, the Read Pointer (W6) and the Write Pointer (W7) for TBLRD instruction.
0000
0000
0000
0000
0000
200xx0
880190
2xxxx7
207847
000000
MOV <CW3Address23:16>, W0
MOV W0, TBLPAG
MOV <CW3Address15:0>, W6
MOV #VISI, W7
NOP
Step 3: Read the Configuration register and write it to the VISI register (located at 784h), and clock out the
VISI register using the REGOUT command.
0000
0000
0000
0001
0000
BA0BB6
000000
000000
<VISI>
000000
TBLRDL [W6++], [W7]
NOP
NOP
Clock out contents of VISI register
NOP
Step 4: Repeat Step 3 twice to read Configuration Word 2 and Configuration Word 1.
Step 5: Reset device internal PC.
0000
0000
040200
000000
GOTO 0x200
NOP