DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10316_0
© NXP B.V. 2008. All rights reserved.
User manual
Rev. 00.06 — 17 December 2008
465 of 571
NXP Semiconductors
UM10316
Chapter 27: LPC29xx Quadrature Encoder Interface (QEI)
6.2 Control registers
6.2.1 QEI Control (QEICON)
This register contains bits which control the operation of the position and velocity counters
of the QEI module. This register can be set by software, but only hardware can reset the
register bits.
6.2.2 QEI Configuration (QEICONF)
This register contains the configuration of the QEI module.
6.2.3 QEI Status (QEISTAT)
This register provides the status of the encoder interface.
Table 387: QEI Control Register (QEICON - 0xE00C 9000)
Bit
Symbol
Description
Reset
value
0
RESP
Reset position counter. When set = 1, resets the position counter to
all zeros. Autoclears when the position counter is cleared.
0
1
RESPI
Reset position counter on index. When set = 1, resets the the
position counter to all zeros when an index pulse occurs.
Autoclears when the position counter is cleared.
0
2
RESV
Reset velocity. When set = 1, resets the the velocity counter to all
zeros and reloads the velocity timer. Autoclears when the velocity
counter is cleared.
0
3
RESI
Reset index counter. When set = 1, resets the index counter to all
zeros. Autoclears when the index counter is cleared.
0
4:31
-
reserved
0
Table 388: QEI Contfiguration Register (QEICONF - 0xE00C 9008)
Bit
Symbol
Description
Reset
value
0
DIRINV
Direction invert. When = 1, complements the DIR bit.
0
1
SIGMODE
Signal Mode. When = 0, PhA and PhB function as quadrature
encoder inputs. When = 1, PhA functions as the direction signal
and PhB functions as the clock signal.
0
2
CAPMODE
Capture Mode. When = 0, only PhA edges are counted (2X). When
= 1, BOTH PhA and PhB edges are counted (4X), increasing
resolution but decreasing range.
0
3
INVINX
Invert Index. When set, inverts the sense of the index input.
0
4:31
-
reserved
0
Table 389: QEI Interrupt Status Register (QEISTAT - 0xE00C 9004)
Bit
Symbol
Description
Reset
value
0
DIR
Direction bit. In combination with DIRINV bit indicates forward or
reverse direction. See
1:31
-
reserved
0