Omega Engineering OMG-PCI-DIO48 manual Port C relative addressing when port C is split

Page 13

Technical Description

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 (0th) 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 (0th) 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.

OMG-PCI-DIO48

Page 9

Image 13
Contents User’sGuide Mexico CanadaBenelux Czech RepublicContents Figures Introduction InstallationSystem Installation Software Technical Description3rd Party Software Support Electrical Characteristics Electrical Characteristics Pull Up Resistors Pull Ups50 Pin Ribbon Cable Pin Out Pin Ribbon Pin OutPort C absolute addressing when port C is split Presetting an Output PortApplication Programmers Interface API InterruptsPort Configuration Port C relative addressing when port C is splitRelative Addressing vs. Absolute Addressing OMG-PCI-DIO48 Port API Port # Absolute Address Function Port Absolute AddressRelative Byte Address Direct Hardware Control Bit Set/ResetReading the Inputs Reading the OutputsInterrupts can be set up as shown in the tables on the next IRQST2 IRQST1 Register Description for direct hardware controlOMG-PCI-DIO48 Control Words Bit Set or Reset Port C OMG-PCI-DIO48 Interrupt mode select table Environmental Specifications SpecificationsPower Consumption Physical DimensionsAppendix a Troubleshooting Appendix B How To Get Assistance Appendix C Silk-Screen Appendix D Compliance Notices WARRANTY/DISCLAIMER Temperature