Instructions
369 C-Control Pro IDE
© 2013 Conrad Electronic
void Timer_T0PW(byte PW);
Sub Timer_T0PW(PW As Byte)
Description
This function sets a new pulse width for Timer0 without changing the prescaler.
For the pulse width parameters do not use the value zero. See Pulse Width Modulation
Parameter
PW pulse width
5.26.1.12 Timer_T0PWM
Timer Functions
Syntax
void Timer_T0PWM(byte PW, byte PS);
Sub Timer_T0PWM(PW As Byte, PS As Byte)
Description
This function initializes Timer0 with given prescaler and pulse width, see table. The output signal is gener-
ated at Mega32: PortB.3 (PIN4), Mega128: PortB.4 (X1_4). There is an extended prescaler definition for
the Mega128, see table.
Parameter
For the pulse width parameters do not use the value zero. See Pulse Width Modulation
PW pulse width
PS prescaler
Table prescaler:
Prescaler
Tickduration Mega32
PS0_1 (1)
67,8 ns
PS0_8 (2)
542,5 ns
PS0_64 (3)
4,34 µs
PS0_256 (4)
17,36 µs
PS0_1024 (5)
69,44 µs
Prescaler
Tickduration Mega128
Tickduration Mega128 CAN