A SERVICE OF

logo

EXTERNAL INTERRUPT SECTION 12
Page 12-1 RPC-320
DESCRIPTION
There are two sources of interrupts the ONITR statement
responds to: Inter nal and external. External interrupts
are off-card. Internal interrupts are from the counter.
External interrupts are used to "wake-up" the card from
any of the IDLE modes. This feature is useful in power
conserving modes.
Signals to P2-ISOA and P2-ISOB are optically isolated.
P2-INT is a non-isolated, TTL input. Only 1 interrupt is
selected. Available interrupts are shown in the table
below.
W8 Pin Description
1-2 External TTL level through P2 (INT)
or optically isolated through P2 (ISOA
& ISOB)
3-4 Carry or borr ow pulse from counter
5-6 Carry pulse from counter
7-8 Borrow pulse from counter
ONINT selection is through jumper W8. This chapter
describes using external inter rupts P2-INT or ISOA /B.
When a counter is used, then external interrupts may not
be used. See Chapter 14, Counter Inputs for more
information.
External interrupt at P2-INT is TTL level compatible.
Bringing this line low generates an interrupt when
ONITR is enabled.
OPTICALLY ISOLATED INTERRUPT
ISOA and ISOB provide an isolated, higher voltage
input. Neither input is connected to ground or + 5V and
is isolated to the card by at least 500 volts.
An external voltage of at least 3.5 volts, any polarity,
will generate an interrupt. Higher voltages may be used
provided a series resistor is in line to the supply. Use
the following formula to determine the series resistor
needed.
Rs = (Vi - 6) / .005
Where: Vi = input voltage
No series resistor is needed when Rs is negative.
INTERRUPT CHARACTERISTICS
Interrupts are negative going edge sensitive. This means
an interrupt is detected when P2-INT goes low or when a
voltage is applied to P2-ISOA and ISOB for at least 10
micro-seconds. To detect a subsequent interrupt, the
line must go high at P2-INT or voltage removed at P2-
ISOA/B for at least 10 micro-seconds.
The status of the interrupt or ISOA/B line is read using
the following statement:
100 A = LINE(8)
When A = 1, P 2-INT is high or no voltage is applied to
ISOA/B.
The P2-INT goes to the output from the opto-isolator I1.
Since this line goes to a 10K ohm pull-up resistor,
additional devices can generate an interrupt only if they
are "wired-or".
PROGRAM EXAMPLE
The following program enables interrupts and goes to a
routine to service it. Jumper W8[1-2] and bring P2-INT
to ground to see this example work.
10 ONITR 500
30 GOTO 30
500 PRINT "Got Interrupt"
510 RETI
Line 510 is necessary to re-enable all interru pts. If this
line is not executed, but a RETURN is used, then
ONT ICK is also disabled. If your program requirements
require disabling all interrupts for a time, then the RETI
statement can be executed within any subroutine to re-