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.

 

Hardware:

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.

 

Resources:

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.

 

Notes:

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.

 

Examples:

Monitor the rotary encoder for button presses or encoder rotation.

      dpcat roten roten

 

FPGA Defined Peripherals
User Interface
FPGA Configuration
FPGA Buttons & LEDs
Text LCD and Keypad
Quad WS2812 Interface
Quad Slide Pot
Tone Generator
IR Recv/Xmit
6 Digit LCD
RC Decoder
Keyfob RF Decoder
Rotary Encoder 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
Quad GPIO
Octal Input/Output
32 Channel Binary Output
32 Channel Binary Input
Sensors
Octal 12-bit ADC
Quad Ping))) Interface
Octal SRF04 Interface
Quad Event Counter
Instrumentation
Generic I2C
Generic SPI
Octal 8-Bit DAC
Quad Digital Potentiometer
Quad PWM Output
Quad PWM Input
4 Bit Pattern Generator
Real Time Clock
Dual Watchdog Timers
  

Interface Cards
User Interface
Audio Amplifier
IR Recv/xmit
Six Digit LCD Display
Keyfob RF Receiver
Rotary Encoder
Quad Switch Card
Text LCD / keypad
Quad Slide Pot
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
9DOF IMU
Octal SRF04
Quad GPIO
Generic I2C
Generic SPI
USB 2.0 Hub
Real Time Clock
Slot Expander
Octal Input/Output
32 Channel Input
32 Channel Output
Accessories
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
WW2 Prototyping Card
WW1 Small Prototyping Card