Rotary Shaft Encoder - Xilinx Spartan-3A User Manual

Starter kit board
Hide thumbs Also See for Spartan-3A:
Table of Contents

Advertisement

R
Figure 2-8: Push-Button Switches Require an Internal Pull-up Resistor in the FPGA

Rotary Shaft Encoder

In principal, the rotary shaft encoder behaves much like a cam connected to the central
shaft. Rotating the shaft then operates two push-button switches, as shown in
Depending on which way the shaft is rotated, one of the switches opens before the other.
Likewise, as the rotation continues, one switch closes before the other. However, when the
shaft is stationary, also called the detent position, both switches are closed.
Closing a switch connects it to ground, generating a logic Low. When the switch is open, a
pull-up resistor within the FPGA pin pulls the signal to a logic High. The UCF constraints
in
The FPGA circuitry to decode the 'A' and 'B' inputs is simple but must consider the
mechanical switching noise on the inputs, also called chatter. As shown in
chatter can falsely indicate extra rotation events or even indicate rotations in the opposite
direction!
Spartan-3A/3AN Starter Kit Board User Guide
UG334 (v1.0) May 28, 2007
Rotary / Push Button
3.3V
A pull-up resistor in each input pin
generates a '1' for an open switch.
See the UCF file for details on
specifying the pull-up resistor.
Rotary Shaft
Encoder
GND
Figure 2-9: Basic Example of Rotary Shaft Encoder Circuitry
Figure 2-11
describe how to define the pull-up resistor.
www.xilinx.com
Rotary Push-Button Switch
FPGA I/O Pin
ROT_CENTER Signal
Input Pin
A='0'
B='1'
UG230_c2_05_021206
Figure
2-9.
FPGA
Vcco
Vcco
UG230_c2_06_030606
Figure
2-10, the
29

Advertisement

Table of Contents
loading

This manual is also suitable for:

Spartan-3an

Table of Contents