Omega OME-PIO-D144 Hardware Manual

Pci-bus digital i/o board

Advertisement

Quick Links

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

Advertisement

Table of Contents
loading

Summary of Contents for Omega OME-PIO-D144

  • 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.
  • Page 3 OME-PIO-D144 User’s Manual OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001, PPH-009-21) ----- 1...
  • Page 4: Table Of Contents

    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...
  • Page 6: Introduction

    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.
  • Page 7: Hardware Configuration

    Hardware configuration Board Layout OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) ----- 5...
  • Page 8: I/O Port Location

    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.
  • Page 9: D/I/O Architecture

    • 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...
  • Page 10: Interrupt Operation

    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...
  • Page 15: Daughter Boards

    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...
  • Page 16: Ome-Adp-37/Pci & Ome-Adp-50/Pci

    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...
  • Page 17: Ome-Db-24P/24Pd Isolated Input Board

    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...
  • Page 18: Ome-Db-24R/24Rd Relay Board

    D-sub 37-pin header Other specifications OME-DB-24R, OME-DB-24RD OME-DB-24PR, OME-DB-24PRD OME-DB-24POR OME-DB-24SSR OME-DB-24C OME-DB-16P8R OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) Note: Channel: 24 From C Relay 50-Pin cable Relay: Switching up to 0.5A at 110ACV OME-DB-24R Same 24 × Relay (120V, 0.5A) 24 ×...
  • Page 19: Ome-Db-24Pr/24Por/24C

    50-Pin cable OME-PIO-D144 Note: 50-Pin connector (OPTO-22 compatible), for OME-DIO-24, OME-DIO-48, OME-DIO-144 OME-PIO-D144, OME-PIO-D96, OME-PIO-D56, OME-PIO-D48, OME-PIO-D24 20-Pin connector for 16 channel digital output, OME-A-82X, OME-A-62X, OME-DIO-64, OME-ISO-DA16/DA8 Channel: 16 Form A Relay , 8 Form C Relay.
  • Page 20: Daughter Board Comparison Table

    2.6.8 Daughter Board Comparison Table 20-pin flat-cable OME-DB-37 OME-DN-37 OME-ADP-37/PCI OME-ADP-50/PCI OME-DB-24P OME-DB-24PD OME-DB-16P8R OME-DB-24R OME-DB-24RD OME-DB-24C OME-DB-24PRD OME-DB-24POR OME-DB-24SSR OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) 50-pin flat-cable D-sub 37-pin ---- 18...
  • Page 21: Pin Assignment

    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...
  • Page 23: I/O Control Register

    • 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...
  • Page 25: Pio_Driverinit

    /* 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);...
  • Page 26: Pio_Getconfigaddressspace

    /* 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);...
  • Page 27: Show_Pio_Piso

    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...
  • Page 28: The Assignment Of I/O Address

    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...
  • Page 30: The I/O Address Map

    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:...
  • Page 31: Aux Control Register

    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...
  • Page 32: Aux Status Register

    /* 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...
  • Page 33: Read/Write 8-Bit Data Register

    (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);...
  • Page 34: I/O Selection Control Register

    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:...
  • Page 35: Demo Program

    • \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...
  • Page 36: Ome-Pio-D144.H

    OME-PIO-D144.H /* The header file for OME-PIO-D144 card */ #define Disable #define Enable #define D144 wBase+0x00 #define IO_SCR0 wBase+0xc8 #define IO_SCR1 wBase+0xcc #define IO_SCR2 wBase+0xd0 #define AUX_CR wBase+0x02 #define AUX_DR wBase+0x03 #define INT_MCR wBase+0x05 #define AUX_SR wBase+0x07 #define INT_PCR wBase+0x2a...
  • Page 37: Demo 1: Use D/Oof Cn1

    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 */...
  • Page 39: Demo 2: Use D/Oof Cn1~Cn6

    /* ------------------------------------------------------------ */ /* 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...
  • Page 41: Demo3: Interrupt Demo1

    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...
  • Page 43: Demo4: Interrupt Demo2

    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 */...
  • Page 45: Demo5: Interrupt Demo3

    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);...
  • Page 46 ^ now_int_state; OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) /* disable all interrupt */ /* disable all interrupt */ CN1_PC0 = non-inverte input */ CN1_PC1 = inverte input */ CN1_PC2 = non-inverte input */...
  • Page 47 ((int_c&0x04) != 0) cc=new_int_state&0x04; if (cc !=0) CNT_H3++; else CNT_L3++; invert=invert ^ 4; 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) ----- 45...
  • Page 48: Demo 6: Outport Of Cn1-Cn6

    4.7 DEMO 6: Outport of CN1-CN6 /* ------------------------------------------------------------ */ /* demo 6 : D/O demo /* step 1 : connect a OME-DB-24C to CN1 of OME-PIO-D144 /* step 2 : run DEMO6.EXE /* step 3 : check the LED's of OME-DB-24C turn on sequentially /* ------------------------------------------------------------ */ #include "PIO.H"...
  • Page 49 PA=%02xH, PB=%02xH, PC=%02xH, press Q to stop",i,i,i); outp(Act_IOPCR,CN6_PA); outp(RW_8BitDR,i); outp(Act_IOPCR,CN6_PB); outp(RW_8BitDR,i); outp(Act_IOPCR,CN6_PC); outp(RW_8BitDR,i); sleep(1); if(i==0x80) { i=0x01; break; } if (kbhit()!=0) { c=getch(); if ((c=='q') || (c=='Q') || return; } /* end of while */ PIO_DriverClose(); OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001) c==27 ) ----- 47...
  • Page 50: Demo10: Find Card Number

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

Table of Contents