
PIO-D48 Series Card
48-channel OPTO-22 Compatible DIO Board
User Manual/Ver. 3.4/Aug. 2015/PMH-006-34/Page: 14
2.7
Interrupt Operation
There are four interrupt sources in the PIO-D48/D48U/D48SU and PEX-D48. These four signals are
named INT_CHAN_0, INT_CHAN_1, INT_CHAN_2 and INT_CHAN_3. Their signal sources are given as
follows:
INT_CHAN_0: PC3/PC7 from port-2 (Refer to
Sec. 2.7.2
)
INT_CHAN_1: PC3/PC7 from port-5 (Refer to
Sec. 2.7.3
)
INT_CHAN_2: Cout0 (Refer to
Sec. 2.7.4
)
INT_CHAN_3: Cout2 (Refer to
Sec. 2.7.5
)
Note that DEMO4.C, DEMO7.C, DEMO8.C, DEMO9.C and DEMO10.C are demo programs for a single
interrupt source and DEMO11.C is the demo program for more than one interrupt source in the DOS
operating system. If only one interrupt signal source is used, the interrupt service routine does not
need to identify the interrupt source. However, if there are more than one interrupt source, the
interrupt service routine has to identify the active signals in the following manner:
1.
Read the new status of all interrupt signal sources. (refer to
Sec 6.3.5
)
2.
Compare the new status with the old status to identify the active signals.
3.
If INT_CHAN_0 is active, service INT_CHAN_0 & non-inverter/inverted the INT_CHAN_0 signal.
4.
If INT_CHAN_1 is active, service INT_CHAN_1 & non-inverted/inverted the INT_CHAN_1 signal.
5.
If INT_CHAN_2 is active, service INT_CHAN_2 & non-inverted/inverted the INT_CHAN_2 signal.
6.
If INT_CHAN_3 is active, service INT_CHAN_3 & non-inverted/inverted the INT_CHAN_3 signal.
7.
Update the interrupt status.
Limitation!!
If the interrupt signal is too short, the new status may be the same as the old status. So the
interrupt signal must be held active until the interrupt service routine has been executed. This hold
time is different for differing operating systems. The hold time can be as short as a micro-second or
as long as 1 second. In general, 20 ms is enough for all O.S.