Freescale Semiconductor DRM079 Mtimtclkfalling, Mtimtclkrising, Acmpoutputboth, Rtidisable, Hall

Page 26

Implementation

 

 

MTIM_TCLK_FALLING

equ

$20

MTIM_TCLK_RISING

equ

$30

;=========================================================================

;ACMP Definition ;========================================================================= ACMP_OUTPUT_FALLING equ $00

ACMP_OUTPUT_RAISING equ $01

ACMP_OUTPUT_BOTH

equ

$03

;=========================================================================

;RTI Definition ;=========================================================================

RTI_DISABLE

equ

$00

RTI_8MS

equ

$01

RTI_32MS

equ

$02

RTI_64MS

equ

$03

RTI_128MS

equ

$04

RTI_256MS

equ

$05

RTI_512MS

equ

$06

RTI_1024MS

equ

$07

;=========================================================================

;Application Definition ;=========================================================================

RC

equ

PTAD_PTAD0

mRC

equ

mPTAD_PTAD0

TEMPSEN

equ

PTAD_PTAD1

mTEMPSEN

equ

mPTAD_PTAD1

HALL

equ

PTAD_PTAD2

mHALL

equ

mPTAD_PTAD2

BUZZER

equ

PTAD_PTAD3

mBUZZER

equ

mPTAD_PTAD3

PWM2

equ

PTAD_PTAD4

mPWM2

equ

mPTAD_PTAD4

PWM1

equ

PTAD_PTAD5

mPWM1

equ

mPTAD_PTAD5

MinDeadTime

equ

2

MaxDeadTime

equ

150

TableStart:

equ

$00003E00

;=========================================================================

;Application Macro ;========================================================================= StartTimer: macro

mov

DeadTime, MTIMMOD

; OF period

mov

#(mMTIMSC_TRSTmMTIMSC_TOIE), MTIMSC; Reset and Start Timer

endm

 

 

org

TINY_RAMStart

 

; variable/data section

 

DeadTime

ds.b 1

 

 

Variable Speed DC Fan Control using the MC9RS08KA2, Rev. 0

 

 

 

26

 

Freescale Semiconductor

Image 26
Contents Variable Speed DC Fan Control using the MC9RS08KA2 Page Variable Speed DC Fan Control using the MC9RS08KA2 Revision HistoryFreescale Semiconductor Table of Contents Freescale Semiconductor Chapter Introduction IntroductionFreescale’s New Generation Ultra Low Cost MCU DC Fan Reference Design TargetsBi-Phase Bldc Motor Bi-Phase Bldc Motor DiagramFreescale Semiconductor Rotor Position Control Chapter Motor ControlCommutation Commutation Waveforms Speed ControlFault Detection Motor StartupFreescale Semiconductor Hardware Resources Block DiagramChapter Implementation Control Loop Firmware Control Loop Temperature Sensor Measurement = V DD⎜ RC⎟Acmpsc #63, MtimmodACMPSCACF, Acmpsc Temperature Conversion Temperature Conversion Table Freescale Semiconductor VR1 Freescale Semiconductor Appendix B Program Listing Mtimtclkrising RtidisableMtimtclkfalling AcmpoutputbothMAPADDR6NVICSTRM, Icstrm $3FFA #HIGH613NVICSTRM, PageselMAPADDR6NVFTRIM, Icssc #ICSDIV2, ICSC2#MTIMBUSCLKMTIMDIV256, Mtimclk KbiesKbipe #255, MtimmodMAPADDR6SRS Rts Drive coilKBISCKBACK, Kbisc MTIMSCTOF, Mtimsc#6, Mtimmod KbiscBUZZER, Ptad #24, Mtimmod#30, Mtimmod Page How to Reach Us