AN2183 Freescale Semiconductor / Motorola, AN2183 Datasheet - Page 7

no-image

AN2183

Manufacturer Part Number
AN2183
Description
Using FLASH as EEPROM on the MC68HC908GP32
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Microcontroller
Bus Frequency
Parameters
flashee.asm Subroutines
AN2183
MOTOROLA
The parameters for FlashEE1 are initially defined as:
EE_StartAddr1:
EE_BlockSize1:
The parameters for FlashEE2 are initially defined as:
EE_StartAddr2:
EE_BlockSize2:
Note that the assembler will assign the label "EE_StartAddr2" with a
value of $8080.
The FlashEE subroutines employ delay loops that must be tuned to the
microcontroller bus frequency. The values for these parameters for a
bus frequency of 7.3728 MHz are provided in the software listing. If a
different bus frequency is desired, then these parameters must be
changed in accordance with the formula provided, specifically:
As an example, a delay of 30 s with a bus frequency of 7.3728 MHz
would result in the following:
For a 7.3728-MHz bus frequency, the required parameters are initially
defined as:
RamDelay5:
RamDelay10:
RamDelay30:
RamDelay50:
This file contains the FlashEE subroutine source code and must be
included in the application program file. These subroutines only use local
variables on the stack and, hence, do not require any other predefined
global variable space resources. The maximum available stack space
Freescale Semiconductor, Inc.
For More Information On This Product,
Value = ((delay in s) x (bus frequency in MHz) – 2)
RamDelay30 = ((30) x (7.3728) – 2)
Go to: www.freescale.com
equ
equ
equ
equ
equ
equ
equ
equ
$8000
5
{EE_StartAddr2+EE_FlashPage}
7
12
24
74
122
3 = 73.06
flashee.asm Subroutines
Application Note
74
3
7

Related parts for AN2183