Interrupt Functions
1-4-3
Input Interrupts
Processing
Procedure
(Input Interrupt Mode)
1,2,3...
1234, an incorrect comparison result is reflected in comparison result output
A.
Countermeasure for Above Problem
Main Program
I N T
1 0 0
0 0 0
0 0 0
B S E T
# 1 2 3 4
D M 0 0 0 0
D M 0 0 1 0
I N T
2 0 0
0 0 0
0 0 0
The CPU Unit's inputs allocated IR 00000 to IR 00003 can be used for inter-
rupts from external sources. Input interrupts 0 through 3 correspond respec-
tively to these bits and are always used to call subroutines 000 through 003
respectively. When input interrupts are not used, subroutines 000 to 003 can
be used for ordinary subroutines.
There are two modes for processing input interrupts. The first is the Input
Interrupt Mode, in which the interrupt is carried out in response to an external
input. The second is the Counter Mode, in which signals from an external
source are counted at high speed, and an interrupt is carried out once for
every certain number of signals.
The INT(89) instruction determines which mode is used.
In the Input Interrupt Mode, signals with a length of 100 µ s or more can be
detected. In the Counter Mode, signals up to 1 kHz can be counted.
Follow the steps outlined below when using input interrupts in input interrupt
mode.
1. Determine the input interrupt number.
Terminal
Corresponding bit address
B0
IN0
IR 00000
A0
IN1
IR 00001
B1
IN2
IR 00002
A1
IN3
IR 00003
2. Wire the input. (See page 25 for more details.)
3. Make PC Setup settings. (See page 26 for more details.)
a) Write 1 in the corresponding digit in DM 6628 to indicate that the input
will be used as an input interrupt (input interrupt or counter mode.)
b) Bits in DM 6630 through DM 6633 can be turned ON to cause the input
to be refreshed before the interrupt subroutine is executed.
Interrupts disabled.
Interrupts enabled.
Subroutine number
000
001
002
003
Section 1-4
23
Need help?
Do you have a question about the CQM1H - PROGRAM and is the answer not in the manual?