Demand Peripherals     Robotics and Automation Made Easy

IN4: Quad Input

The IN4 peripheral lets you receive input from four FPGA pins. The pins can be individually configured to send an update when the input value changes.

Use either the quad switch card or a GPIO card with the IN4 peripheral.

 

Hardware:

The IN4 peripheral lets you read or monitor the status of four FPGA pins. Use the SW4 card and IN4 as part of your user interface, or use IN4 and one of the GPIO4 cards to watch for bumper switch closure on your robot. The lowest number pin corresponds to the LSB of the data and interrupt resources.

More information about the SW4 and GPIO4 cards can be found here cards/sw4.html and here cards/gpio4.html.

 

Resources:

Resources for the in4 peripheral include a read-only data register and a read-write configuration register to determine which pins are monitored for changes.

inputs : the value on the four input FPGA pins. A dpget on this resource returns the current values of all 4 pins. A dpget requires a round trip over the USB-serial link and may take a few milliseconds. Pin values are given as a hexadecimal number with the value of the lowest numbered pin in the LSB.

When used with dpcat this resource reports the new value of the pins after one of the monitored pins changes value. Use this resource to wait for changes on the monitored pins.

interrupt : which pins to monitor. A change on a monitored pin causes a packet to be sent to the host. The packet contains the new values of all 4 pins and is made available as a line of dpcat output on the 'inputs' resource.

 

Examples:

To monitor all four pins for changes use the following:

      dpset in4 interrupt f
      dpcat in4 inputs

 

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