English
Language : 

MC68HC908JW32_09 Datasheet, PDF (104/232 Pages) Freescale Semiconductor, Inc – M68HC08 Microcontrollers
Monitor Mode (MON)
The control and data bytes are described below.
• Bus speed — This one byte indicates the operating bus speed of the MCU. The value of this byte
should be equal to 4 times the bus speed. E.g. for a 4MHz bus, the value is 16 ($10). This control
byte is useful where the MCU clock source is switched between the PLL clock and the crystal clock.
• Data size — This one byte indicates the number of bytes in the data array that are to be
manipulated. The maximum data array size is 255. Routines ERARNGE and MON_ERARNGE do
not manipulate a data array, thus, this data size byte has no meaning.
• Start address — These two bytes, high byte followed by low byte, indicate the start address of the
FLASH memory to be manipulated.
• Data array — This data array contains data that are to be manipulated. Data in this array are
programmed to FLASH memory by the programming routines: PRGRNGE, MON_PRGRNGE. For
the read routines: LDRNGE and data is read from FLASH and stored in this array.
7.5.1 PRGRNGE
PRGRNGE is used to program a range of FLASH locations with data loaded into the data array.
Table 7-11. PRGRNGE Routine
Routine Name PRGRNGE
Routine Description Program a range of locations
Calling Address $FE10
Stack Used 16 bytes
Data Block Format
Bus speed (BUS_SPD)
Data size (DATASIZE)
Start address high (ADDRH)
Start address (ADDRL)
Data 1 (DATA1)
:
Data N (DATAN)
The start location of the FLASH to be programmed is specified by the address ADDRH:ADDRL and the
number of bytes from this location is specified by DATASIZE. The maximum number of bytes that can be
programmed in one routine call is 255 bytes (max. DATASIZE is 255).
ADDRH:ADDRL do not need to be at a page boundary, the routine handles any boundary misalignment
during programming. A check to see that all bytes in the specified range are erased is not performed by
this routine prior programming. Nor does this routine do a verification after programming, so there is no
return confirmation that programming was successful. User must assure that the range specified is first
erased.
The coding example below is to program 64 bytes of data starting at FLASH location $EE00, with a bus
speed of 4.9152 MHz. The coding assumes the data block is already loaded in RAM, with the address
pointer, FILE_PTR, pointing to the first byte of the data block.
MC68HC908JW32 Data Sheet, Rev. 6
104
Freescale Semiconductor