Description, Optically isolated interrupt, Interrupt characteristics – Remote Technologies RPC-320 User Manual

Page 44: Program example

Advertising
background image

EXTERNAL INTERRUPT

SECTION 12

Page 12-1 RPC-320

DESCRIPTION

There are tw o sources of interrupts the ONITR statement
respond s to: Inter nal and exter nal. Exter nal interr upts
are off-card. Internal interrupts are from the counter.

External interrupts are used to "w ake-up" the card from
any of the IDLE modes. This feature is useful in power
conserving m odes.

Signals to P2-ISOA and P2-ISOB are optically isolated.
P2-IN T is a non-iso lated, TTL input. Only 1 inter rupt is
selected. Available inte rrup ts are show n in the table
below.

W8 P in

Description

1-2

External TTL level through P2 (INT)
or optically isolated through P2 (ISOA
& ISO B)

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
descr ibes using exter nal inter rupts P 2-IN T or ISOA /B.
When a counter is used, then external interr upts may not
be used. See Chapter 14 , C ounter 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 ser ies 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 P 2-
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 v oltage 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
a r e " w i re d -o r " .

PROGRAM EXAMPLE

The following program enables interrupts and goes to a
r o u ti ne to s er v ic e it . J um p e r W 8 [ 1- 2 ] a n d b r in g P 2- I N T
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 th is
line is not executed, but a RETURN is used, then
ONT ICK is also d isabled. If your pr ogram requir ements
require disabling all interrupts for a time, then the RETI
statement can be executed within any subroutine to re-

Advertising