eTimer RM0046
730/936 Doc ID 16912 Rev 5
STOP mode
When the CNTMODE field is set to 000, the counter is inert. No counting will occur. Stop
mode will also disable the interrupts caused by input transitions on a selected input pin.
COUNT mode
When the CNTMODE field is set to 001, the counter will count the rising edges of the
selected clock source. This mode is useful for generating periodic interrupts for timing
purposes, or counting external events such as “widgets” on a conveyor belt passing a
sensor. If the selected input is inverted by setting the PIPS bit, then the negative edge of the
selected external input signal is counted.
See Section , “CASCADE-COUNT mode through Section , “VARIABLE-FREQUENCY
PWM mode for additional capabilities of this operating mode.
EDGE-COUNT mode
When the CNTMODE field is set to 010, the counter will count both edges of the selected
external clock source. This mode is useful for counting the changes in the external
environment such as a simple encoder wheel.
GATED-COUNT mode
When the CNTMODE field is set to 011, the counter will count while the selected secondary
input signal is high. This mode is used to time the duration of external events. If the selected
input is inverted by setting the PIPS bit, then the counter will count while the selected
secondary input is low.
QUADRATURE-COUNT mode
When the CNTMODE field is set to 100, the counter will decode the primary and secondary
external inputs as quadrature encoded signals. Quadrature signals are usually generated by
rotary or linear sensors used to monitor movement of motor shafts or mechanical
equipment. The quadrature signals are square waves that are 90 degrees out of phase. The
decoding of quadrature signal provides both count and direction information.
Figure 413 shows a timing diagram illustrating the basic operation of a quadrature
incremental position encoder.
Figure 413. Quadrature incremental position encoder
SIGNED-COUNT mode
When the CNTMODE field is set to 101, the counter counts the primary clock source while
the selected secondary source provides the selected count direction (up/down).
+1 +1 +1 +1 +1 +1 +1 +1 –1 –1 –1 –1 –1 –1 –1 –1
PHASEB
COUNT
UP/DN
PHASEA