Omega OME-PIO-D96 User Manual

www.omega.com
e-mail: info@omega.com
User’s Guide
OME-PIO-D96 PCI-Bus
Digital I/O Board
Hardware Manual
Servicing North America:
USA: One Omega Drive, P.O. Box 4047
ISO 9001 Certified Stamford CT 06907-0047
TEL: (203) 359-1660 FAX: (203) 359-7700 e-mail: info@omega.com
Canada: 976 Bergar
Laval (Quebec) H7L 5A1, Canada TEL: (514) 856-6928 FAX: (514) 856-6886 e-mail: info@omega.ca
For immediate technical or application assistance:
USA and Canada: Sales Service: 1-800-826-6342 / 1-800-TC-OMEGA
®
Customer Service: 1-800-622-2378 / 1-800-622-BEST
®
Engineering Service: 1-800-872-9436 / 1-800-USA-WHEN
®
TELEX: 996404 EASYLINK: 62968934 CABLE: OMEGA
Mexico: En Espan˜ ol: (001) 203-359-7803 e-mail: espanol@omega.com
FAX: (001) 203-359-7807 info@omega.com.mx
Servicing Europe:
Benelux: Postbus 8034, 1180 LA Amstelveen, The Netherlands
TEL: +31 (0)20 3472121 FAX: +31 (0)20 6434643 Toll Free in Benelux: 0800 0993344 e-mail: sales@omegaeng.nl
Czech Republic: Frystatska 184, 733 01 Karviná, Czech Republic
TEL: +420 (0)59 6311899 FAX: +420 (0)59 6311114 Toll Free: 0800-1-66342 e-mail: info@omegashop.cz
France: 11, rue Jacques Cartier, 78280 Guyancourt, France
TEL: +33 (0)1 61 37 29 00 FAX: +33 (0)1 30 57 54 27 Toll Free in France: 0800 466 342 e-mail: sales@omega.fr
Germany/Austria: Daimlerstrasse 26, D-75392 Deckenpfronn, Germany
TEL: +49 (0)7056 9398-0 FAX: +49 (0)7056 9398-29 Toll Free in Germany: 0800 639 7678 e-mail: info@omega.de
United Kingdom: One Omega Drive, River Bend Technology Centre
ISO 9002 Certified Northbank, Irlam, Manchester
M44 5BD United Kingdom TEL: +44 (0)161 777 6611 FAX: +44 (0)161 777 6622 Toll Free in United Kingdom: 0800-488-488 e-mail: sales@omega.co.uk
OMEGAnet®Online Service Internet e-mail
www.omega.com info@omega.com
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.
The information contained in this document is believed to be correct, but OMEGA Engineering, Inc. accepts no liability for any errors it contains, and reserves the right to alter specifications without notice. WARNING: These products are not designed for use in, and should not be used for, patient-connected applications.
OME-PIO-D96
User Manual
OME-PIO-D96 User Manual (Ver.1.1, Mar/2003, PPH-008-11) ---- 1
Table of Contents
1. INTRODUCTION...........................................................................................................................3
1.1 FEATURES .................................................................................................................................... 3
1.2 SPECIFICATIONS ...........................................................................................................................4
1.3 ORDER DESCRIPTION....................................................................................................................4
1.4 PCI DATA ACQUISITION FAMILY ................................................................................................. 5
1.5 PRODUCT CHECK LIST..................................................................................................................5
2. HARDWARE CONFIGURATION...............................................................................................6
2.1 BOARD LAYOUT ........................................................................................................................... 6
2.2 I/O PORT LOCATION .....................................................................................................................7
2.3 ENABLE I/O OPERATION...............................................................................................................7
2.4 D/I/O ARCHITECTURE ..................................................................................................................8
2.5 INTERRUPT OPERATION ................................................................................................................9
2.6 DAUGHTER BOARDS................................................................................................................... 16
2.7 PIN ASSIGNMENT........................................................................................................................22
3. I/O CONTROL REGISTER ........................................................................................................24
3.1 HOW TO FIND THE I/O ADDRESS ................................................................................................24
3.2 THE ASSIGNMENT OF I/O ADDRESS.............................................................................................29
3.3 THE I/O ADDRESS MAP .............................................................................................................. 30
4. DEMO PROGRAM ......................................................................................................................36
4.1 PIO_PISO..................................................................................................................................37
4.2 DEMO1 .....................................................................................................................................39
4.3 DEMO2 .....................................................................................................................................40
4.4 DEMO3 .....................................................................................................................................41
4.5 DEMO4 .....................................................................................................................................43
4.6 DEMO5 .....................................................................................................................................45
OME-PIO-D96 User Manual (Ver.1.1, Mar/2003) ---- 2

