AN2690 Freescale Semiconductor / Motorola, AN2690 Datasheet - Page 27

no-image

AN2690

Manufacturer Part Number
AN2690
Description
Low Frequency EEPROM Emulation on the MC68HLC908QY4
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
WaitForReset:
;*******************************************************************************************
;* Name:
;* Description:
;*
;*
;*
;*
;* Calling Convention:
;* Inputs:
;* Outputs:
;* Routines used:
;* Stack usage:
;*******************************************************************************************
CommonInit:
MOTOROLA
;**** Config Registers *****
mov
;prepare for reset
STOP
bra
mov
mov
mov
mov
mov
mov
mov
WaitForReset
#DEBOUNCE_TIME, DebounceCounter
#LED_TIMEOUT_PERIOD, LedTimeOutCount ;Init Led TimeOut
#$39,CONFIG1
#$99,CONFIG2
#$00,PORTA
#$10,DDRA
#$78,DDRB
#$4,AppCPUSpd
Low Frequency EEPROM Emulation on the MC68HLC908QY4
CommonInit
Initialises the registers that are not Reset specific.
initialised are CONFIG1,CONFIG2, PORTA,DDRA, PORTB, and DDRB. The
EEPROM driver speed is also configured in this routine
bsr CommonInit
none
none
none
none
with 1MHz bus. (4x0.25MHz)
Freescale Semiconductor, Inc.
;COPRS = 0
;LVISTOP = 0
;LVIRSTD = 1
;LVIPWRD = 1
;LVDLVR = 1
;SSREC = 0
;STOP = 0
;COPD = 1
;IRQPUD = 1
;IRQEN = 0
;R = 0
;OSCOPT1:0= 11 - Xtal Crystal
;R = 0
;R = 0
;RSTEN = 1
;PortA inputs
;PTA4 set as output.
;PORTB7 = 0 - Input
;PORTB6 = 1 - Output (D5)
;PORTB5 = 1 - Output (D6)
;PORTB4 = 1 - Output (D7)
;PORTB3 = 1 - Output (D8)
;PORTB2 = 0 - Input
;PORTB1 = 0 - Input
;PORTB0 = 0 - Input (S1)
;Init EEPROM programming driver for operation
For More Information On This Product,
Go to: www.freescale.com
;Force Ilegal Opcode reset
- COP Reset Period = (2^18-2^4)xBUSCLKK4 cycles
- LVI Disabled during STOP Mode
- LVI Module resets disabled
- LVI Module power disabled
- LVI trip voltage level set to LVR trip voltage
- Stop mode recovery after 4096 BUSCLKX4 cycles
- STOP Instruction treated as illegal opcode
- COP Disabled
- IRQ Internal pullup disconnected
- IRQ Pin function disabled
- RST Pin function Active
;Init debounce counter for next itereation
Appendix A: Sample Application
The registers
AN2690
27

Related parts for AN2690