
Manual PCI-IIRO-8
12
Programming Examples
No API driver software is provided with the card because programming is very simple and can be
accomplished most efficiently using direct I/O instructions in DOS. Use the standard ACCES32 API driver
for windows. The following examples are in C but are readily translated into other languages:
Example: Turn on OP0 and OP7
Base=0xF300;
//Base
I/O
address
outportb(Base,
0x81);
Example: Read back the state of the relays
X=inportb(Base);
//relay register data to X%
printf("%02x");
//display
results
Example: Read the digital inputs
Y=inportb(Base+1);
//digital input register to Y%
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com