Enhanced Modular Input/Output Subsystem (eMIOS200)
Freescale Semiconductor
23-35
PXR40 Microcontroller Reference Manual, Rev. 1
23.4.1.1.9
Quadrature Decode (QDEC) Mode
QDEC mode uses UC[
n
] operating in QDEC mode and the input programmable filter (IPF) from
UC[
n
– 1]. Note that UC[
n
– 1] can be configured, at the same time, to an operation mode that does not
use I/O pins, such as modulus counter mode (MC). The connection among the unified channels is circular,
i.e., when UC[0] is running in QDEC mode, the input programmable filter from UC[31] is being used.
This mode generates a FLAG every time the internal counter matches A1 register. The internal counter is
automatically selected and is not cleared when entering this mode.
MODE[6] bit selects which type of encoder is used:
count & direction
encoder or
phase_A & phase_B
encoder.
When operating with
count & direction
encoder (MODE[6] cleared), the UC[
n
] input pin must be
connected to the
direction
signal and the UC[
n
– 1] input pin must be connected to the count signal of the
quadrature encoder. The EDPOL bit for UC[
n
] selects the count direction according to the
direction
signal
and the EDPOL bit for UC[
n
– 1] selects whether the internal counter is clocked by the rising or falling
edge of the
count
signal.
When operating with
phase_A & phase_B
encoder (MODE[6] set), the UC[
n
] input pin must be connected
to the
phase_A
signal and the UC[
n
– 1] input pin must be connected to the
phase_B
signal of the
quadrature encoder. The EDPOL bit selects the count direction according to the phase difference between
phase_A & phase_B
signals.
show two unified channels configured to quadrature decode mode for
count & direction
encoder and
phase_A & phase_B
encoders, respectively.
Figure 23-29. QDEC Mode Example with Count & Direction Encoder
Note: EMIOS_CADR[n]
A1
+1 +1 +1 +1 +1 +1 +1
–1 –1 –1 –1
EMIOS_CCNTR[n] inc/dec
Direction (from UC[n])
Count (from UC[n – 1])
0x000000
EMIOS_CCNTR[n]
Time
FLAG Pin/Register
Value 1
MODE[6] = 0
EDPOL = 1
+1
A1 Write
(Value 1)
A1 Match
A1 Match
–1
Summary of Contents for PXR4030
Page 1: ...PXR40 Microcontroller Reference Manual Devices Supported PXR4030 PXR4040 PXR40RM Rev 1 06 2011...
Page 30: ...PXR40 Microcontroller Reference Manual Rev 1 Freescale Semiconductor xxx...
Page 40: ...PXR40 Microcontroller Reference Manual Rev 1 xl Freescale Semiconductor...
Page 66: ...Memory Map PXR40 Microcontroller Reference Manual Rev 1 2 4 Freescale Semiconductor...
Page 120: ...Signal Descriptions 3 54 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Page 860: ...FlexCAN Module 24 50 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Page 1167: ...Decimation Filter Freescale Semiconductor 28 53 PXR40 Microcontroller Reference Manual Rev 1...
Page 1168: ...Decimation Filter 28 54 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...