AN2690 Freescale Semiconductor / Motorola, AN2690 Datasheet - Page 24

no-image

AN2690

Manufacturer Part Number
AN2690
Description
Low Frequency EEPROM Emulation on the MC68HLC908QY4
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2690
DDRB0
DDRB1
DDRB2
DDRB3
DDRB4
DDRB5
DDRB6
DDRB7
;Bit defs for OSCSTAT register
ECGST
ECGON
;Constants
LED_TIMEOUT_PERIOD
DEBOUNCE_TIME
;********************************** variable/data section **********************************
MY_ZEROPAGE0: SECTION
ApplicationFlags
CopySRSR
DebounceCounter
LedTimeOutCount
CopyLedPattern
ROM_ROUTINES_RAM:
Reserved0
AppCPUSpd
Reserved1
RamBfrStrt
MY_ZEROPAGE1: SECTION SHORT
;************************************** code section ***************************************
MyCode:
main:
Entry:
OtherRst:
24
rsp
clrh
clra
clrx
jsr
lda
sta
;Check for POR
brset
;Check for ILOP
brset
;****Include other reset checks here ****
CommonInit
SRSR
CopySRSR
POR, CopySRSR, PORset
ILOP, CopySRSR, ILOPset
SECTION
EQU 0
EQU 1
EQU 2
EQU 3
EQU 4
EQU 5
EQU 6
EQU 7
EQU 0
EQU 1
EQU 100
EQU 3
ds.b 1
ds.b 1
ds.b 1
ds.b 1
ds.b 1
SECTION SHORT
ds.b 1
ds.b 1
ds.b 2
ds.b 3
Low Frequency EEPROM Emulation on the MC68HLC908QY4
SHORT
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
; Led update rate = 100 x System tick(10ms) = 1000ms
; Debounce time = 3 x System tick = 30ms
; Section bytes $80-$87
; Flags used in application
; Temp copy of SRSR register
; Used to time debounce period
; Used to time LED update rate
; Temp copy of Led pattern.
; Reserved RAM for ROM Routines ($88-$8F)
; CtrlByt
; CPUSpd
; LstAddr
; data buffer size - BfrStrt
; Section bytes $90-$FF
; Code Starts at $EE40
; Reset SP to $FF. Stacksize $30
;Initialise common variables:Config1,Config2
;Debounce and LED timeout, PortA and PortB
;Read and clear reset status register
;Copy to temp variable, as read clears flags
$88
$89
$8A-$8B
Could CopySRSR be used
$8C-$8E
MOTOROLA

Related parts for AN2690