Programming; Application Programmers Interface (Api); Reading The Inputs; Reading The Outputs - SeaLevel PIO-24.PCI 8008 User Manual

Table of Contents

Advertisement

Technical Description

Programming

Application Programmers Interface (API)

Most modern operating systems do not allow direct hardware access. The SeaIO driver and API
have been included to provide control over the hardware in Windows and Linux environments.
The purpose of this section of the manual is to help the customer with the mapping of the API to
the actual inputs for the PIO-24.PCI specifically. Complete documentation of the API can be
found in its accompanying help file.

Reading the Inputs:

The API presents the inputs as active low. If an input is driven high (2V to 5.25 V) it will read as a
logical zero (0), if driven low (0V to 0.8V) it will read as a logical one (1). If an input is not
driven it will read as a zero (0) due to the 10K ohm pull up resistors on each port.

Reading the Outputs:

The API returns the complement of value that is currently being used to drive the outputs. The
outputs cannot be read with relative addressing, absolute addressing must be used. Refer to
Relative Addressing vs. Absolute Addressing for more information.

Presetting an Output Port:

Each port has an output register associated with it. This register may be written and retains its
value whether the port is configured as an input or an output. To preset the value of an output port
the program should write to the port when it is configured as an input then configure it as an
output. Inputs cannot be written to with relative addressing, absolute addressing must be used.
See Relative Addressing vs. Absolute Addressing below.

Writing the Outputs:

The outputs are active high. Writing a one (1) corresponds to 5V while writing a zero (0)
corresponds to 0V, at the output.

Interrupts:

Interrupt sampling can be set up in the API. Port A bit zero is the interrupt source(pin 47).
Refer to the API section in the SeaI/O help file for more detailed information.
Sealevel Systems PIO-24.PCI
Page 8

Advertisement

Table of Contents
loading

Table of Contents