Programming; Application Programmers Interface (Api); Presetting An Output Port; Interrupts - SeaLevel PIO-32.PC User Manual

Table of Contents

Advertisement

Specifications

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-32.PCI specifically.
Complete documentation of the API can be found in its accompanying help file.

Presetting an Output Port:

Each port has an output register associated wi th 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.

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.

Port Configuration:

Each eight-bit port can be configured as inputs or outputs. The API provides a
set adapter state call to access the control words. For this device, one control
word is used.
Control Word
0 = input
1 = output
Port A – Bit 0
Port B – Bit 1
Port C – Bit 2
Port D – Bit 3
Note: The control panel also allows you to configure the device. Your program
can over ride the control panel configuration when executed, but the control
panel configuration will be the default on power up. The default settings are
based on the settings in the control panel application when last changed and
saved after re-booting.
Sealevel Systems PIO-32.PCI
Page 8

Advertisement

Table of Contents
loading

Table of Contents