Demand Peripherals     Robotics and Automation Made Easy

ROTEN: Rotary Encoder Interface

The ROTEN peripheral lets you monitor a rotary encoder for rotation or center button transitions. ROTEN is most often paired with the ROTEN card but can also be used with the GPIO cards if you want to wire your own rotary encoder.



The roten peripheral is an interface to a rotary encoder with push button. The encoder switches are on the low two pins of the daughter card, the button is on the third pin, and the LED output is on the highest numbered bin. See the schematic for the ROTEN card for details if you wish to wire your own rotary encoder. More information on the ROTEN cand can be found here cards/roten.html.



encoder : step count and button status.
A read-only resource (dpget/dpcat) with the number of counts up or down since the last output and the current state of the button. The count is always within the range of 63 to -64. The count and button status are given on the same line with a space separating the values. For example five counts counterclockwise and no button press would be reported as:

    -5 0

led : state of the LED/
Use dpset with a value of '0' to turn the LED off and a value of '1' to turn it on. A dpget returns the current state of the LED.



On occasion you may see an output from encoder something like this:

    -1 0
    0 0
    0 0
    -1 0
The '0 0' values can be ignored. This occurs because the hardware detected a change but the encoder went back to its previous state before the FPGA could report the new value. You can think of it as switch bounce which will have no impact on the actual position of the rotary encoder.



Monitor the rotary encoder for button presses or encoder rotation.

      dpcat roten encoder


FPGA Defined Peripherals
User Interface
FPGA Configuration
FPGA Buttons & LEDs
Host Tx/Rx Interface
AVR Interface
Stereo Audio Amplifier
Text LCD and Keypad
Quad WS2812 Interface
Quad Slide Pot
IR Recv/Xmit
6 Digit LCD
RC Decoder
Keyfob RF Decoder
Rotary Encoder Interface
Quad Touch Interface
Motion Control
Dual DC Motor Controller
Dual Quadrature Decoder
Quad 13 Bit Servo
Bipolar Stepper Controller
Unipolar Stepper Controller
Simple Input / Output
Quad Binary Output
Quad Binary Input
Octal Input/Output
32 Channel Binary Output
32 Channel Binary Input
Quad Serial Output
Octal Serial Output
Octal 12-bit ADC
Quad Ping))) Interface
Pololu QTR Interface
Octal SRF04 Interface
Generic I2C
Generic SPI
Octal 8-Bit DAC
Quad Digital Potentiometer
Quad PWM Output
Quad PWM Input
Quad Event Counter
Real Time Clock
Dual Pulse Generator

Interface Cards
Control Cards
User Interface
Stereo Audio Amplifier
IR Recv/xmit
Six Digit LCD Display
Keyfob RF Receiver
Rotary Encoder
Quad Switch Card
Text LCD / keypad
Quad Slide Pot
Quad Touch Interface
Motion Control
Dual 7-amp H-bridge
Quad Open Drain Driver
Quad 10 Amp Relay Card
Input / Output
Octal 8-Bit DAC
Quad Digital Potentiometer
Octal 12-bit ADC
Octal SRF04
I2C Prototyping
SPI Prototyping
USB 2.0 Hub
Real Time Clock
Octal Input/Output
32 Channel Input
32 Channel Output
Power Distribution Card
15 Amp Power Distribution
5 Volt Switching Regulator
ATX Power Break-Out Card
Disk Drive Power Break-Out
MP43 Aluminum Mounting Plate
WW4 Large Prototyping Card
WW2 Prototyping Card
WW1 Small Prototyping Card
SMP SMD Prototyping Card