Procedures demonstrating ISP function
IFMT ← xxxxx011B
/* choice page-erasing command */
ISPCR ← 100xx010B
/* set ISPEN=1 to enable flash change.
set WAIT=010, 10942 MC; assumed 10M X’s*/
/* specify the address of the page to be erased */
IFADRH ← (page address high byte)
IFADRL ← (page address low byte)
SCMD ← 46h
/* trig ISP activity */
SCMD ← B9h
(CPU progressing will be hold here )
(CPU continues)
Erase a specific flash page
IFMT ← xxxxx010 B
ISPCR ← 100xx010B
/* choice byte-programming command */
/* set ISPEN=1 to enable flash change.
set WAIT=010, 60 MC; assumed 10M X’s*/
/* specify the address to be programmed */
IFADRH ← (Address high byte)
IFADRL ← (Address low byte)
IFD ← (byte date to be written into flash)
SCMD ← 46h
/* prepare data source */
/* trig ISP activity */
SCMD ← B9h
(CPU progressing will be hold here)
(CPU continues)
Program a byte into flash
IFMT ← xxxxx001 B
ISPCR ← 100xx010B
/* choice byte-read command */
/* set ISPEN=1 to enable flash change.
set WAIT=010, 11 MC; assumed 10M X’s*/
/* specify the address to be read */
IFADRH ← (Address high byte)
IFADRL ← (Address low byte)
SCMD ← 46h
/* trig ISP activity */
SCMD ← B9h
(CPU progressing will be hold here)
(CPU continues and currently IFD contain the desired data byte )
Read a byte from flash
62
MPC82x54A Data Sheet
MEGAWIN