1 /** ###################################################################
\r
2 ** THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
\r
3 ** Filename : TickTimer.H
\r
4 ** Project : RTOSDemo
\r
5 ** Processor : MC9S12C32CFU
\r
6 ** Beantype : TimerInt
\r
7 ** Version : Bean 02.063, Driver 01.05, CPU db: 2.87.276
\r
8 ** Compiler : Metrowerks HC12 C Compiler
\r
9 ** Date/Time : 18/06/2005, 17:53
\r
11 ** This bean "TimerInt" implements a periodic interrupt.
\r
12 ** When the bean and its events are enabled, the "OnInterrupt"
\r
13 ** event is called periodically with the period that you specify.
\r
14 ** TimerInt supports also changing the period in runtime.
\r
15 ** The source of periodic interrupt can be timer compare or reload
\r
16 ** register or timer-overflow interrupt (of free running counter).
\r
18 ** Timer name : TIM (16-bit)
\r
19 ** Compare name : TC0
\r
20 ** Counter shared : No
\r
22 ** High-speed CPU mode
\r
23 ** Prescaler : divide-by-4
\r
24 ** Clock : 5999000 Hz
\r
25 ** Initial period/frequency
\r
26 ** Xtal ticks : 16000
\r
27 ** microseconds : 1000
\r
29 ** seconds (real) : 0.0010000
\r
33 ** Runtime setting : period/frequency interval (continual setting)
\r
34 ** ticks : 16000 to 160000 ticks
\r
35 ** microseconds : 1000 to 10000 microseconds
\r
36 ** milliseconds : 1 to 10 milliseconds
\r
37 ** seconds (real) : 0.0010000 to 0.0100000 seconds
\r
38 ** Hz : 100 to 1000 Hz
\r
45 ** Counter : TCNT [68]
\r
48 ** Prescaler : TSCR2 [77]
\r
50 ** Compare registers
\r
51 ** Compare : TC0 [80]
\r
53 ** Flip-flop registers
\r
54 ** Mode : TCTL2 [73]
\r
56 ** Enable - byte TickTimer_Enable(void);
\r
57 ** SetFreqHz - byte TickTimer_SetFreqHz(word Freq);
\r
59 ** (c) Copyright UNIS, spol. s r.o. 1997-2002
\r
60 ** UNIS, spol. s r.o.
\r
64 ** http : www.processorexpert.com
\r
65 ** mail : info@processorexpert.com
\r
66 ** ###################################################################*/
\r
71 /* MODULE TickTimer. */
\r
75 #pragma CODE_SEG TickTimer_CODE /* Code section for this module. */
\r
77 #define TickTimer_SFHzMin 100 /* Lower bound of interval for method SetFreqHz */
\r
78 #define TickTimer_SFHzMax 1000 /* Upper bound of interval for method SetFreqHz */
\r
81 byte TickTimer_Enable(void);
\r
83 ** ===================================================================
\r
84 ** Method : TickTimer_Enable (bean TimerInt)
\r
87 ** Enable the bean - it starts the timer. Events may be
\r
88 ** generated ("DisableEvent"/"EnableEvent").
\r
89 ** Parameters : None
\r
91 ** --- - Error code, possible codes:
\r
93 ** ERR_SPEED - This device does not work in
\r
94 ** the active speed mode
\r
95 ** ===================================================================
\r
98 byte TickTimer_SetFreqHz(word Freq);
\r
100 ** ===================================================================
\r
101 ** Method : TickTimer_SetFreqHz (bean TimerInt)
\r
104 ** This method sets the new frequency of the generated
\r
105 ** events. The frequency is expressed in Hz as a 16-bit
\r
106 ** unsigned integer number.
\r
107 ** This method is available only if runtime setting type
\r
108 ** 'from interval' is selected in the Timing dialog box in
\r
109 ** Runtime setting area.
\r
111 ** NAME - DESCRIPTION
\r
112 ** Freq - Frequency to set [in Hz]
\r
113 ** (100 to 1000 Hz)
\r
115 ** --- - Error code, possible codes:
\r
117 ** ERR_SPEED - This device does not work in
\r
118 ** the active speed mode
\r
119 ** ERR_MATH - Overflow during evaluation
\r
120 ** ERR_RANGE - Parameter out of range
\r
121 ** ===================================================================
\r
124 #pragma CODE_SEG __NEAR_SEG NON_BANKED /* Interrupt section for this module. Placement will be in NON_BANKED area. */
\r
125 __interrupt void TickTimer_Interrupt(void);
\r
126 #pragma CODE_SEG TickTimer_CODE /* Code section for this module. */
\r
128 ** ===================================================================
\r
129 ** Method : TickTimer_Interrupt (bean TimerInt)
\r
132 ** This method is internal. It is used by Processor Expert
\r
134 ** ===================================================================
\r
137 void TickTimer_Init(void);
\r
139 ** ===================================================================
\r
140 ** Method : TickTimer_Init (bean TimerInt)
\r
143 ** This method is internal. It is used by Processor Expert
\r
145 ** ===================================================================
\r
148 #pragma CODE_SEG DEFAULT /* Change code section to DEFAULT. */
\r
150 /* END TickTimer. */
\r
152 #endif /* ifndef __TickTimer */
\r
154 ** ###################################################################
\r
156 ** This file was created by UNIS Processor Expert 03.33 for
\r
157 ** the Motorola HCS12 series of microcontrollers.
\r
159 ** ###################################################################
\r