AN2690 Freescale Semiconductor / Motorola, AN2690 Datasheet - Page 32

no-image

AN2690

Manufacturer Part Number
AN2690
Description
Low Frequency EEPROM Emulation on the MC68HLC908QY4
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2690
;*******************************************************************************************
FindClear:
floop:
finish2:
finish1:
;*******************************************************************************************
;* Name:
;* Description:
;*
;*
;* Calling Convention:
;* Inputs:
;* Outputs:
;* Routines used:
;* Stack usage:
;*******************************************************************************************
Timer_isr:
SetSystemTick:
;*******************************************************************************************
32
lda
sub
psha
lda
cmp
beq
pula
sub
psha
bmi
txa
add
tax
bra
clra
ais
rts
pshh
*
dec
bne
bset
mov
bset
lda
bclr 7,TSC
*
pulh
rti
TSC
SYSTEM_TICK_FLAG,ApplicationFlags
#$40
3,sp
,x
#$FF
finish1
3,sp
finish2
4,sp
floop
#1
LedTimeOutCount
SetSystemTick
UPDATE_LED_FLAG, ApplicationFlags
#LED_TIMEOUT_PERIOD, LedTimeOutCount ; Reset Led TimeOut
Low Frequency EEPROM Emulation on the MC68HLC908QY4
Timer_isr
ISR for overflow timer.
has occured.
bsr Timer_isr
none
none
none
none
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
The TOF flag is also cleared before exiting ISR
;number of bytes in a page
;less number in first block
;save bytes left
;get first data byte in block
;erased byte ?
;if so then exit, otherwise try next
;bytes left
;less number in next block
;resave bytes left
;enough for another block ?
;yes, get LS byte of address
;add block size
;put it back (can't be a carry)
;and try again
;no room (A shouldn't be $FF)
;fix stack pointer
; save H reg.
; dec count
; Look for LedTimeOut = 0
; clear TOF
; get H back
;Interrupt occured
Systemtick flag set to indicate that timeout
; Set LED flag
MOTOROLA

Related parts for AN2690