www.geehy.com Page 142
Table 46 Relationship between Count Direction and Encoder
Effective edge
Count only in TI1
Count only in TI2
Count in both TI1 and
TI2
Level of relative signal
High
Low
High
Low
High
Low
TI1FP1
Rising edge
—
Count
down
Count up
Count
down
Count up
Falling edge
Count up
Count
down
Count up
Count
down
TI2FP2
Rising edge
Count up
Count
down
—
Count up
Count
down
Falling edge
Count
down
Count up
Count
down
Count up
The external incremental encoder can be directly connected with MCU, not
needing external interface logic, so the comparator is used to convert the
differential output of the encoder to digital signal to increase the immunity from
noise interference.
Among the following examples,
IC1FP1 is mapped to TI1
IC2FP2 is mapped to TI2
Neither IC1FP1 nor IC2FP2 is reverse phase
The input signal is valid at the rising edge and falling edge
Enable the counter
Figure 55 Counter Operation Example in Encoder Mode
TI1
TI2
Counter
For example, when TI1 is at low level, and TI2 is in rising edge state, the counter
will count up.