AN2687 Freescale Semiconductor / Motorola, AN2687 Datasheet - Page 32

no-image

AN2687

Manufacturer Part Number
AN2687
Description
BLDC Fan Control using the MC68HC908QT2
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2687/D
No_Error
* --------------------------------------------------------------------------- *
* Subroutine <Enable external clock. For EM board>
* ICG Clock = 12.8MHz, Bus Clock = 12.8MHz/4 = 3.2MHz, 1 Cycle = 0.3125us
* In
* Out
* Call
* --------------------------------------------------------------------------- *
enable_ext_clock:
Delay1
* --------------------------------------------------------------------------- *
* Subroutine <Enable internal 3.2MHz clock. For EM board>
* ICG Clock = 12.8MHz, Bus Clock = 12.8MHz/4 = 3.2MHz, 1 Cycle = 0.3125us
* In
* Out
* Call
* --------------------------------------------------------------------------- *
en_int_3M2_clk:
* --------------------------------------------------------------------------- *
* Subroutine <Initialize the Oscillator for internal clock>
* ICG Clock = 12.8MHz, Bus Clock = 12.8MHz/4 = 3.2MHz, 1 Cycle = 0.3125us
* In
* Out
* Call
* --------------------------------------------------------------------------- *
Enable_int_Clk:
32
jsr
dec
lda
bne
bra
bclr
bclr
bclr
jsr
bra
bra
mov
deca
bne
bset
nop
brclr 0,$36,*
bset
rts
mov #$20,$37
mov #$2E,$38
rts
mov
lda
sta
rts
:
:
:
:
:
:
:
:
:
<nil>
<nil>
<nil>
#18,$1E
<nil>
<nil>
<nil>
<nil>
<nil>
<nil>
Delay1
1,$36
4,$36
Delay_100ms
TMP1
TMP1
Turn_On_Again_4
Dead_Loop_2
irq_FLag,Flag
icap_Flag,Flag
start_Flag,Flag
Delay_100ms
End_Start
*
#$00,OSCSTAT
$FFC0
OSCTRIM
Freescale Semiconductor, Inc.
BLDC Fan Control using the MC68HC908QT2
For More Information On This Product,
; Dead loop, need to re-start by POR
; Delay 100ms
; For Checking only
; enable external crystal (external = $08)
; Delay 4096 cycles
; set ECGON bit
; check ECGST bit
; set this unknow bit
; turn the ICG to generated 3.2MHz bus
; use internal clock only
; use current trim value
Go to: www.freescale.com
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
MOTOROLA

Related parts for AN2687