The OME-PIO-D56/OME-OME-PIO-D24 provides 56/24 TTL digital I/O lines. The OME-PIO-D56/OME-OME-PIO-D24 consists of one 24-bit bi-directional port, one 16-bit input port and one 16-bit output port (only for OME-PIO-D56). The 24-bit port supports three 8-bit groups PA, PB & PC. Each 8-bit group can be individually configured to function as either an input or an output.
OME-PISO-DA2: D/A card Product Checklist In addition to this manual, the package includes the following items: • One OME-PIO-D56(or OME-PIO-D24) card • One software floppy diskette or CD • One release note Please read the release note first. Important information that could be given in release note such as: 1.
I/O Port Location The OME-PIO-D56/OME-PIO-D24 consists of one 24-bit bi-directional port, one 16 bit input port and one 16 bit output port (only for OME-PIO-D56). The 24-bit port supports three 8-bit groups: PA, PB & PC. Each 8-bit group can be individually configured to function as either inputs or outputs.
Page 10
• 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 signals will not change. OME-PIO-D56/PIO-D24 User Manual (Ver.2.1, Oct/2003, PPH-005-21) disable\ input Latch...
Page 11
• The RESET\ is in Low-state all DI operations are disabled • The RESET\ is in High-state all DI operations are enabled RESET\ disable Data CON2 Buffer input Clock input D/I buffer CKT OME-PIO-D56/OME-PIO-D24 User Manual (Ver.2.1, Oct/2003) ---- 9...
Page 12
DO operations are enabled The power-up states are as follows: • All DO operations are disabled • All output latches are cleared to Low-Level RESET\ clear Data CON1 input Latch Clock input D/O buffer CKT OME-PIO-D56/PIO-D24 User Manual (Ver.2.1, Oct/2003, PPH-005-21) ---- 10...
Interrupt Operation All PC0, PC1, PC2 and PC3 can be used as an interrupt signal sources. Refer to Sec. 2.1 for PC0/PC1/PC2/PC3 location. The interrupt of OME-PIO-D56/OME- PIO-D24 is level-trigger & Active_High. The interrupt signal can be programmed to inverted or non-inverted 1.
Page 14
D56/D24 INT\ Level_trigger The interrupt output signal of OME-PIO-D56/OME-PIO-D24, INT\ is Level_trigger & Active_Low. If the INT\ generates a low pulse, the OME-PIO- D56/OME-PIO-D24 will interrupt the PC only once. If the INT\ is fixed in low level, the OME-PIO-D56/OME-PIO-D24 will interrupt the PC continuously.
Page 15
The INV0 can be used to invert/non-invert the PC0 (1/2/3) as follows: (Refer to Sec.3.3.6) INV0 (1/2/3) = 0 → INT_CHAN_0(1/2/3) = inverted state of PC0 (1/2/3) INV0 (1/2/3) = 1 → INT_CHAN_0(1/2/3) = non-inverted state of PC0 (1/2/3) OME-PIO-D56/OME-PIO-D24 User Manual (Ver.2.1, Oct/2003) PC0(PC1/PC2/PC3) Inverted/Noninverted select INV0(1/2/3)
Page 16
(wIrq>=8) outportb(A2_8259,0x20); outportb(A1_8259,0x20); INV0 INT_CHAN_0 OME-PIO-D56/PIO-D24 User Manual (Ver.2.1, Oct/2003, PPH-005-21) /* initial state for PC0 /* now PC0 is changed to LOW /* --> INT_CHAN_0=!PC0=HIGH now /* find a LOW_pulse (PC0) need to generate a high_pulse /* INT_CHAN_0=PC0=LOW -->...
Page 17
(wIrq>=8) outportb(A2_8259,0x20); outportb(A1_8259,0x20); INV0 INT_CHAN_0 OME-PIO-D56/OME-PIO-D24 User Manual (Ver.2.1, Oct/2003) /* initial state for PC0 /* now PC0 is changed to LOW /* --> INT_CHAN_0=!PC0=HIGH now /* find a LOW_pulse (PC0) need to generate a high_pulse /* INT_CHAN_0=PC0=LOW -->...
Page 18
Note: When the interrupt is active, the user program has to identify the active signals. These signals may be active at the same time. The interrupt service routine has to service all active signals at the same time. OME-PIO-D56/PIO-D24 User Manual (Ver.2.1, Oct/2003, PPH-005-21) PC0 & PC1 are return to normal at the same time.
Page 19
CNT_L4++; invert=invert^8; now_int_state=new_int_state; outportb(wBase+0x2a,invert); if (wIrq>=8) outportb(A2_8259,0x20); outportb(A1_8259,0x20); OME-PIO-D56/OME-PIO-D24 User Manual (Ver.2.1, Oct/2003) /* read all interrupt state */ /* compare which interrupt /* signal be change /* INT_CHAN_0 is active /* now PC0 change to high /* now PC0 change to low...
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-D56/PIO-D24 User Manual (Ver.2.1, Oct/2003, PPH-005-21) 37pin cable OME-DB-8125 37pin cable...
Page 21
The OME-ADP-20/PCI is an extender for 20-pin header. One side of OME- ADP-20/PCI connects to a 20-pin header. The other side mounts on the PC chassis as follows: NOTE: Please choose the suitable extender for your application OME-PIO-D56/OME-PIO-D24 User Manual (Ver.2.1, Oct/2003) ---- 19...
Page 22
AC signals. Use this board to isolate the computer from large common-mode voltages, ground loops and transient voltage spikes that often occur in industrial environments. OME-PIO-D56/D24 OME-PIO-D56/D24 50-pin flat-cable header D-sub 37-pin header OME-PIO-D56/PIO-D24 User Manual (Ver.2.1, Oct/2003, PPH-005-21) Opto-Isolated AC or DC Signal 0V to 24V OME-DB-24PD OME-DB-24PD ---- 20...
Page 23
D-sub 37-pin header 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-D56/OME-PIO-D24 User Manual (Ver.2.1, Oct/2003) Note: Channel : 24 Form C Relay Relay: Switch up to 0.5A at 110ACV OME-DB-24RD 24*Relay (120V, 0.5A) 24* Power Relay (250V, 5A) 24*photo MOS Relay (350V, 01.A) 24*SSR (250VAC, 4A) 24*O.C.
Page 24
(one for each relay) light when their associated relay is activated. To avoid overloading your PC’s power supply, this board needs a +12VDC or +24VDC external power supply. OME-PIO- D56/PIO-D24 OME-PIO-D56/PIO-D24 User Manual (Ver.2.1, Oct/2003, PPH-005-21) D-Sub37 50-pin header Note: 50-Pin connector (OPTO-22 compatible), for OME-DIO-24/48/44,...
Page 25
OME-DB-24C OME-DB-24PR OME-DB-24PRD OME-DB-24POR OME-DB-24SSR Note: There is no 50-pin flat cable header on OME-PIO-D56/OME-PIO-D24. The OME-PIO-D56/OME-PIO-D24 has one D-Sub 37 connector and two 20 pin flat-cable headers (only for OME-PIO-D56). OME-PIO-D56/OME-PIO-D24 User Manual (Ver.2.1, Oct/2003) 50-pin flat-cable D-sub 37-pin...
PIO_PISO.EXE The utility program, PIO/PISO cards installed in this PC. Refer to Sec. 4.1 for more information. OME-PIO-D56/PIO-D24 User Manual (Ver.2.1, Oct/2003, PPH-005-21) < REV 6.0 or above > : • Vendor ID = 0xE159 • Device ID = 0x0001 •...
Page 29
Sample program 1: find all OME-PIO-D56/OME-PIO-D24 in the PC wSubVendor=0x80; wSubDevice=1; wSubAux=0x40; /* 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-D24 cards installed in this PC */ for (i=0; i<wBoards; i++) PIO_GetConfigAddressSpace(i,&wBase,&wIrq,&wID1,&wID2,&wID3, printf("\nCard_%d: wBase=%x, wIrq=%x", i,wBase,wIrq);...
Page 30
Sample program 2: find all OME-PIO/PISO in this PC (refer to Sec. 4.1 for more information) wRetVal=PIO_DriverInit(&wBoards,0xff,0xff,0xff); /*find all PIO_PISO*/ printf("\nThrer are %d 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-D56/PIO-D24 User Manual (Ver.2.1, Oct/2003, PPH-005-21) ---- 28...
Page 31
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-D56/OME-PIO-D24 User Manual (Ver.2.1, Oct/2003) Sub_vendor 144 * D/I/O 5C80...
Page 32
/* step1: detect all OME-PIO-D56/OME-PIO-D24 cards first */ wSubVendor=0x80; wSubDevice=1; wSubAux=0x40; /* 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-D24 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 33
The demo program is given as follows: wRetVal=PIO_DriverInit(&wBoards,0xff,0xff,0xff); /*find all PIO_PISO*/ printf("\nThrer are %d 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-D56/OME-PIO-D24 User Manual (Ver.2.1, Oct/2003) ---- 31...
PIO_PISO.EXE & record the wSlotBus1 & wSlotDevice1 3. Remove all OME-PIO-D56/OME-PIO-D24 from this PC 4. Install one OME-PIO-D56/D24 into the PC’s PCI_slot2, run PIO_PISO.EXE & record the wSlotBus2 & wSlotDevice2 5. Repeat (3) & (4) for all PCI_slot?, record all wSlotBus? & wSlotDevice? The records may be as follows: PC’s PCI slot...
Users are strongly recommended to change the auto- assigned 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-D56/OME-PIO-D24 are given as follows: Address Read...
Page 36
When the Aux? is used as D/O, the output state is controlled by this register. This register is designed and reserved for feature extension, so do not control this register now. OME-PIO-D56/PIO-D24 User Manual (Ver.2.1, Oct/2003, PPH-005-21) Bit 4 Bit 3...
Page 37
DEMO5.C for more information. The Aux 0~3 are used as interrupt source. The interrupt service routine has to read this register for interrupt source identification. Refer to Sec. 2.5 for more information. OME-PIO-D56/OME-PIO-D24 User Manual (Ver.2.1, Oct/2003) Bit 4 Bit 3...
Page 38
Port? = 1 this port is used as a D/O port Port? = 0 this port is used as a D/I port outportb(wBase+0xcc,0x00); outportb(wBase+0xcc,0x04); OME-PIO-D56/PIO-D24 User Manual (Ver.2.1, Oct/2003, PPH-005-21) Bit 4 Bit 3 Bit 2 INV3 INV2 /* select the non-inverted input PC1/2/3...
Page 39
Bit 7 Bit 6 Bit 5 Note. Refer to Sec. 3.1 for more information about wBase. There are five/three 8-bit I/O ports in the OME-PIO-D56/OME-PIO-D24. Each port is easy to read/write to by access to their own data registers. outportb(wBase+0xc0,Val); Val=inportb(wBase+0xc0);...
• \BC\LIB\Large\BCPIO_L.LIB • \BC\LIB\Huge\PIO.H • \BC\\LIB\Huge\BCPIO_H.LIB NOTE: The library is validated for all OME-PIO/PISO series cards. OME-PIO-D56/PIO-D24 User Manual (Ver.2.1, Oct/2003, PPH-005-21) for Turbo C 2.xx or above for MSC 5.xx or above for BC 3.xx or above for TC library...
• List all PIO/PISO cards installed in this PC • List all resources allocated to every PIO/PISO cards • List the wSlotBus & wSlotDevice for specified PIO/PISO card identification. (Refer to Sec. 3.2 for more information) OME-PIO-D56/OME-PIO-D24 User Manual (Ver.2.1, Oct/2003) /*for PIO-PISO*/ ---- 39...
Page 42
User can find this utility in the company CD or floppy disk. It is useful for all OME-PIO/PISO series card. After executing the utility, detailed information for all OME-PIO/PISO cards that installed in the PC will be show as follows: OME-PIO-D56/PIO-D24 User Manual (Ver.2.1, Oct/2003, PPH-005-21) ---- 40...
DEMO2 /* demo 2 : DI/O demo of CON1, CON2 & CON3 /* step 1 : connect OME-DB-24P to CON3 of OME-PIO-D56/D24 : connect CON1 t0 CON2 of OME-PIO-D56 /* step 2 : run DEMO2.EXE /* step 3 : check the information on screen D/I will same as D/O...
/* Use PC0 as external interrupt signal WORD init_low() disable(); outportb(wBase+5,0); if (wIrq<8) OME-PIO-D56/OME-PIO-D24 User Manual (Ver.2.1, Oct/2003) /* select card_0 */ /* /RESET -> 1 /* set CON3 as D/I ports */ /* disable all interrupt */ /* disable all interrupt */...
Page 46
((inportb(wBase+7)&1)==1) outportb(wBase+0x2a,0); now_int_state=1; else now_int_state=0; if (wIrq>=8) outportb(A2_8259,0x20); outportb(A1_8259,0x20); OME-PIO-D56/PIO-D24 User Manual (Ver.2.1, Oct/2003, PPH-005-21) /* enable interrupt (PC0) /* now ini_signal is low /* select the non-inverte /* now PC0 change to low /* INT_CHAN_0 = !PC0 /* PC0 still fixed in low...
(wIrq<8) irqmask=inportb(A1_8259+1); outportb(A1_8259+1,irqmask & 0xff ^ (1<<wIrq)); setvect(wIrq+8,irq_service); OME-PIO-D56/OME-PIO-D24 User Manual (Ver.2.1, Oct/2003) /* select card_0 */ /* /RESET -> 1 /* set CON3 as D/I ports */ /* disable all interrupt */ /* disable all interrupt */...
Page 48
((inportb(wBase+7)&1)==1) outportb(wBase+0x2a,0); now_int_state=1; else now_int_state=0; if (wIrq>=8) outportb(A2_8259,0x20); outportb(A1_8259,0x20); OME-PIO-D56/PIO-D24 User Manual (Ver.2.1, Oct/2003, PPH-005-21) /* enable interrupt (PC0) /* now ini_signal is high /* select the inverte /* now PC0 change to low /* INT_CHAN_0 = !PC0 /* PC0 still fixed in low...
PIO_DriverClose(); /* Use PC0, PC1, PC2 & PC3 as external interrupt signal WORD init() disable(); outportb(wBase+5,0); OME-PIO-D56/OME-PIO-D24 User Manual (Ver.2.1, Oct/2003) , active High , active High /* select card_0 */ /* /RESET -> 1 /* set CON3 as D/I ports */...
Page 50
if (wIrq<8) irqmask=inportb(A1_8259+1); outportb(A1_8259+1,irqmask & 0xff ^ (1<<wIrq)); setvect(wIrq+8,irq_service); else irqmask=inportb(A1_8259+1); outportb(A1_8259+1,irqmask & 0xfb); irqmask=inportb(A2_8259+1); outportb(A2_8259+1,irqmask & 0xff ^ (1<<(wIrq-8))); setvect(wIrq-8+0x70,irq_service); invert=0x05; outportb(wBase+0x2a,invert); now_int_state=0x0a; CNT_L1=CNT_L2=CNT_L3=CNT_L4=0; CNT_H1=CNT_H2=CNT_H3=CNT_H4=0; int_num=0; outportb(wBase+5,0x0f); enable(); /* -------------------------------------------------------------- */ /* NOTE:1.The hold-time of INT_CHAN_0/1/2/3 must long enough 2.The ISR must read the interrupt status again to the active interrupt sources.
Page 51
(wIrq>=8) outportb(A2_8259,0x20); outportb(A1_8259,0x20); OME-PIO-D56/OME-PIO-D24 User Manual (Ver.2.1, Oct/2003) /* now PC1 is change to low /* to generate a high pulse /* INT_CHAN_2 is active /* now PC2 is change to low /* to generate a high pulse...
Page 52
OMEGA ENGINEERING, INC. warrants this unit to be free of defects in materials and workmanship for a period of 13 months from date of purchase. OMEGA’s WARRANTY adds an additional one (1) month grace period to the normal one (1) year product warranty to cover handling and shipping time. This ensures that OMEGA’s customers receive maximum coverage on each product.
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 Infrared Pyrometers PRESSURE, STRAIN AND FORCE Transducers &...