mpc89x51a Megawin Technology, mpc89x51a Datasheet - Page 31

no-image

mpc89x51a

Manufacturer Part Number
mpc89x51a
Description
8-bit Micro-controller
Manufacturer
Megawin Technology
Datasheet
Booting Program Entrance
The MPC89x51A boots according to the following rule.
Above rule is adaptive only for power-up procedure, not software reset.
Switching from ISP program to AP program
The device permits the user normally start running the AP program as soon as the ISP
program has finished updating the flash content. Just program an instruction at the tail of ISP
program as
MEGAWIN
IFMT ← xxxxx001
ISPCR ← 100xx010
IFADRH ← (Address high byte)
IFADRL ← (Address low byte)
SCMD ← 46h
SCMD ← B9h
(CPU progressing will be hold here)
(CPU continues and currently IFD contain the desired data byte )
If ( HWBS == 0 )
else
IFMT ← xxxxx010
ISPCR ← 100xx010
IFADRH ← (Address high byte)
IFADRL ← (Address low byte)
IFD ← (byte date to be written into flash)
SCMD ← 46h
SCMD ← B9h
(CPU progressing will be hold here)
(CPU continues)
ISPCR ←
System will boot from ISP program
System will boot from normal AP program
001xxxxx
b
b
&&
b
b
b
MPC89x51A Data Sheet
( { ISPAS1, ISPAS0}
Program a byte into flash
Read a byte from flash
/* set ISPEN=1 to enable flash change.
/* set ISPEN=1 to enable flash change.
/* specify the address to be read */
/* prepare data source */
/* choice byte-read command */
set WAIT=010, 11 MC; assumed 10M X’s*/
set WAIT=010, 60 MC; assumed 10M X’s*/
/* specify the address to be programmed */
/* choice byte-programming command */
/* trig ISP activity */
/* trig ISP activity */
{ 1, 1 })
31

Related parts for mpc89x51a