Temperature Sensor Measurement

Appendix B.

Program Listing

;**************************************************************

;

;(c) copyright Freescale Semiconductor. 2006

;ALL RIGHTS RESERVED

;

;**************************************************************

;**************************************************************

;* DC Fan Coding for 9RS08KA2

 

;*

Vincent Ko

 

;* Author:

 

;* Date:

Jan 2006

 

;*

 

RC input

;* PTA0/KBI0/ACMP+

;* 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_1equ$00

ICS_DIV_2equ$40

ICS_DIV_4equ$80

ICS_DIV_8equ$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

 

 

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

 

 

Freescale Semiconductor

25

Page 25
Image 25
Freescale Semiconductor DRM079 manual Appendix B Program Listing