Omega Vehicle Security OME-PIO-D56 PIOGetConfigAddressSpace, Enable all D/I/O operations of card0

Page 32

3.1.2PIO_GetConfigAddressSpace

PIO_GetConfigAddressSpace(wBoardNo,*wBase,*wIrq, *wSubVendor, *wSubDevice,*wSubAux,*wSlotBus, *wSlotDevice)

wBoardNo=0 to N Æ totally N+1 boards found by PIO_DriveInit(….)

wBase

Æ base address of the board control word

wIrq

Æ allocated IRQ channel number of this board

wSubVendor Æ subVendor ID of this board

wSubDevice Æ subDevice ID of this board

wSubAux

Æ subAux ID of this board

wSlotBus

Æ hardware slot ID1 of this board

wSlotDevice

Æ hardware slot ID2 of this board

The user can use this function to save resource of all OME-PIO/PISO cards installed in this system. Then the application program can control all functions of OME-PIO/PISO series card directly. The sample program is given as follows:

/* step1: detect all OME-PIO-D56/OME-PIO-D24 cards first */

 

 

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

for

OME-PIO-

D56/D24 */

 

 

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

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

PC */

 

 

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

 

 

{

 

 

PIO_GetConfigAddressSpace(i,&wBase,&wIrq,&t1,&t2,&t3,&t4,&t5);

 

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

*/

}

 

 

/* step3: control the OME-PIO-D56/OME-PIO-D24directly */

 

wBase=wConfigSpace[0][0];/* get base address the card_0

*/

outport(wBase,1);

/* enable all D/I/O operations of card_0

*/

wBase=wConfigSpace[1][0];/* get base address the card_1

*/

outport(wBase,1);

/* enable all D/I/O operations of card_1

*/

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

---- 30

Image 32
Contents User’sGuide Canada MexicoBenelux Czech RepublicOME-PIO-D56/D24 Table of Contents Features IntroductionOptions SpecificationsOrder Description OME-PISO-series cost-effective generation, isolated cards Product ChecklistPCI Data Acquisition Family Hardware configuration Board Layout1 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 Block Diagram of OME-PIO D56/D24 Interrupt output signal of OME-PIO-D56/OME-PIO-D24, INT\ isINTCHAN0/1/2/3 Initialhigh, activelow Interrupt source COUNTL++Initiallow, activehigh Interrupt source Muliti-Interrupt Source PC0 PC1 PC2 PC3Read all interrupt state Daughter Boards OME-DB-37OME-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 All signals are TTL compatible Pin AssignmentDI0 DI1 DI2 DI3 DI4 DI5 DI6 DI7 DI8 DI9 How to Find the I/O Address Resource-allocated informationPIO/PISO identification information PC’s physical slot information PIODriverInit PIODriverInit&wBoards, wSubVendor,wSubDevice,wSubAux WSubVendor=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 ShowPIOPISO ShowPIOPISOwSubVendor,wSubDevice,wSubAuxAssignment of I/O Address Slot5 0x0A Slot6 0x08 Slot7 0x09 Slot8 0x07I/O Address Map Address Read WriteAUX data Register RESET\ Control RegisterAUX Control Register INT Mask Control Register Aux Status RegisterInterrupt Polarity Control Register 7 I/O Selection Control RegisterRead/Write 8-bit data Register How to install software & utility? Demo programPiopiso PIOPISO.EXE for Windows DEMO1 DEMO2 DEMO3 COUNT=0COUNT++ DEMO4 COUNT++ DEMO5 PC3CNTL1=CNTL2=CNTL3=CNTL4=0 Page WARRANTY/DISCLAIMER Temperature