mpc82g516a Megawin Technology, mpc82g516a Datasheet - Page 100

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.2 Flash Program Mode
Figure 20-3. Flow Chart for “Flash Program”
Demo code for triggering the “Program Mode”
MEGAWIN
MOV
MOV
MOV
MOV
MOV
MOV
MOV
;Now, MCU will halt here until processing completed
ISPCR,#10000011b ;ISPCR.7=1, enable ISP
IFMT,#02h
IFADRH,??
IFADRL,??
IFD,??
SCMD,#46h
SCMD,#0B9h
IFADRH= High-byte of Byte_address
IFADRL= Low-byte of Byte_address
IFD=data (to be programmed)
SCMD=0x46, then SCMD=0xB9
(trigger ISP processing by sequential
writing)
IFMT=0x02 (select Program Mode)
ISPEN=1 (enable ISP function),
and initialize ISPCR[2:0]
Address=0x0000
End of address?
Start
End
;ISPCR[2:0]=011,
;select Program Mode
;fill [IFADRH,IFADRL] with byte address
;
;fill IFD with the data to be programmed
;trigger ISP processing
;
YES
MPC82G516A Data Sheet
NO
suppose MPC82-series running @11.0592MHz
Refer to Table 20-2-1a
to initialize ISPCR[2:0]
Address=Address+1
100

Related parts for mpc82g516a