Instructions
382Libraries
© 2013 Conrad Electronic
5.26.1.37
Timer_T3PWA
Timer Functions
Syntax
void Timer_T3PWA(word PW0);
Sub Timer_T3PWA(PW0 As Word)
Description
This function sets a new pulse width (Channel A) for Timer3 without changing the prescaler.
For the pulse width parameters do not use the value zero. See Pulse Width Modulation
Parameter
PW0 pulse width
5.26.1.38 Timer_T3PM
Timer Functions
Syntax
void Timer_T3PM(byte Mode, byte PS);
void Timer_T3PM(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_3 and sets the prescaler.
Parameter
Mode 0 = pulse width measurement, 1 = period measurement
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