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.



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 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.



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
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