Implementation
Variable Speed DC Fan Control using the MC9RS08KA2, Rev. 0
32
Freescale Semiconductor
lda
#255
Quiet:
bclr
BUZZER, PTAD
; Clear buzzer
mov
#30, MTIMMOD
mov
#(mMTIMSC_TRST|mMTIMSC_TOIE), MTIMSC; Reset and Start Timer
wait
mov #(mMTIMSC_TSTP|mMTIMSC_TRST), MTIMSC; mask interrupt and clear flag
sta
MAP_ADDR_6(SRS)
; Bump COP
dbnza
Quiet
bra
SoundBuzzer
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
; Lookup Table
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
org
TableStart
dc.b
57, 57, 57, 57, 57, 60, 63, 67, 71, 76, 82, 82, 88, 88, 96, 96
dc.b
105,105,115,115,115,128,128,128,128,144,144,144,144,165,165,165
dc.b
165,193,193,193,193,193,232,232,232,232,232,232,232,232,232,232
dc.b
232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
; Reset Vector
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
org
$3ffc
Security:
dc.b
$FF
jmp
main