English
Language : 

MC908JB16DWE Datasheet, PDF (68/332 Pages) Freescale Semiconductor, Inc – Microcontrollers
FLASH Memory
4.9.1 Variables
The ROM-resident routines use three variables: CTRLBYT, CPUSPD
and LADDR; and one data buffer. The minimum size of the data buffer
is one byte and the maximum size is 64 bytes.
CPUSPD must be set before calling the erase or programming routines,
and should be set to four times the value of the CPU internal bus speed
in MHz. For example: for CPU speed of 6MHz, CPUSPD should be set
to 24.
Table 4-2. Summary of FLASH Routine Variables
Variable
CTRLBYT
CPUSPD
LADDR
DATABUF
Address
$0088
$0089
$008A–$008B
$0100–$013F
Description
Control byte for setting mass or block erase.
Timing adjustment for different CPU speeds.
Last FLASH address to be programmed.
Data buffer for programming and verifying.
4.9.2 ERASE Routine
The ERASE routine erases the entire or a block of FLASH memory. The
routine does not check for a blank range before or after erase.
NOTE: A block erase cannot be performed on the last block of FLASH memory
(user vector at $FFD0)–$FFFF).
Table 4-3. ERASE Routine
Routine
ERASE
Calling Address $FC06
Stack Use
5 Bytes
Input
CPUSPD — CPU speed
HX —
Contains any address in the range to be
erased
CTRLBYT — Mass or block erase
Mass erase if bit 6 = 1
Block erase if bit 6 = 0
Technical Data
68
FLASH Memory
MC68HC908JB16 — Rev. 1.1
Freescale Semiconductor