146
RabbitCore RCM3209/RCM3229
E.6 Quadrature Decoder
The two-channel Quadrature Decoder accepts inputs via Parallel Port F from two external
optical incremental encoder modules. Each channel of the Quadrature Decoder accepts an
in-phase (I) and a quadrature-phase (Q) signal, and provides 8-bit counters to track shaft
rotation and provide interrupts when the count goes through the zero count in either direc-
tion. The Quadrature Decoder contains digital filters on the inputs to prevent false counts
and is clocked by the output of Timer A10. Each Quadrature Decoder channel accepts
inputs from either the upper nibble or lower nibble of Parallel Port F. The I signal is input
on an odd-numbered port bit, while the Q signal is input on an even-numbered port bit.
There is also a disable selection, which is guaranteed not to generate a count increment or
decrement on either entering or exiting the disable state. The operation of the counter as a
function of the I and Q inputs is shown below.
Figure E-2. Operation of Quadrature Decoder Counter
The Quadrature Decoders are clocked by the output of Timer A10, giving a maximum
clock rate of one-half of the peripheral clock rate. The time constant of Timer A10 must be
fast enough to sample the inputs properly. Both the I and Q inputs go through a digital fil-
ter that rejects pulses shorter than two clock periods wide. In addition, the clock rate must
be high enough that transitions on the I and Q inputs are sampled in different clock cycles.
The Input Capture (see the
Rabbit 3000 Microprocessor Users Manual
) may be used to
measure the pulse width on the I inputs because they come from the odd-numbered port
bits. The operation of the digital filter is shown below.
00
01 02 03 04 05 06 07 08 07 06 05 04 03 02 01 00 FF
I input
Q input
Counter
Interrupt
Rejected
Accepted
Peri Clock
Timer A10
Содержание RabbitCore RCM3209
Страница 1: ...RabbitCore RCM3209 RCM3229 C Programmable Module with Ethernet User s Manual 019 0165 080528 D...
Страница 6: ...RabbitCore RCM3209 RCM3229...
Страница 20: ...14 RabbitCore RCM3209 RCM3229...
Страница 58: ...52 RabbitCore RCM3209 RCM3229...
Страница 84: ...78 RabbitCore RCM3200...
Страница 135: ...User s Manual 129 keyConfig continued RETURN VALUE None SEE ALSO keyProcess keyGet keypadDef...
Страница 140: ...134 RabbitCore RCM3209 RCM3229...
Страница 144: ...138 RabbitCore RCM3209 RCM3229...
Страница 158: ...152 RabbitCore RCM3209 RCM3229...
Страница 160: ......