60 Chapter 4: Matrox Solios eV-CL hardware reference
Rotary decoder
The PSGs of the Matrox Solios eV-CL board feature a rotary decoder (quadrature
decoder) that can decode quadrature input received from a rotary encoder with
quadrature output. A rotary encoder is a device that provides information about
the position and direction of a rotating shaft (for example, that of a conveyor belt).
The encoder outputs a two-bit code (also known as Gray code) on two pairs of
LVDS wires for each change in position of the rotating shaft; for a given direction
of the rotating shaft, the rotary encoder outputs the code in a precise sequence
(either 00 - 01 - 11 - 10 or 00 - 10 - 11 - 01, depending on how the rotary encoder
is attached to the rotating shaft). If the rotating shaft changes direction, the rotary
encoder transmits the Gray code in the reverse sequence (00 - 10 - 11 - 01 or
00 - 01- 11 - 10, respectively).
Upon decoding a Gray code, the rotary decoder increments or decrements its
32-bit internal counter, depending on the direction of movement. You can
configure which Gray code sequence represents forward movement and
increments the counter; the reverse Gray code sequence will then represent the
backward direction and decrement the counter. You can specify the direction of
movement occurring when the Gray code sequence is 00 - 01 - 11 - 10, using
MdigControl() with M_ROTARY_ENCODER_DIRECTION.
The rotary decoder supports a maximum encoder frequency equal to 1/3 of the
pixel clock frequency of the video source. The LVDS receivers of the Matrox Solios
eV-CL board support 5 V tolerant rotary encoders.
❖ Note that an external source must be used to power the rotary encoder (for
example, the computer’s 5 V power source).
For each PSG, you can configure the rotary decoder’s settings, using the MIL-Lite
function MdigControl() with M_ROTARY_ENCODER..., or by modifying the
DCF file with Matrox Intellicam.