Instructions

393 C-Control Pro IDE
© 2013 Conrad Electronic
Sub Timer_GetCounterVal(timer As Byte) As Word
Description
Returns the 16-bit counter of a timer.
Parameter
timer number of timer (0 - 5)
Return Parameter
counter value
5.26.2.11 Timer_Set
Timer Functions
Syntax
void Timer_Set(byte timer, byte PS, word period, word flags);
Sub Timer_Set(timer As Byte, PS As Byte, period As Word, flags As Word)
Description
This function initializes the timer with the specified prescaler and period, see Table. Through the use
of flags (you can have multiple values ??ORing), an interrupt is triggered and/or a signal on pins
TIMERx-A resp. TIMERx-B is generated (see Pin Assignment).
Due to the configuration of the connected peripheral not all pin TIMERx-A and TIMERx-B are
available.
Parameter
timer number of timer (0 - 5)
PS prescaler
period signal period
flags timer options
Table prescaler:
Vorteiler (prescaler)
Tickduration
TIM_32KHZ (0)
31,25 µs
TIM_2 (1)
30,30 ns
TIM_8 (2)
121,21 ns
TIM_32 (3)
484,84 ns