dsPIC30F Flash Programming Specification
DS70102K-page 54
2010 Microchip Technology Inc.
12.0 PROGRAMMING THE
PROGRAMMING EXECUTIVE
TO MEMORY
12.1
Overview
If it is determined that the programming executive does
not reside in executive memory (as described in
Memory”), it must be programmed into executive
memory using ICSP and the techniques described in
Storing the programming executive to executive
memory is similar to normal programming of code
memory. The executive memory must first be erased,
and then the programming executive must be
programmed 32 words at a time. This control flow is
summarized in Table 12-1.
TABLE 12-1:
PROGRAMMING THE PROGRAMMING EXECUTIVE
Command
(Binary)
Data
(Hexadecimal)
Description
Step 1: Exit the Reset vector and erase executive memory.
0000
040100
000000
GOTO 0x100
NOP
Step 2: Initialize the NVMCON to erase executive memory.
0000
24072A
883B0A
MOV
#0x4072, W10
MOV
W10, NVMCON
Step 3: Unlock the NVMCON for programming.
0000
200558
883B38
200AA9
883B39
MOV
#0x55, W8
MOV
W8, NVMKEY
MOV
#0xAA, W9
MOV
W9, NVMKEY
Step 4: Initiate the erase cycle.
0000
0000
A8E761
000000
000000
A9E761
000000
BSET NVMCON, #15
NOP
Externally time ‘P13a’ ms (see Section 13.0 “AC/DC Characteristics and
NOP
BCLR NVMCON, #15
NOP
Step 5: Initialize the TBLPAG and the write pointer (W7).
0000
200800
880190
EB0380
000000
MOV
#0x80, W0
MOV
W0, TBLPAG
CLR
W7
NOP
Step 6: Initialize the NVMCON to program 32 instruction words.
0000
24001A
883B0A
MOV
#0x4001, W10
MOV
W10, NVMCON
Step 7: Load W0:W5 with the next 4 words of packed programming executive code and initialize W6 for
programming. Programming starts from the base of executive memory (0x800000) using W6 as a read
pointer and W7 as a write pointer.
0000
2<LSW0>0
2<MSB1:MSB0>1
2<LSW1>2
2<LSW2>3
2<MSB3:MSB2>4
2<LSW3>5
MOV
#<LSW0>, W0
MOV
#<MSB1:MSB0>, W1
MOV
#<LSW1>, W2
MOV
#<LSW2>, W3
MOV
#<MSB3:MSB2>, W4
MOV
#<LSW3>, W5
相关PDF资料
PIC24FJ64GB002-I/ML IC MCU 16BIT 64KB FLASH 28QFN
52746-1270 CONN FFC 12POS .5MM R/A ZIF SMD
TS80C31X2-MCE IC MCU 8BIT 40/20MHZ 44-VQFP
52746-0870 CONN FFC 8POS .5MM R/A ZIF SMD
PIC24FJ128GA008-I/PT IC PIC MCU FLASH 128K 80TQFP
PIC16F737-I/SP IC PIC MCU FLASH 4KX14 28DIP
PIC18F86K22-I/PTRSL MCU PIC 64K FLASH XLP 80TQFP
PIC16C63A-04I/SP IC MCU OTP 4KX14 PWM 28DIP
相关代理商/技术参数
DSPIC30F1010-30I/W 制造商:MICROCHIP 制造商全称:Microchip Technology 功能描述:28/44-Pin High-Performance Switch Mode Power Supply Digital Signal Controllers
DSPIC30F1010AT-20E/PF 制造商:MICROCHIP 制造商全称:Microchip Technology 功能描述:High-Performance, 16-Bit Digital Signal Controllers
DSPIC30F1010AT-20I/PF 制造商:MICROCHIP 制造商全称:Microchip Technology 功能描述:High-Performance, 16-Bit Digital Signal Controllers
DSPIC30F1010AT-30I/PF 制造商:MICROCHIP 制造商全称:Microchip Technology 功能描述:High-Performance, 16-Bit Digital Signal Controllers
DSPIC30F1010BT-20I/PF 制造商:MICROCHIP 制造商全称:Microchip Technology 功能描述:High-Performance, 16-Bit Digital Signal Controllers
DSPIC30F1010BT-30I/PF 制造商:MICROCHIP 制造商全称:Microchip Technology 功能描述:High-Performance, 16-Bit Digital Signal Controllers
DSPIC30F1010CT-20I/PF 制造商:MICROCHIP 制造商全称:Microchip Technology 功能描述:High-Performance, 16-Bit Digital Signal Controllers
DSPIC30F1010CT-30I/PF 制造商:MICROCHIP 制造商全称:Microchip Technology 功能描述:High-Performance, 16-Bit Digital Signal Controllers