mpc82x52a Megawin Technology, mpc82x52a Datasheet - Page 60

no-image

mpc82x52a

Manufacturer Part Number
mpc82x52a
Description
8-bit Micro-controller
Manufacturer
Megawin Technology
Datasheet
In System Programming and In Application Programming
In System Programming (ISP)
60
To develop a good program for ISP function, the user has to understand the architecture of the
embedded flash.
The embedded flash consists of 16 pages. Each page contains 512 bytes.
Dealing with flash, the user must erase it in page unit before writing (programming) data into
it.
Erasing flash means setting the content of that flash to FFh. Two erase modes are available in
this chip. One is mass mode and the other is page mode. The mass mode gets more
performance, but it erases the entire flash. The page mode has less performance, but it is
more flexible because it erases flash in page unit.
Unlike RAM’s real-time operation, to erase flash or to write (program) flash often takes longer
time to finish.
Furthermore, it is a quite complex timing procedure to erase/program flash. Fortunately, the
MPC82x52A carried with convenient mechanism to help the user read/change the flash
content. Just filling the target address and data into several SFR, and triggering the built-in
ISP automation, the user can easily erase, read, and program the embedded flash.
There are several SFR designed to help the user implement the ISP functionality.
SFR: IFD (ISP Flash Data register)
SFR: IFADRH (ISP Flash Address High byte)
SFR: IFADRL (ISP Flash Address Low byte)
SFR: IFMT (ISP Flash-operating Mode Table)
IFD is the data port register for ISP/IAP operation. The data in IFD will be written into the desired
address in operating ISP write and it is the data window of readout in operating ISP read.
IFADRH is the high byte address for all ISP/IAP operation.
Against in advertise effect, if one bit of IFADRH [7:5] is set, the ISP write function must fail.
IFADRL is the low byte address for all ISP/IAP operation.
Bit-7
Bit-7
Bit-7
Bit-7
-
Must be cleared to 000
Bit-6
Bit-6
Bit-6
Bit-6
-
Data to be written into flash, or data got from flash
Bit-5
Bit-5
Bit-5
Bit-5
-
MPC82x52A Data Sheet
ISP/IAP address Low byte
Bit-4
Bit-4
Bit-4
Bit-4
-
Bit-3
Bit-3
Bit-3
Bit-3
ISP/IAP address High byte
-
Bit-2
Bit-2
Bit-2
Bit-2
-
Bit-1
Bit-1
Bit-1
Bit-1
Mode Selection
MEGAWIN
Bit-0
Bit-0
Bit-0
Bit-0

Related parts for mpc82x52a