1. Introduction

The OME-PIO-D96 provides 96 TTL digital I/O lines. The OME-PIO-D96
consists of four 24-bit bi-directional ports. Each 24-bit port supports three 8-bit
groups PA, PB & PC. Each 8-bit group can be configured to function as either inputs
or latched outputs. All groups are configured as inputs upon power-up or reset.
The OME-PIO-D96 has one D-Sub connector and three 50-pin flat cable
headers. Each header can connect to a 50-pin flat cable. The flat cable can be
connected to OME-ADP-37/PCI or OME-ADP-50/PCI adapter. The adapter can be
fixed on the chassis. It can be installed in 5V PCI bus and supports “Plug & Play”.

1.1 Features

PCI bus
Up to 96 channels of digital I/O
All I/O lines buffered on the board
Eight-bit groups independently selectable for I/O on each 24-bit port
Input/ Output programmable I/O ports under software control
SMD, short card, power saving
Connects directly to OME-DB-24P, OME-DB-24PR, OME-DB-24PD, OME-DB-
24RD, OME-DB-24PRD, OME-DB-16P8R, OME-DB-24POR, OME-DB-24SSR,
OME-DB-24C
Each board = 4 connectors = 4×3 ports = 4×3×8 bits =96 bits
4 interrupt sources: P2C0,P5C0,P8C0,P11C0 (Refer to sec. 2.7)
One D-sub connector, three 50-pin flat cable connectors
Automatically detected by windows 95/98/NT/2000/XP
No base address or IRQ switches to set
OME-PIO-D96 User Manual (Ver.1.1, Mar/2003) ---- 3

1.2 Specifications

All inputs are TTL compatible
Logic high voltage: 2.4V (Min.)
Logic low voltage: 0.8V (Max.)
All outputs are TTL compatible
Sink current: 64mA (Max.)
Source current: 32mA (Max.)
Environmental :
Operating Temperature: 0°C to 60°C
Storage Temperature: -20°C to 80°C
Humidity: 0 to 90% non-condensing
Dimension: 180mm X 105mm
Power Consumption: +5V @ 600mA

1.3 Order Description

OME-PIO-D96 : PCI bus 96-bit opto-22 board

1.3.1 Options

OME-DB-24P, OME-DB-24PD : 24 channel isolated D/I board
OME-DB-24R, OME-DB-24RD : 24 channels relay board
OME-DB-24PR, OME-DB-24PRD : 24 channels power relay board
OME-DB-16P8R : 16 channels isolated D/I and 8 channels relay output board
OME-DB-24POR : 24 channels Photo MOS output board
OME-DB-24C : 24 channels open-collector output board
OME-ADP-37/PCI : extender, 50 pin OPTO-22 header to DB-37 for PCI bus I/O
boards
OME-ADP-50/PCI : extender, 50 pin OPTO-22 header to 50-pin header, for PCI
bus I/O boards
OME-PIO-D96 User Manual (Ver.1.1, Mar/2003) ---- 4

1.4 PCI Data Acquisition Family

We provide a family of PCI bus data acquisition cards. These cards can be
divided into three groups as follows:
1. OME-PCI-series: first generation, isolated or non-isolated cards
OME-PCI-1002/1202/1800/1802/1602: multi-function family, non-isolated
OME-PCI-P16R16/P16C16/P16POR16/P8R8: D/I/O family, isolated
OME-PCI-TMC12: timer/counter card, non-isolated
2. OME-PIO-series: cost-effective generation, non-isolated cards
OME-PIO-823/821: multi-function family
OME-PIO-D144/D96/D64/D56/D48/D24: D/I/O family
OME-PIO-DA16/DA8/DA4: D/A family
3. OME-PISO-series: cost-effective generation, isolated cards
OME-PISO-813: A/D card
OME-PISO-P32C32/P32A32/P64/C64/A64: D/I/O family
OME-PISO-P8R8/P8SSR8AC/P8SSR8DC: D/I/O family
OME-PISO-730/730A: D/I/O card
OME-PISO-DA2: D/A card

