Programming

Programming

Application Programmers Interface (API)

The SeaIO driver, API, and utilities have been included to provide control over the hardware in Windows environments. The following section is designed to help the customer understand the API connection to the actual I/O for the OMG- USB-DIO48.Complete documentation of the API can be found in the SeaI/O help file.

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. Refer to Relative Addressing vs. Absolute Addressing for more information.

Interrupts:

Interrupt sampling can be set up in the API. Port A1 bit zero (0) is the interrupt source (pin 47 of P2). Refer to the API section in the SeaI/O help file for more information.

OMG-USB-DIO48

Page 7

Page 11
Image 11
Omega Vehicle Security OMG-USB-DIO48 manual Programming, Application Programmers Interface API, Presetting an Output Port