Instructions
375 C-Control Pro IDE
© 2013 Conrad Electronic
5.26.1.23
Timer_T1PM
Timer Functions
Syntax
void Timer_T1PM(byte Mode, byte PS);
void Timer_T1PM(Mode As Byte, PS As Byte)
Description
This function defines if pulse width measurement or period measurement should be done. Then it ini-
tializes Timer_1 and sets the prescaler.
Parameter
Mode 0 = pulse width measurement, 1 = period measurement
PS prescaler
Table prescaler:
Prescaler
Tickduration Mega32 + 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.24 Timer_T1PWB
Timer Functions
Syntax
void Timer_T1PWB(word PW1);
Sub Timer_T1PWB(PW1 As Word)
Description
This function sets a new pulse width (Channel B) for Timer1 without changing the prescaler.
For the pulse width parameters do not use the value zero. See Pulse Width Modulation
Parameter
PW1 pulse width