1.5 Product Check List

In addition to this manual, the package includes the following items:
one piece of OME-PIO-D96 card
one piece of software floppy diskette or CD
one piece of release note
It is recommended to read the release note first. All important information will be
given in release note as follows:
1. Where you can find the software driver & utility?
2. How to install software & utility?
3. Where is the diagnostic program?
4. FAQ
Attention !
If any of these items is missing or damaged, contact Omega
Engineering immediately. Save the shipping materials and the
box in case you want to ship or store the product in the future.
OME-PIO-D96 User Manual (Ver.1.1, Mar/2003) ---- 5

2. Hardware configuration

2.1 Board Layout

CN1
port0
port1
port2
port3
port4
port5
PCI BUS
CN2 CN3 CN4
OME-PIO-D96
port7
port8
port10
port11
port6
port 9
OME-PIO-D96 User Manual (Ver.1.1, Mar/2003) ---- 6

2.2 I/O port Location

There are twelve 8-bit I/O ports in the OME-PIO-D96. Every I/O port can be
programmed as D/I or D/O port. When the PC is first powered up, all twelve ports are
used as D/I port. The I/O port location is given as follows:
Connector of OME-PIO-D96 PA0 ~ PA7 PB0 ~ PB7 PC0 ~ PC7
CN1 Port0 Port1 Port2
CN2 Port3 Port4 Port5
CN3 Port6 Port7 Port8
CN4 Port9 Port10 Port11
Refer to Sec. 2.1 for board layout & I/O port location.
Note: Each PC0 can be used as interrupt signal source. Refer to Sec. 2.5 for more
information.

2.3 Enable I/O Operation

When the PC is powered up, all D/I/O ports are disabled. The enable/disable
of D/I/O is controlled by the RESET\ signal. Refer to Sec. 3.3.1 for more information
about RESET\ signal. The power-up states are given as follows:
All D/I/O operations are disabled
All twelve D/I/O ports are configured as D/I port
All D/O latch register are undefined.(refer to Sec. 2.4)
The user has to perform some initialization before using these D/I/Os. These
recommended steps are given as follows:
Step 1: find address-mapping of PIO/PISO cards (refer to Sec. 3.1)
Step 2: enable all D/I/O operation (refer to Sec. 3.3.1)
Step 3: configure the first three ports to their expected D/I/O state & send the
initial value to all D/O ports (refer to Sec. 3.3.7)
Step 4: configure the other three ports to their expected D/I/O state & send
the initial value to all D/O ports(refer to Sec. 3.3.7)
Refer to DEMO1.C for demo program.
OME-PIO-D96 User Manual (Ver.1.1, Mar/2003) ---- 7

2.4 D/I/O Architecture

I/O select (Sec. 3.3.7)
RESET\ (Sec. 3.3.1)
Data
(Sec. 3.3.8)
disable\
input Latch
Clock input
D/O latch CKT
D/I/O
The RESET\ is in Low-state Æ all D/I/O are disabled
The RESET\ is in High-state Æ all D/I/O are enabled
If D/I/O is configured as D/I port Æ D/I= external input signal
If D/I/O is configured as D/O port Æ D/I = read back D/O
If D/I/O is configured as D/I port Æ send to D/O will change the D/O latch
register only. The D/I & external input signal will not change
Data
(Sec. 3.3.8)
disable
Buffer input
Clock input
D/I buffer CKT
OME-PIO-D96 User Manual (Ver.1.1, Mar/2003) ---- 8

2.5 Interrupt Operation

