mpc82g516a Megawin Technology, mpc82g516a Datasheet - Page 108

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.3.2 Demo Code for IAP
As mentioned above, all the ISP modes can also be applied to the IAP operation. The demo codes for these
modes are shown below.
Demo code for triggering the “Page Erase Mode”
Demo code for triggering the “Program Mode”
Demo code for triggering the “Read Mode”
MEGAWIN
MOV
MOV
MOV
MOV
MOV
MOV
;Now, MCU will halt here until processing completed
MOV
MOV
MOV
MOV
MOV
MOV
MOV
;Now, MCU will halt here until processing completed
MOV
MOV
MOV
MOV
MOV
MOV
;Now, MCU will halt here until processing completed
MOV
...
...
ISPCR,#10000011b ;ISPCR.7=1, enable ISP
IFMT,#03h
IFADRH,??
IFADRL,??
SCMD,#46h
SCMD,#0B9h
ISPCR,#10000011b ;ISPCR.7=1, enable ISP
IFMT,#02h
IFADRH,??
IFADRL,??
IFD,??
SCMD,#46h
SCMD,#0B9h
ISPCR,#10000011b ;ISPCR.7=1, enable ISP
IFMT,#01h
IFADRH,??
IFADRL,??
SCMD,#46h
SCMD,#0B9h
A,IFD
;ISPCR[2:0]=011,
;select Page Erase Mode
;fill [IFADRH,IFADRL] with page address
;! the page address must be within the IAP-memory
;trigger ISP processing
;
;ISPCR[2:0]=011,
;select Program Mode
;fill [IFADRH,IFADRL] with byte address
;! the byte address must be within the IAP-memory
;fill IFD with the data to be programmed
;trigger ISP processing
;
;ISPCR[2:0]=011,
;select Read Mode
;fill [IFADRH,IFADRL] with byte address
;! the byte address must be within the IAP-memory
;trigger ISP processing
;
;now, the read data exists in IFD
MPC82G516A Data Sheet
suppose MPC82-series running @11.0592MHz
suppose MPC82-series running @11.0592MHz
suppose MPC82-series running @11.0592MHz
108

Related parts for mpc82g516a