English
Language : 

LM3S1969 Datasheet, PDF (594/677 Pages) Texas Instruments – Stellaris® LM3S1969 Microcontroller
OBSOLETE: TI has discontinued production of this device.
Quadrature Encoder Interface (QEI)
Figure 17-1. QEI Block Diagram
Control & Status
QEICTL
QEISTAT
QEILOAD
Velocity Timer
QEITIME
PhA
PhB
IDX
Velocity
Predivider
clk
Quadrature
Encoder dir
Velocity Accumulator
QEICOUNT
QEISPEED
QEIMAXPOS
Position Integrator
QEIPOS
QEIINTEN
Interrupt Control
QEIRIS
QEIISC
Interrupt
17.2
Signal Description
Table 17-1 on page 594 list the external signals of the QEI module and describe the function of each.
The QEI signals are alternate functions for some GPIO signals and default to be GPIO signals at
reset. The column in the table below titled "Pin Assignment" lists the possible GPIO pin placements
for these QEI signals. The AFSEL bit in the GPIO Alternate Function Select (GPIOAFSEL) register
(page 303) should be set to choose the QEI function. For more information on configuring GPIOs,
see “General-Purpose Input/Outputs (GPIOs)” on page 283.
Table 17-1. QEI Signals (100LQFP)
Pin Name
Pin Number Pin Type Buffer Typea Description
IDX0
10
I
TTL
QEI module 0 index.
IDX1
61
I
TTL
QEI module 1 index.
PhA0
25
I
TTL
QEI module 0 phase A.
PhA1
37
I
TTL
QEI module 1 phase A.
PhB0
47
I
TTL
QEI module 0 phase B.
PhB1
36
I
TTL
QEI module 1 phase B.
a. The TTL designation indicates the pin has TTL-compatible voltage levels.
17.3
Functional Description
The QEI module interprets the two-bit gray code produced by a quadrature encoder wheel to integrate
position over time and determine direction of rotation. In addition, it can capture a running estimate
of the velocity of the encoder wheel.
The position integrator and velocity capture can be independently enabled, though the position
integrator must be enabled before the velocity capture can be enabled. The two phase signals, PhA
594
July 24, 2012
Texas Instruments-Production Data