Chapter 26 eTimer
MPC5602P Microcontroller Reference Manual, Rev. 4
Freescale Semiconductor
735
Section 26.7.2.9, “CASCADE-COUNT mode
for additional capabilities of this operating mode.
26.7.2.3
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.
26.7.2.4
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.
26.7.2.5
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.
shows a timing diagram illustrating the basic operation of a quadrature incremental position
encoder.
Figure 26-24. Quadrature incremental position encoder
26.7.2.6
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).
26.7.2.7
TRIGGERED-COUNT mode
When the CNTMODE field is set to 110, the counter will begin counting the primary clock source after a
positive transition (negative if SIPS = 1) of the secondary input occurs. The counting will continue until a
compare event occurs or another positive input transition is detected. Subsequent secondary positive input
transitions will continue to restart and stop the counting until a compare event occurs.
+1 +1 +1 +1 +1 +1 +1
+1
–1 –1 –1 –1 –1 –1 –1 –1
PHASEB
COUNT
UP/DN
PHASEA