mpc82g516a Megawin Technology, mpc82g516a Datasheet - Page 99

no-image

mpc82g516a

Manufacturer Part Number
mpc82g516a
Description
8-bit Microcontroller
Manufacturer
Megawin Technology
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
mpc82g516aE
Manufacturer:
MEGAWIN
Quantity:
1 200
Part Number:
mpc82g516aF
Manufacturer:
MEGAWIN
Quantity:
20 000
20.2.2 Introduction to the ISP Modes
The ISP modes are used in the loader program to program both the AP-memory and IAP-memory. And, they can
also be used in user’s application program to program the IAP-memory. This section shows the flow chart and
demo code for the various ISP modes.
20.2.2.1 Flash Page Erase Mode
Figure 20-2. Flow Chart for “Flash Page Erase”
Demo code for triggering the “Page Erase Mode”
99
MOV
MOV
MOV
MOV
MOV
MOV
;Now, MCU will halt here until processing completed
ISPCR,#10000011b ;ISPCR.7=1, enable ISP
IFMT,#03h
IFADRH,??
IFADRL,??
SCMD,#46h
SCMD,#0B9h
IFADRH= High-byte of Page_address
IFADRL= Low-byte of Page_address
SCMD=0x46, then SCMD=0xB9
(trigger ISP processing by sequential
writing)
IFMT=0x03 (select Page Erase Mode)
ISPEN=1 (enable ISP function),
and initialize ISPCR[2:0]
Page_address=0x0200*N
;ISPCR[2:0]=011,
;select Page Erase Mode
;fill [IFADRH,IFADRL] with page address
;
;trigger ISP processing
;
End of page?
MPC82G516A Data Sheet
Start
End
N=0
YES
N means the N
NO
suppose MPC82-series running @11.0592MHz
Refer to Table 20-2-1a
to initialize ISPCR[2:0]
th
page.
N=N+1
MEGAWIN

Related parts for mpc82g516a