Instructions
373 C-Control Pro IDE
© 2013 Conrad Electronic
period period duration
PS prescaler
Table prescaler:
Prescaler
Tickduration Mega32 + Mega128
Tickduration Mega128 CAN
PS_1 (1)
135,6 ns
125 ns
PS_8 (2)
1,085 µs
1 µs
PS_64 (3)
8,681 µs
8 µs
PS_256 (4)
34,72 µs
32 µs
PS_1024 (5)
138,9 µs
128 µs
5.26.1.19 Timer_T1FRQX
Timer Functions
Syntax
void Timer_T1FRQX(word period, word skew, byte PS);
Sub Timer_T1FRQX(period As Word, skew As Word, PS As Byte)
Description
This function initializes Timer1 for frequency generation. Parameters are period duration, prescaler and
phase shift,see table. The output signal is generated at Mega32: PortD.5 (PIN19). Mega128: PortB.5
(X1_3). The frequency generation is started automatically. There is an extended prescaler definition for the
Mega128, see table. The phase shift must be smaller than half the period.
Parameter
period period duration
skew phase shift
PS prescaler (table prescaler)
5.26.1.20 Timer_T1GetCNT
Timer Functions
Syntax
word Timer_T1GetCNT(void);
Sub Timer_T1GetCNT() As Word
Description
The value of Counter1 is read. If there was an overflow a value of ffff (Hex) is returned.