Quadrature Encoder Pulse (QEP)
Incremental Encoder Connections (EVA)
Incremental Encoder Connections (EVA)
GP Timer 2 selected as
GP Timer 2 selected as
pulse counter
pulse counter
Timer
Timer
Prescaler
Prescaler
bypassed (i.e.
bypassed (i.e.
Prescale
Prescale
always 1)
always 1)
Ch. A
Ch. B
CAP1/QEP1
CAP2/QEP2
QEP
decoder
logic
GP Timer 2
CLK DIR
.
.
Index
CAP3/QEPI
QEPIE
QEPIQUAL
QEP Initialization with GP Timer 2 (EVA)
• Select Timer 2 for Capture number1 and 2
CAPCONA . 9 = 0 (for Timer 2)
• Optionally pre-load Timer 2 counter
TxCNT register
• Select directional-up/down mode for Timer 2
TxCON . 12 – 11 = 11
• Set T2PER register for desired timer rollover
e.g. set the number of ticks per revolution
• Enable QEP operation
CAPCONA . 14 – 13 = 11
7 - 34 C28x - Event Manager