Omega Engineering OMG-PCI-DIO48 Computer Hardware User Manual


 
Technical Description
OMG-PCI-DIO48 Page 9
Port C relative addressing (when port C is split)
The input and output nibbles will each be treated as individual four bit ports.
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, two control word is used. Refer to the following
table.
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.
Control Word 0: Bank 1 (A1, B1, C1)
Control Word 1: Bank 2 (A2, B2, C2)
Control Words
I/O Configuration
CWnD0 Port C1 lower nibble (bits 0-3) 1 = input 0 = output 1 on power up
CWnD1 Port B1 1 = input 0 = output 1 on power up
CWnD2 0 or 1 (no effect)
CWnD3 Port C1 upper nibble (bits 4-7) 1 = input 0 = output 1 on power up
CWnD4 Port A1 1 = input 0 = output 1 on power up
CWnD5 0 or 1 (no effect)
CWnD6 0 or 1 (no effect)
CWnD7 Always a 1
Figure 4-Control Words
Relative Addressing vs. Absolute Addressing
The SeaIO API makes a distinction between “absolute” and “relative” addressing modes. In
absolute addressing mode, the Port argument to the API function acts as a simple byte offset from
the base I/O address of the device. For instance, Port #0 refers to the I/O address base + 0; Port #1
refers to the I/O address base + 1.
Relative addressing mode, on the other hand, refers to input and output ports in a logical fashion.
With a Port argument of 0 and an API function meant to output data, the first (0
th
) output port on
the device will be utilized. Likewise, with a Port argument of 0 and an API function designed to
input data, the first (0
th
) input port of the device will be utilized.
In all addressing modes, port numbers are zero-indexed; that is, the first port is port #0, the second
port is #1, the third #2, and so on.