Datasheet

2010 Microchip Technology Inc. DS39616D-page 151
PIC18F2331/2431/4331/4431
17.0 MOTION FEEDBACK MODULE
The Motion Feedback Module (MFM) is a special
purpose peripheral designed for motion feedback
applications. Together with the Power Control PWM
(PCPWM) module (see Section 18.0 “Power Control
PWM Module”), it provides a variety of control
solutions for a wide range of electric motors.
The module actually consists of two hardware
submodules:
Input Capture (IC)
Quadrature Encoder Interface (QEI)
Together with Timer5 (see Section 15.0 “Timer5
Module), these modules provide a number of
options for motion and control applications.
Many of the features for the IC and QEI submodules
are fully programmable, creating a flexible peripheral
structure that can accommodate a wide range of
in-system uses. An overview of the available features
is presented in Table 17-1. A simplified block diagram
of the entire Motion Feedback Module is shown in
Figure 17-1.
TABLE 17-1: SUMMARY OF MOTION FEEDBACK MODULE FEATURES
Note: Because the same input pins are common
to the IC and QEI submodules, only one of
these two submodules may be used at
any given time. If both modules are on, the
QEI submodule will take precedence.
Submodule Mode(s) Features Timer Function
IC (3x) Synchronous
Input Capture
Flexible Input Capture modes
Available Prescaler
Selectable Time Base Reset
Special Event Trigger for ADC
Sampling/Conversion or Optional
TMR5 Reset Feature (CAP1 only)
Wake-up from Sleep function
Selectable Interrupt Frequency
Optional Noise Filter
TMR5 3x Input Capture (edge
capture, pulse width, period
measurement, capture on
change)
Special Event Triggers the
A/D Conversion on the CAP1
Input
QEI QEI Detect Position
Detect Direction of Rotation
Large Bandwidth (F
CY/16)
Optional Noise Filter
16-Bit
Position
Counter
Position Measurement
Direction of Rotation Status
Velocity
Measurement
2x and 4x Update modes
Velocity Event Postscaler
Counter Overflow Flag for Low
Rotation Speed
Utilizes Input Capture 1 Logic
(IC1)
High and Low Velocity Support
TMR5 Precise Velocity Measurement
Direction of Rotation Status