Omega Vehicle Security OME-PIO-D56 PIODriverInit, WSubVendor=0x80 wSubDevice=1 wSubAux=0x40 For

Page 29

3.1.1PIO_DriverInit

PIO_DriverInit(&wBoards, wSubVendor,wSubDevice,wSubAux)

wBoards=0 to N Æ number of boards found in this PC

wSubVendor Æ subVendor ID of board to find

wSubDevice

Æ subDevice ID of board to find

wSubAux

Æ subAux ID of board to find

 

This function

can detect all OME-PIO/PISO series card in the system. It is

implemented based on the PCI plug & play mechanism. It will find all OME- PIO/PISO series cards installed in this system & save all their resource information in the library.

Sample program 1: find all OME-PIO-D56/OME-PIO-D24 in the PC

wSubVendor=0x80; wSubDevice=1; wSubAux=0x40; /*

for

OME-PIO-

D56/D24 */

 

 

wRetVal=PIO_DriverInit(&wBoards, wSubVendor,wSubDevice,wSubAux); printf("Threr are %d OME-PIO-D56/OME-PIO-D24 Cards in this PC\n",wBoards);

/* step2: save resources of all OME-PIO-D56/OME-PIO-D24cards installed in

this PC */

 

 

for (i=0; i<wBoards; i++)

 

 

{

 

 

PIO_GetConfigAddressSpace(i,&wBase,&wIrq,&wID1,&wID2,&wID3,

 

&wID4,&wID5);

 

printf("\nCard_%d: wBase=%x, wIrq=%x", i,wBase,wIrq);

 

wConfigSpace[i][0]=wBaseAddress;

/* save all resource of this card

*/

wConfigSpace[i][1]=wIrq;

/* save all resource of this card

*/

}

 

 

OME-PIO-D56/OME-PIO-D24 User Manual (Ver.2.1, Oct/2003)

---- 27

Image 29
Contents User’sGuide Mexico CanadaBenelux Czech RepublicOME-PIO-D56/D24 Table of Contents Introduction FeaturesOptions SpecificationsOrder Description OME-PISO-series cost-effective generation, isolated cards Product ChecklistPCI Data Acquisition Family Board Layout Hardware configuration1 DI/DO Port Architecture CON3 I/O Port LocationEnabling I/O Operation Select Sec RESET\ Sec DI Port Architecture CON2 Do Port Architecture CON1 Make sure the initial level is High or Low If INT signal is Low now Æ select the non-inverted inputInterrupt Operation Interrupt output signal of OME-PIO-D56/OME-PIO-D24, INT\ is Interrupt Block Diagram of OME-PIO D56/D24INTCHAN0/1/2/3 COUNTL++ Initialhigh, activelow Interrupt sourceInitiallow, activehigh Interrupt source PC0 PC1 PC2 PC3 Muliti-Interrupt SourceRead all interrupt state OME-DB-37 Daughter BoardsOME-DN-37 OME-DB-8125OME-ADP-20/PCI OME-DB-24PD Isolated Input Board OME-DB-24RD Relay Board OME-DB-24PRD, OME-DB-24POR, OME DB-24C Daughter Board Comparison Table Pin Assignment All signals are TTL compatibleDI0 DI1 DI2 DI3 DI4 DI5 DI6 DI7 DI8 DI9 Resource-allocated information How to Find the I/O AddressPIO/PISO identification information PC’s physical slot informationPIODriverInit&wBoards, wSubVendor,wSubDevice,wSubAux PIODriverInitWSubVendor=0x80 wSubDevice=1 wSubAux=0x40 For D56/D24Printf\nThrer are %d Piopiso Cards in this PC,wBoards OME-PISO-P32C32 Enable all D/I/O operations of card1 PIOGetConfigAddressSpaceEnable all D/I/O operations of card0 ShowPIOPISOwSubVendor,wSubDevice,wSubAux ShowPIOPISOSlot5 0x0A Slot6 0x08 Slot7 0x09 Slot8 0x07 Assignment of I/O AddressAddress Read Write I/O Address MapAUX data Register RESET\ Control RegisterAUX Control Register Aux Status Register INT Mask Control Register7 I/O Selection Control Register Interrupt Polarity Control RegisterRead/Write 8-bit data Register Demo program How to install software & utility?Piopiso PIOPISO.EXE for Windows DEMO1 DEMO2 COUNT=0 DEMO3COUNT++ DEMO4 COUNT++ PC3 DEMO5CNTL1=CNTL2=CNTL3=CNTL4=0 Page WARRANTY/DISCLAIMER Temperature