Freescale Semiconductor DRM079 Welding System User Manual


 
Temperature Sensor Measurement
Variable Speed DC Fan Control using the MC9RS08KA2, Rev. 0
Freescale Semiconductor 25
Appendix B.
Program Listing
;**************************************************************
;
; (c) copyright Freescale Semiconductor. 2006
; ALL RIGHTS RESERVED
;
;**************************************************************
;**************************************************************
;* DC Fan Coding for 9RS08KA2
;*
;* Author: Vincent Ko
;* Date: Jan 2006
;*
;* PTA0/KBI0/ACMP+ RC input
;* PTA1/KBI1/ACMP- Temp sensor input
;* PTA2/KBI2/TCLK/RESETb/VPP Hall input
;* PTA3/ACMPO/BKGD/MS Buzzer
;* PTA4/KBI4 PWM+
;* PTA5/KBI5 PWM-
;*
;**************************************************************
; include derivative specific macros
XDEF Entry
include "MC9RS08KA2.inc"
;=========================================================================
; ICS Definition
;=========================================================================
ICS_DIV_1 equ$00
ICS_DIV_2 equ$40
ICS_DIV_4 equ$80
ICS_DIV_8 equ$c0
;=========================================================================
; MTIM Definition
;=========================================================================
MTIM_DIV_1 equ $00
MTIM_DIV_2 equ $01
MTIM_DIV_4 equ $02
MTIM_DIV_8 equ $03
MTIM_DIV_16 equ $04
MTIM_DIV_32 equ $05
MTIM_DIV_64 equ $06
MTIM_DIV_128 equ $07
MTIM_DIV_256 equ $08
MTIM_BUS_CLK equ $00
MTIM_XCLK equ $10