...the world's most energy friendly microcontrollers
2014-07-02 - Tiny Gecko Family - d0034_Rev1.20
256
www.silabs.com
Figure 17.6. TIMER Quadrature Encoded Inputs
Channel A
Channel B
Forward rot at ion (Channel A leads Channel B)
90
°
Channel A
Channel B
Backward rot at ion (Channel B leads Channel A)
90
°
In the Timer these inputs are tapped from the Compare/Capture channel 0 (Channel A) and 1 (Channel
B) inputs before edge detection. The Timer/Counter then increments or decrements the counter, based
on the phase relation between the two inputs. The Quadrature Decoder Mode supports two channels,
but if a third channel (Z-terminal) is available, this can be connected to an external interrupt and trigger
a counter reset from the interrupt service routine. By connecting a periodic signal from another timer as
input capture on Compare/Capture Channel 2, it is also possible to calculate speed and acceleration.
Figure 17.7. TIMER Quadrature Decoder Configuration
Counter
(Cont rolled by TIMERn_CTRL)
Compare/ Capture channel 1
(Cont rolled by TIMERn_CC1_CTRL)
Compare/ Capture channel 0
(Cont rolled by TIMERn_CC0_CTRL)
TIMn_CC0
PRS channels
PRSSEL
INSEL
Filt er
FILT
ICEDGE
Quadrature
Decoder
TIMn_CC1
PRS channels
PRSSEL
INSEL
Filt er
FILT
ICEDGE
Input
Capt ure 0
Input
Capt ure 1
Counter
Inc
Dec
QDM
MODE
Ch B
Ch A
The Quadrature Decoder can be set in either X2 or X4 mode, which is configured in the QDM bit in
TIMERn_CTRL. See Figure 17.7 (p. 256)
17.3.1.6.1 X2 Decoding Mode
In X2 Decoding mode, the counter increments or decrements on every edge of Channel A, see
Table 17.1 (p. 257) and Figure 17.8 (p. 257) .
Summary of Contents for EFM32TG
Page 543: ......