Counter Operating Modes
6.5
The general purpose counter of the TPMC851 offers 3 Input Modes, 2 Count Modes and 4 Control Modes.
6.5.1 Input Modes
The Input Mode determines the input source for the counter and how the counter interprets these input signals:
Input Mode
I/O Line 2
I/O Line 3
I/O Line 4
Timer Mode
-
-
Available for Control
Modes
Direction Count
Count
Count direction (up/down)
Up/Down Count
Count UP
Count DOWN
Quadrature Count
Quadrature X
Quadrature Y
Table 6-3 : Input Modes
Changing the input mode does not affect the counter reading. If no input mode is selected, the counter is
disabled.
6.5.1.1 Timer Mode
In Timer mode the counter uses an internal clock prescaler as input:
Bits
Prescaler
Clock frequency
00
1x
40 MHz
01
2x
20 MHz
10
4x
10 MHz
11
8x
5 MHz
Table 6-4 : Clock Prescaler
6.5.1.2 Direction Count
The counter acts as up/down counter. Counting pulses are generated when a transition from low to high of the I/O
Line 2 is detected. The I/O Line 3 determines the count direction. I/O Line 3 = '1' is up, I/O Line 3 = '0' is down.
I/O Line 3
Count Direction
0
Down
1
Up
Table 6-5 : Count Directions
6.5.1.3 Up/Down Count
The counter acts as up/down counter. Counting pulses are generated when a transition from low to high of either
the I/O Line 2 or the I/O Line 3 is detected. The I/O Line 2 counts up, the I/O Line 3 counts down. Simultaneous
transitions on both I/O lines do not generate a counting pulse.
TPMC851 User Manual Issue 1.0.9
Page 57 of 65