Omega Engineering OMG-PCI-DIO48 Application Programmers Interface API, Presetting an Output Port

Page 12

Technical Description

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 8005 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 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.

Interrupts:

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

Port C

Port C of each bank has the ability to be configured as two four bit ports. If both lower and upper nibbles are configured the same then no special considerations need to be made. But if they are configured differently, one nibble as input, and one as output then the user will have to keep this in mind.

Port C absolute addressing (when port C is split)

When reading, the input nibble will be returned on the corresponding upper or lower nibble while the outputs will be returned on their corresponding upper or lower nibble. When writing, the corresponding nibble will be written to the output nibble, while the input nibble will have its output register written to. The output register can be written to without affecting the inputs. These will be eight bit operations and it will up to the programmer to keep track of the two four bit nibbles.

OMG-PCI-DIO48

Page 8

Image 12
Contents User’sGuide Canada MexicoBenelux Czech RepublicContents Figures Installation IntroductionSystem Installation Technical Description Software3rd Party Software Support Electrical Characteristics Electrical CharacteristicsPull Ups Pull Up ResistorsPin Ribbon Pin Out 50 Pin Ribbon Cable Pin OutPresetting an Output Port Port C absolute addressing when port C is splitApplication Programmers Interface API InterruptsPort C relative addressing when port C is split Port ConfigurationRelative Addressing vs. Absolute Addressing OMG-PCI-DIO48 Port API Port # Absolute Address Function Absolute Address PortRelative Byte Address Bit Set/Reset Direct Hardware ControlReading the Inputs Reading the OutputsInterrupts can be set up as shown in the tables on the next Register Description for direct hardware control IRQST2 IRQST1OMG-PCI-DIO48 Control Words Bit Set or Reset Port C OMG-PCI-DIO48 Interrupt mode select table Specifications Environmental SpecificationsPower Consumption Physical DimensionsAppendix a Troubleshooting Appendix B How To Get Assistance Appendix C Silk-Screen Appendix D Compliance Notices WARRANTY/DISCLAIMER Temperature