United Kingdom:One Omega Drive, River Bend Technology Centre
ISO 9002 CertifiedNorthbank, Irlam, Manchester
M44 5BD United Kingdom
TEL: +44 (0)161 777 6611FAX: +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
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
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.