All P2C0, P5C0, P8C0 and P11C0 can be used as interrupt signal sources. Refer
to Sec. 2.1 & Sec. 2.7 for P2C0/P5C0/P8C0/P11C0 location. The interrupt of OME-
PIO-D96 is
or non-inverted
follows:
1. make sure the initial level is High or Low
2. if the initial state is High Æ select the
3. if the initial state is Low Æ select the non-inverted signal (Sec. 3.3.6)
4. enable the INT function (Sec. 3.3.4)
5. If the interrupt signal is active Æ program will transfer into the interrupt
Refer to DEMO3.C & DEMO4.C for single interrupt source. Refer to
DEMO5.C for four interrupt sources.
If only one interrupt signal source is used, the interrupt service routine does not
have to identify the interrupt source. (Refer to DEMO3.C & DEMO4.C)
If there are more than one interrupt sources, the interrupt service routine has to
level-trigger & Active_High. The interrupt signal can be inverted
programmable. The procedures of programming are given as
inverted signal (Sec. 3.3.6)
service routine Æ if INT signal is High now Æ select the inverted input
Æ if INT signal is Low now Æ select the non-inverted input
identify the active signals as follows: (Refer to DEMO5.C)
1. Read the new status of the interrupt signal source
2. Compare the new status with the old status to identify the active signals
3. If P2C0 is active, service P2C0 & non-inverter/inverted the P2C0 signal
4. If P5C0 is active, service P5C0 & non-inverted/inverted the P5C0 signal
5. If P8C0 is active, service P8C0 & non-inverted/inverted the P8C0 signal
6. If P11C0 is active, service P11C0 & non-inverted/inverted the P11C0 signal
7. Save the new status to old status
Note: If the interrupt signal is too short, the new status may be as same as old
status. So the interrupt signal must be hold-active until the interrupt service
routine is executed. This hold time is different for different operating systems.
The hold time can be as short as micro-second or as long as second. In general,
20ms is enough for most operating systems.
OME-PIO-D96 User Manual (Ver.1.1, Mar/2003) ---- 9

2.5.1 Interrupt Block Diagram of OME-PIO-D96

INT_CHAN_0
INT\
Level_trigger
The interrupt output signal of OME-PIO-D96, INT\, is Level_trigger &
Active_Low. If the INT\ generate a low-pulse, the OME-PIO-D96 will interrupt the
PC only once. If the INT\ is fixed in low level, the OME-PIO-D96 will interrupt the
PC continuously. So that INT_CHAN_0/1/2/3 must be controlled in a pulse type
signals. They must be fixed in low level state normally and generated a
high_pulse to interrupt the PC.
The priority of INT_CHAN_0/1/2/3 is the same. If all these four signals are active
at the same time, then INT\ will be active only once a time. So the interrupt service
INT_CHAN_1
INT_CHAN_2
INT_CHAN_3
initial_low
active_high
routine has to read the status of all interrupt channels for multi-channel interrupt.
Refer to Sec. 2.5 for mare information.
DEMO5.C for multi-channel interrupt source
If only one interrupt source is used, the interrupt service routine doesn’t have to read
the status of interrupt source. The demo programs, DEMO3.C & DEMO4.C are
designed for single-channel interrupt demo as follows:
DEMO3.C for INT_CHAN_0 only (P2C0 initial low)
DEMO4.C for INT_CHAN_0 only (P2C0 initial high)
OME-PIO-D96 User Manual (Ver.1.1, Mar/2003) ---- 10

2.5.2 INT_CHAN_0/1/2/3

INT_CHAN_0 (1/2/3)
P2C0(P5C0/P8C0/P11C0)
Inverted/Noninverted select
INV0(1/2/3)
Enable/Disable select
EN0(1/2/3)
The INT_CHAN_0(1/2/3) must be fixed in low level state normally and
generated a high_pulse to interrupt the PC.
The EN0 (EN1/EN2/EN3) can be used to enable/disable the INT_CHAN_0(1/2/3)
as follows: (Refer to Sec. 3.3.4)
EN0 (1/2/3) = 0 INT_CHAN_0(1/2/3) = disable
EN0 (1/2/3) = 1 INT_CHAN_0(1/2/3) = enable
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 P2C0
(P5C0/P8C0/P11C0)
INV0 (1/2/3) = 1 INT_CHAN_0(1/2/3) = non-inverted state of P2C0
(P5C0/P8C0/P11C0)
OME-PIO-D96 User Manual (Ver.1.1, Mar/2003) ---- 11

2.5.3 Initial_high, active_low Interrupt source

