Demand Peripherals     Robotics and Automation Made Easy

OUT4: Quad General Purpose Output

The OUT4 peripheral gives you direct control of four FPGA output pins.

 

Hardware:

The OUT4 peripheral gives you direct access to each of the four pins in a Baseboard slot. The lowest numbered pin on the connector is controlled by the LSB in the outval resource. OUT4 works with any of the following cards:
     GPIO with pin headers
     GPIO with screw terminals
     Open-Drain Driver Card
     Quad 10-Amp Relay Card
     USB 2.0 Hub Card

 

Resources:

outval : the value on the output pins. A write to this resource sets the FPGA pins on the slot to the value specified. This resource works with both pcget and pcset.

 

Examples:

Set pins 3 and 4 high and pins 1 and 2 low.

    pcset out4 outval c
You may want more than one OUT4 peripheral in your system. Recall that you must access peripherals by slot number when there your system has multiples of the same peripheral. For example, the following set the outputs for OUT4 peripherals in slots 2, 3, and 4.
    pcset 2 outval c
    pcset 3 outval 0
    pcset 4 outval f