Quadrature input, Hardware considerations – Echelon I/O Model Reference for Smart Transceivers and Neuron Chips User Manual
Page 158
148 Timer/Counter
Input
Models
Quadrature Input
The quadrature I/O model is used to read a shaft or positional encoder input on
two adjacent pins. You can use this model to monitor input data from shaft
encoders for low-cost angular position input.
This model applies to Series 3100 Neuron Chips and Smart Transceivers, and to
Series 5000 Neuron Processors and Smart Transceivers.
Hardware Considerations
A timer/counter can be configured to count transitions of a binary Gray code
input on two adjacent input pins. The Gray code is generated by peripheral
devices such as shaft encoders and optical position sensors, which generate the
bit pattern (00,01,11,10,00, …) for one direction of motion and the bit pattern
(00,10,11,01,00, …) for the opposite direction. Reading the value of a quadrature
object gives the arithmetic net sum of the number of transitions since the last
time it was read (-16384 to 16383).
For Series 3100 devices, the maximum frequency of the input is one-quarter of
the input clock rate, for example 2.5 MHz for a 10 MHz Smart Transceiver input
clock. For Series 5000 devices, the maximum frequency of the input is one-half of
the system clock rate, for example 5 MHz with a 10 MHz system clock.
Quadrature devices can be connected to timer/counter 1 through pins IO6 and
IO7, and timer/counter 2 through pins IO4 and IO5 (see Figure 47 on page 125
and Figure 55 on page 149). If the second input transitions low while the first
input is low, and high while the first input is high, the counter counts up.
Otherwise, the count is down.
A call to the io_in( ) function returns the current value of the quadrature count
since the last read operation. The counter is then reset and ready for the next
series of input transitions. The count returned is a 16-bit signed binary number,
capped at ±16K.
The number shown in the diagram above is the minimum time allowed between
consecutive transitions at either input of the quadrature function block. For
more information, see the,
Neuron Chip
Quadrature Input Function Interface
engineering bulletin (part number 005-0003-01).