Page 1
User’ s Guide Shop online at www.omega.com e-mail: info@omega.com OME-PIO-D144 PCI-Bus Digital I/O Board Hardware Manual...
Page 2
Toll Free in United Kingdom: 0800-488-488 e-mail: sales@omega.co.uk It is the policy of OMEGA to comply with all worldwide safety and EMC/EMI regulations that apply. OMEGA is constantly pursuing certification of its products to the European New Approach Directives. OMEGA will add the CE mark to every appropriate device upon certification.
Aux Status Register ...30 3.3.6 Interrupt Polarity Control Register ...30 3.3.7 Read/Write 8-bit data Register ...31 3.3.8 Active I/O Port Control Register...31 3.3.9 I/O Selection Control Register ...32 OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) ...4 ...6 ...6 ...7 ...8 ...13 ...21 DDRESS I/O A ...26...
Page 5
2: U 3: I NTERRUPT DEMO 4: I NTERRUPT DEMO 5: I NTERRUPT DEMO DEMO 6: O UTPORT OF 10: F OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) CN1...35 CN1~CN6 ...37 1 ...39 2 ...41 3 ...43 CN1-CN6 ...46 ...48 UMBER ----- 3...
Introduction The OME-PIO-D144 consists of one D-Sub 37 & five 50-pin flat-cable connectors. There are three 8-bit ports - PA, PB & PC - in each connector. Every port consists of 8-bit programmable D/I/O. So the OME-PIO-D144 can provide 144 channels of TTL-compatible D/I/O.
I/O Port Location There are eighteen 8-bit I/O ports in the OME-PIO-D144. Every I/O port can be programmed as D/I or D/O port. When the PC is first powered up, all eighteen ports are used as D/I ports. The I/O port location is given as following: Connector of OME-PIO-D144 Refer to Sec.
• If D/I/O is configured as D/I port • If D/I/O is configured as D/O port • If D/I/O is configured as D/I port register only. The D/I & external input signal will not change. OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) disable\ input Latch...
Interrupt Operation The PC0, PC1, PC2, PC3 of CN1_PC can be used as interrupt signal source. Refer to Sec. 2.1 for PC0/1/2/3 location. The interrupt of OME-PIO-D144 is & Active_High . The interrupt signal can be programmed to inverted state. The programming procedure is as follows: 1.
Page 11
/*** application codes are given here ***/ _outpd(wBase+0x2a,0); if (wIrq>=8) outp(A2_8259,0x20); outp(A1_8259,0x20); Refer to DEMO3.C for source code. OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) Initial=Low change to high now */ /* now int_signal is High /* select the inverted signal change to low now */...
Page 12
/*** application codes are given here ***/ _outpd(wBase+0x2a,0); if (wIrq>=8) outp(A2_8259,0x20); outp(A1_8259,0x20); Refer to DEMO4.C for source code. OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) change to high now */ /* now int_signal is High /* select the inverted signal /* old state=high...
Page 13
Note: When the interrupt is active, the user program has to identify the active signals. These signals maybe all active at the same time. So the interrupt service routine has to service all active signals at the same time. OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) CN1_PC0 & CN1_PC1 are return to normal at the same time.
Page 14
(cc !=0) CNT_H3++; else CNT_L3++; invert=invert ^ 4; /* 6. IF PC3 is active if ((int_c&0x08) != 0) cc=new_int_state&0x08; if (cc !=0) CNT_H4++; else CNT_L4++; invert=invert ^ 8; now_int_state=new_int_state; outp(wBase+0x2a,invert); if (wIrq>=8) outp(A2_8259,0x20); outp(A1_8259,0x20); OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) ---- 12...
OME-DB-8125 The OME-DB-8125 is a general purpose screw terminal board. It is designed for easy wire connection. There is one D-Sub37 & two 20-pin flat-cable headers on the OME- DB-8125. OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) 37-PIN cable 37-PIN cable OME-DB-8125...
One side of the OME-ADP-37/PCI & OME-ADP-50/PCI can be connected to a 50-pin header. The other side can be mounted on the PC chassis as following: OME-ADP-37/PCI: 50-pin header to D-Sub37 extender. OME-ADP-50/PCI: 50-pin header to 50-pin header extender. OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) ---- 14...
OME-PIO-D144 OME-PIO-D144 50-Pin cable 50-pin flat-cable header D-sub 37-pin header Other specifications OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) AC or DC Signal 0V to 24V OME-DB-24P Same Opto-Isolated OME-DB-24P OME-DB-24PD...
Pin Assignment CN1: 37-PIN of D-type female connector. Pin Number Description N. C. N. C. N.C. N.C. N.C. All signals are TTL compatible. OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) Pin Number Description XXXXXXX This pin not available ----- 19...
Page 22
CN2/CN3/CN4/CN5/CN6: 50-PIN in of flat-cable connector Pin Number Description OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) Pin Number Description ---- 20...
• wSlotDevice: hardware slot ID2 in this PC’s slot position PIO_PISO.EXE The utility program, cards installed in this PC. OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) < REV 4.0 or above > : • Vendor ID = 0xE159 • Device ID = 0x0001 •...
Page 24
OME-PISO-813 (Rev 2.0) OME-PISO-DA2 (Rev 5.0) Note: If your board is a different version, it may also have different sub IDs. We offer the same function calls irrespective of the board version. OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) Sub_vendor 144 * D/I/O 5C80...
/* for PIO_D144 */ wRetVal=PIO_DriverInit(&wBoards, wSubVendor, wSubDevice, wSubAux); printf("Threr are %d OME-PIO-D144 Cards in this PC\n",wBoards); /* Step2: Save resource of all OME-PIO-D144 cards installed in this PC */ for (i=0; i<wBoards; i++) PIO_GetConfigAddressSpace(i, &wBase, &wIrq, &wID1, &wID2, &wID3, &wID4, &wID5);...
/* Step1: Detect all OME-PIO-D144 cards first */ wSubVendor=0x80; wSubDevice=0x01; wSubAux=0x00; wRetVal=PIO_DriverInit(&wBoards, wSubVendor,wSubDevice,wSubAux); printf("Threr are %d OME-PIO-D144 Cards in this PC\n",wBoards); /* Step2: Save resource of all OME-PIO-D144 cards 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);...
The demo program is given as follows: wRetVal=PIO_DriverInit(&wBoards,0xff,0xff,0xff); /* find all PIO_PISO series card*/ printf("\nThrer are %d OME-PIO_PISO Cards in this PC",wBoards); if (wBoards==0 ) exit(0); printf("\n-----------------------------------------------------"); for(i=0; i<wBoards; i++) PIO_GetConfigAddressSpace(i,&wBase,&wIrq,&wSubVendor, &wSubDevice,&wSubAux,&wSlotBus,&wSlotDevice); printf("\nCard_%d:wBase=%x,wIrq=%x,subID=[%x,%x,%x], SlotID=[%x,%x]",i,wBase,wIrq,wSubVendor,wSubDevice, wSubAux,wSlotBus,wSlotDevice); printf(" --> "); ShowPioPiso(wSubVendor,wSubDevice,wSubAux); OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) ----- 25...
The simplest way to identify which card is card_0 is to use wSlotBus & wSlotDevice as follows: 1. Remove all OME-PIO-D144 from this PC 2. Install one OME-PIO-D144 into the PC’s PCI_slot1, run PIO_PISO.EXE & record the wSlotBus1 & wSlotDevice1 3. Remove all OME-PIO-D144 from this PC 4.
Page 29
4. Now all D/I value will be different from D/O value 5. Install a 50-pin flat cable into CN2 & CN3 of any OME-PIO-D144 card 6. There will be one card’s D/I value = D/O value, the card number is also...
It is strongly recommended to the user to not change the I/O address. The Plug & Play BIOS will assign proper I/O address to each OME- PIO/PISO series card very well. The I/O addresses of OME-PIO-D144 are given as follows:...
Disable PC0 of CN1 as a interrupt signal (Default). PC0=1 Enable PC0 of CN1 as a interrupt signal outp(wBase+5,0); /* Disable interrupt outp(wBase+5,1); /* Enable interrupt CN1_PC0 outp(wBase+5,0x0f);/* Enable interrupt CN1_PC0,CN1_PC1,CN1_PC2,CN1_PC3 */ OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) Bit 4 Bit 3 Bit 2 Aux4 Aux3 Aux2 Bit 4...
/* select the non-inverted input CN1_PC1/2/3 outp(wBase+0x2a,0x03); /* select the non-inverted input CN1_PC2/3 Refer to Sec. 2.5 for more information. Refer to DEMO5.C for more information. OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) Bit 4 Bit 3 Bit 2 Aux4 Aux3...
(Read/Write): wBase+0xc4 Bit 7 Bit 6 Bit 5 Note. Refer to Sec. 3.1 for more information about wBase. There are eighteen 8-bit I/O port in the OME-PIO-D144. Only one I/O port can be active at the same time. outp(wBase+0xc4,0); outp(wBase+0xc4,1); outp(wBase+0xc4,17);...
CN1_PA=0 Port is used as a D/O port. There are eighteen 8-bit I/O ports in the OME-PIO-D144. Every I/O port can be programmed as D/I or D/O port. When the PC is first powered up, all eighteen ports are used as D/I port. The I/O port location is given as follows:...
• \TC\LARGE\DEMO1\PIO.H • \TC\LARGE\DEMO1\DEMO1.C • \TC\LARGE\DEMO1\DEMO1.PRJ • \TC\LARGE\DEMO1\IOPORTL.LIB • \TC\LARGE\DEMO1\PIO.LIB • \TC\LARGE\DEMO1\DEMO1.EXE OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) for Turbo C 2.xx or above for large model for library source code demo program source code library header file library source file...
4.2 Demo1: Use D/O of CN1 /* ----------------------------------------------------------- */ /* demo 1 : D/O demo /* step 1 : connect a OME-DB-24C to CN1 of OME-PIO-D144 /* step 2 : run DEMO1.EXE /* step 3 : check the LEDs of OME-DB-24C turn on sequentially /* ----------------------------------------------------------- */ #include "PIO.H"...
Page 38
((c=='Q') || (c=='q')) break; PIO_DriverClose(); OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) /* CN3 to CN4 port are all output */ /* CN5 to CN6 port are all output */ /* select CN1_PA /* set CN1_PA=0x55 */...
/* ------------------------------------------------------------ */ /* demo 2 : D/O demo for CN1 ~ CN6 /* step 1 : connect a OME-DB-24C to CN1 ~ CN6 of OME-PIO-D144 /* step 2 : run DEMO2.EXE /* step 3 : check the LED's of OME-DB-24C turn on sequentially /* ------------------------------------------------------------ */ #include "PIO.H"...
Page 40
PIO_DriverClose(); This demo program is designed for CN1 ~ CN6. The user can install an OME- DB-24C into CN1 ~ CN6 of OME-PIO-D144. This demo will request the user to input a number K as following: If the OME-DB-24C is installed in CN1...
PIO_DriverInit(&wBoards,0x80,0x01,0x00); printf("\n(1) Threr are %d OME-PIO-D144 Cards in this PC",wBoards); if ( wBoards==0 ) putch(0x07); putch(0x07); printf("(1) There are no OME-PIO-D144 card in this PC !!!\n"); exit(0); printf("\n(2) Show the Configuration Space of all OME-PIO-D144:"); for(i=0; i<wBoards; i++) PIO_GetConfigAddressSpace(i,&wBase,&wIrq,&wSubVendor,&wSubDevice, printf("\nCard_%d: wBase=%x,wIrq=%x,subID=[%x,%x,%x],SlotID=[%x,%x]"...
Page 42
(wIrq>=8) outp(A2_8259,0x20); outp(A1_8259,0x20); Refer to Sec. 2.5.1 for more information. OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) /* disable all interrupt */ /* disable all interrupt */ /* IRQ2 */ /* select the non-inverte input */ /* now int_signal is low...
PIO_DriverInit(&wBoards,0x80,0x01,0x00); printf("\n(1) Threr are %d OME-PIO-D144 Cards in this PC",wBoards); if ( wBoards==0 ) putch(0x07); putch(0x07); printf("(1) There are no OME-PIO-D144 card in this PC !!!\n"); exit(0); printf("\n(2) Show the Configuration Space of all OME-PIO-D144:"); for(i=0; i<wBoards; i++) PIO_GetConfigAddressSpace(i,&wBase,&wIrq,&wSubVendor,&wSubDevice, printf("\nCard_%d: wBase=%x,wIrq=%x,subID=[%x,%x,%x],SlotID=[%x,%x]"...
Page 44
(wIrq>=8) outp(A2_8259,0x20); outp(A1_8259,0x20); Refer to Sec. 2.5.2 for more information. OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) /* disable all interrupt */ /* disable all interrupt */ /* enable interrupt /* now int_signal is low /* select the inverte input */...
PIO_DriverInit(&wBoards,0x80,0x01,0x00); printf("\n(1) Threr are %d OME-PIO-D144 Cards in this PC",wBoards); if ( wBoards==0 ) putch(0x07); putch(0x07); printf("(1) There are no OME-PIO-D144 card in this PC !!!\n"); exit(0); printf("\n(2) Show the Configuration Space of all OME-PIO-D144:"); for(i=0; i<wBoards; i++) PIO_GetConfigAddressSpace(i,&wBase,&wIrq,&wSubVendor,&wSubDevice, printf("\nCard_%d: wBase=%x,wIrq=%x,subID=[%x,%x,%x],SlotID=[%x,%x]", i,wBase,wIrq,wSubVendor,wSubDevice,wSubAux,wSlotBus,wSlotDevice);...
PIO_DriverInit(&wBoards,0x80,0x01,0x00); printf("\n(1) Threr are %d OME-PIO-D144 Cards in this PC",wBoards); if ( wBoards==0 ) putch(0x07); putch(0x07); printf("(1) There are no OME-PIO-D144 card in this PC !!!\n"); exit(0); printf("\n(2) The Configuration Space -> for(i=0; i<wBoards; i++) PIO_GetConfigAddressSpace(i,&wBase,&wIrq,&wSubVendor,&wSubDevice, printf("\nCard_%d: wBase=%x,wIrq=%x,subID=[%x,%x,%x],SlotID=[%x,%x]" ,i,wBase,wIrq,wSubVendor,wSubDevice,wSubAux,wSlotBus,wSlotDevice);...
Page 51
(i=0; i<t; i++) for (j=0; j<100; j++) m=0; for (k=0; k<100; k++) {l=(j+t)*i; m+=l;} OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) /* CN2_PA is output */ /* CN3_PA is input /* select CN2_PA /* CN2_PA=0x55 /* select CN2_PA...
Page 52
Department will issue an Authorized Return (AR) number immediately upon phone or written request. Upon examination by OMEGA, if the unit is found to be defective, it will be repaired or replaced at no charge. OMEGA’s WARRANTY does not apply to defects resulting from any action of the purchaser, including but not limited to mishandling, improper interfacing, operation outside of design limits, improper repair, or unauthorized modification.
Page 53
Where Do I Find Everything I Need for Process Measurement and Control? OMEGA…Of Course! Shop online at www.omega.com TEMPERATURE Thermocouple, RTD & Thermistor Probes, Connectors, Panels & Assemblies Wire: Thermocouple, RTD & Thermistor Calibrators & Ice Point References Recorders, Controllers & Process Monitors...