
2010 Microchip Technology Inc.
DS70102K-page 53
dsPIC30F Flash Programming Specification
11.13 Reading the Application ID Word
The application ID word is stored at address 0x8005BE
in executive code memory. To read this memory
location, you must use the SIX control code to move
this program memory location to the VISI register. The
REGOUT control code must then be used to clock the
contents of the VISI register out of the device. The
corresponding control and instruction codes that must
be serially transmitted to the device to perform this
Once the programmer has clocked-out the application
ID word, it must be inspected. If the application ID has
the value 0xBB, the programming executive is resident
in memory and the device can be programmed using
other value, the programming executive is not resident
in memory. It must be loaded to memory before the
device can be programmed. The procedure for loading
the programming executive to the memory is described
11.14 Exiting ICSP Mode
After confirming that the programming executive is
resident in memory, or loading the programming
executive, ICSP mode is exited by removing power to
the device or bringing MCLR to VIL. Programming can
then take place by following the procedure outlined in
TABLE 11-13: SERIAL INSTRUCTION EXECUTION FOR READING THE APPLICATION ID WORD
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 (W0) for TBLRD instruction.
0000
200800
880190
205BE0
207841
000000
BA0890
000000
MOV
#0x80, W0
MOV
W0, TBLPAG
MOV
#0x5BE, W0
MOV
VISI, W1
NOP
TBLRDL [W0], [W1]
NOP
Step 3: Output the VISI register using the REGOUT command.
0001
0000
<VISI>
000000
Clock out contents of the VISI register
NOP