If the P2C0 is an initial_high, active_low signal, the interrupt service routine
should use INV0 to invert or not to invert the P2C0 for high_pulse generation as
follows: (Refer to DEMO4.C)
Initial set:
now_int_state=1; /* initial state for P2C0 */
outportb(wBase+0x2a,0); /* select the inverted P2C0 */
void interrupt irq_service() { if (now_int_state==1) /* now P2C0 is changed to LOW */(a) { /* --> INT_CHAN_0=!P2C0=HIGH now */
COUNT_L++; /* find a LOW_pulse (P2C0) */
If((inport(wBase+7)&1)==0)/* the P2C0 is still fixed in LOW */ { /* Æ need to generate a high_pulse */ outportb(wBase+0x2a,1);/* INV0 select the non-inverted input */(b)
/* INT_CHAN_0=P2C0=LOW --> */ /* INT_CHAN_0 generate a high_pulse */ now_int_state=0; /* now P2C0=LOW */ } else now_int_state=1; /* now P2C0=HIGH */ /* don’t have to generate high_pulse */ } else /* now P2C0 is changed to HIGH */(c) { /* --> INT_CHAN_0=P2C0=HIGH now */
COUNT_H++; /* find a HIGH_pulse (P2C0) */
If((inport(wBase+7)&1)==1)/* the P2C0 is still fixed in HIGH */ { /* need to generate a high_pulse */ outportb(wBase+0x2a,0);/* INV0 select the inverted input */(d)
/* INT_CHAN_0=!P2C0=LOW --> */ /* INT_CHAN_0 generate a high_pulse */ now_int_state=1; /* now P2C0=HIGH */ } else now_int_state=0; /* now P2C0=LOW */ /* don’t have to generate high_pulse */ } if (wIrq>=8) outportb(A2_8259,0x20); outportb(A1_8259,0x20); }
P2C0
(a) (b) (c) (d)
INV0
INT_CHAN_0
OME-PIO-D96 User Manual (Ver.1.1, Mar/2003) ---- 12

2.5.4 Initial_low, active_high Interrupt source

If the P2C0 is an initial_low, active_high signal, the interrupt service routine
should use INV0 to invert or not to invert the P2C0 for high_pulse generation as
follows: (Refer to DEMO3.C)
Initial set:
now_int_state=0; /* initial state for P2C0 */
outportb(wBase+0x2a,1); /* select the non-inverted P2C0 */
void interrupt irq_service() { if (now_int_state==1) /* now P2C0 is changed to LOW */(c) { /* --> INT_CHAN_0=!P2C0=HIGH now */
COUNT_L++; /* find a LOW_pulse (P2C0) */
If((inport(wBase+7)&1)==0)/* the P2C0 is still fixed in LOW */ { /* Æ need to generate a high_pulse */ outportb(wBase+0x2a,1);/* INV0 select the non-inverted input */(d)
/* INT_CHAN_0=P2C0=LOW --> */ /* INT_CHAN_0 generate a high_pulse */ now_int_state=0; /* now P2C0=LOW */ } else now_int_state=1; /* now P2C0=HIGH */ /* don’t have to generate high_pulse */ } else /* now P2C0 is changed to HIGH */(a) { /* --> INT_CHAN_0=P2C0=HIGH now */ COUNT_H++; /* find a High_pulse (P2C0) */
If((inport(wBase+7)&1)==1)/* the P2C0 is still fixed in HIGH */ { /* need to generate a high_pulse */ outportb(wBase+0x2a,0);/* INV0 select the inverted input */(b)
/* INT_CHAN_0=!P2C0=LOW --> */ /* INT_CHAN_0 generate a high_pulse */ now_int_state=1; /* now P2C0=HIGH */ } else now_int_state=0; /* now P2C0=LOW */ /* don’t have to generate high_pulse */ } if (wIrq>=8) outportb(A2_8259,0x20); outportb(A1_8259,0x20); }
P2C0
(a) (b) (c) (d)
INV0
INT_CHAN_0
OME-PIO-D96 User Manual (Ver.1.1, Mar/2003) ---- 13

2.5.5 Muliti Interrupt Source

Assume: P2C0 is initial Low, active High,
P5C0 is initial High, active Low
P8C0 is initial Low, active High
P11C0 is initial High, active Low
as follows:
P2C0
P5C0
P8C0
P11C0
P2C0 & P5C0 are
active at the same
time.
P8C0 & P11C0
are active at the
same time.
Refer to DEMO5.C for the source. All these four falling edges & rising edges can
be detected by DEMO5.C.
P2C0 & P5C0 are
return to normal
at the same time.
P8C0 & P11C0 are
return to normal at
the same time.
Note: When the interrupt is active, the user program has to identify the active
signals. Multiple signals maybe active simultaneously. So the interrupt service
routine has to service all active signals at the same time.
OME-PIO-D96 User Manual (Ver.1.1, Mar/2003) ---- 14
Loading...
+ 35 hidden pages