AN2183 Freescale Semiconductor / Motorola, AN2183 Datasheet - Page 22

no-image

AN2183

Manufacturer Part Number
AN2183
Description
Using FLASH as EEPROM on the MC68HC908GP32
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Application Note
;********************************************************************************************
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;********************************************************************************************
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
;*
EERead:
;
;
;
;
;
;
;
;
;
;
22
Read FlashEE Block Subroutine
This subroutine expects H:X to be pointing to the first FlashEE page location and returns
with H:X pointing to the most recent FlashEE data.
forward in ACC.
Calling convention:
Returns:
Changes:
Find first erased location within FlashEE page.
Check for room within first FlashEE row.
If the entire row is erased, then return with H:X unchanged.
erased FlashEE block is within the first program row, then return pointing to the
block just before it.
Check for room within second FlashEE row.
Motorola reserves the right to make changes without further notice to any product
herein to improve reliability, function, or design.
liability arising out of the application or use of any product, circuit, or software
described herein; neither does it convey any license under its patent rights nor the
rights of others.
use as components in systems intended for surgical implant into the body, or other
applications intended to support life, or for any other application in which the
failure of the Motorola product could create a situation where personal injury or
death may occur.
intended or unauthorized application, Buyer shall indemnify and hold Motorola and
its officers, employees, subsidiaries, affiliates, and distributors harmless against
all claims, costs, damages, and expenses, and reasonable attorney fees arising out
of, directly or indirectly, any claim of personal injury or death associated with
such unintended or unauthorized use, even if such claim alleges that Motorola was
negligent regarding the design or manufacture of the part.
Motorola and the Motorola logo are registered trademarks of Motorola Ltd.
ldhx
lda
jsr
psha
pshx
bsr
cpx
beq
cmp
bpl
#EE_StartAddr
#EE_BlockSize
EERead
H:X ->
ACC =
everything
EEFindFirst
1,sp
EERead3
2,sp
EERead2
Should Buyer purchase or use Motorola products for any such
FlashEE block address
first FlashEE data byte
Motorola products are not designed, intended, or authorized for
Freescale Semiconductor, Inc.
For More Information On This Product,
==========================================================
Go to: www.freescale.com
; save FlashEE data block size
; save FlashEE address lsb on stack
; go find next free location
; check if start of 1st row is 1st blank location
; exit if so
; check if there’s room for another data block
; exit if so
The FlashEE data block size is passed
Motorola does not assume any
If the next available
MOTOROLA
AN2183
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*

Related parts for AN2183