Enhanced Modular Input/Output Subsystem (eMIOS)
MPC5566 Microcontroller Reference Manual, Rev. 2
Freescale Semiconductor 17-41
 
Figure 17-28. Pulse/Edge Counting Single-Shot Mode Example
17.4.4.4.9 Quadrature Decode Mode (QDEC)
The following table lists the quadrature decode mode settings:
Quadrature decode mode uses UCn operating in QDEC mode and the programmable input filter (PIF) 
from UC[n-1]. UC[n-1] can be configured, at the same time, to an operation mode that does not use I/O 
pins, such as MC mode (modulus counter). The connection among the UCs is circular; that is, when UC0 
is running in QDEC mode, the programmable input filter from UC23 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 and direction encoder or phase_A and phase_B 
encoders. 
When operating with count and direction encoder (MODE[6] cleared), UCn input pin must be connected 
to the direction signal and UC[n-1] input pin must be connected to the count signal of the quadrature 
encoder. UCn EDPOL bit selects count direction according to direction signal and UC[n-1] EDPOL bit 
selects if the internal counter is clocked by the rising or falling edge of the count signal.
Table 17-22. QDEC Operating Mode
MODE[0:6] Unified Channel QDEC Operating Mode
0b0001100 Quadrature decode (for count and direction encoders type)
0b0001101 Quadrature decode (for phase_A and phase_B encoders type)
Selected
counter bus
0x000090 0x000090
B1 value
2
0x000090
0x000303 0x0003030x000303
Amount of
EMIOS_CCNTRn
FLAG
set event
MODE[6] = 1
A1 match B1 match B1 match
A1 value
1
Notes:
1
 Reading EMIOS_CADRn returns the value of A1.
2
 Reading EMIOS_CBDRn returns the value of B1.
Time
0x000000
events
detected
A1 match
A1 and B1
Write
0x000090 0x000303 0x000090 0x000303
A2 value
3
A2  EMIOS_CCNTRn
A2 EMIOS_CCNTRn
3
 Reading EMIOS_ALTAn returns the value of A2. (EMIOS_ALTA only used in PEC and WPTA modes)