Instructions
386Libraries
© 2013 Conrad Electronic
5.26.1.45
Timer_T3Time
Timer Functions
Syntax
void Timer_T3Time(word Time, byte PS);
Sub Timer_T3Time(Time As Word, PS As Byte)
Description
This function initializes Timer_3 with a prescaler and a timer interval value (16bit), see table. After the tim-
ing interval is expired Timer_3 Interrupt (INT_TIM3CMPA) is triggered.
Parameter
Time time period after that the interrupt is triggered
PS prescaler
Table prescaler:
Prescaler
Tickduration Mega128
Tickduration Mega128 CAN
PS_1 (1)
67,8 ns
62,5 ns
PS_8 (2)
542,5 ns
500 ns
PS_64 (3)
4,34 µs
4 µs
PS_256 (4)
17,36 µs
16 µs
PS_1024 (5)
69,44 µs
64 µs
5.26.1.46 Timer_TickCount
Timer Functions
Syntax
word Timer_TickCount(void);
Sub Timer_TickCount() As Word
Description
Measures the number of 10ms ticks between two calls of Timer_TickCount(). Ignore the return value of
the first call to Timer_TickCount(). If the delay between the two calls is greater than 655.36 seconds,
the result is undefined.
Parameter
None