Omron C200HX Computer Hardware User Manual


 
288
Description INT(89) is used to control interrupts and performs one of 11 functions depending
on the values of C and N. As shown in the following tables, six of the functions act
on input interrupts, three act on the scheduled interrupt, and the other two mask
or unmask all interrupts.
Interrupt C INT(89) Function Comments
Input interrupts from
000 Mask/unmask input interrupts
Bits 00 to 07 of D indi-
Interrupt Input Unit 0
001 Clear input interrupts
cate inputs 00 to 07.
(N=000)
002 Read current mask status Status written to D.
Input interrupts from
000 Mask/unmask input interrupts
Bits 00 to 07 of D indi-
Interrupt Input Unit 1
001 Clear input interrupts
cate inputs 00 to 07.
(N=001)
002 Read current mask status Status written to D.
Scheduled (N=004)
000 Set interrupt interval ---
001 Set time to first interrupt ---
002 Read interrupt interval ---
The following 2 functions depend on the value of C only.
Value of C INT(89) Function
100 Mask all interrupts
200 Unmask all interrupts
Set N=000 for Interrupt Input Unit 0 and N=001 for Interrupt Input Unit 1. This
function is used to mask and unmask input interrupts 00 to 07.Masked inputs are
recorded, but ignored. When an input is masked, the interrupt program for it will
be run as soon as the bit is unmasked (unless it is cleared beforehand by execut-
ing INT(89) with C=001 and N=000).
Set the corresponding bit in D to 0 to unmask or to 1 to mask an I/O interrupt
input. Bits 00 to 07 correspond to 00 to 07.
Set N=000 for Interrupt Input Unit 0 and N=001 for Interrupt Input Unit 1. This
function is used to clear I/O interrupt inputs 00 to 07. Since interrupt inputs are
recorded, masked interrupts will be serviced after the mask is removed unless
they are cleared first.
Set the corresponding bit in D to 1 to clear an interrupt input. Bits 00 to 07 corre-
spond to 00 to 07.
Set N=000 for Interrupt Input Unit 0 and N=001 for Interrupt Input Unit 1. This
function is used to write the current mask status for input interrupts 00 to 07 to
word D. The corresponding bit will be ON if the input is masked. (Bits 00 to 07
correspond to 00 to 07.)
This function is used to set the interval between scheduled interrupts. The con-
tent of D (BCD: 0001 to 9999) is multiplied by the scheduled interrupt time unit
(1 ms or 10 ms) to obtain the scheduled interrupt interval.
The scheduled interrupt time unit is set in DM 6622 of the PC Setup. Refer to
3-6-4 PC Setup for details on setting this time unit.
This function is used to set the time to the first scheduled interrupt. The content
of D (BCD: 0000 to 9999) is multiplied by the scheduled interrupt time unit (1 ms
or 10 ms) to obtain the time to the first scheduled interrupt. The scheduled inter-
rupt time unit is set in DM 6622 of the PC Setup. Refer to 3-6-4 PC Setup for
details on setting this time unit.
Be sure to set the time to the first interrupt. If this setting is not made, the interval
to the first interrupt (set with N=004, C=000) will be uncertain.
Use the First Cycle Flag (SR 25315) for the execution condition to INT(89) when
setting the time to the first interrupt (C=001). The scheduled interrupt might nev-
er occur if the C=001 setting is made continuously.
Mask/unmask Input
Interrupts
(N=000 or 001, C=000)
Clear Input Interrupts
(N=000 or 001, C=001)
Read Current Mask Status
(N=000 or 001, C=002)
Set Interrupt Interval
(N=004, C=000)
Set Time to First Interrupt
(N=004, C=001)
Subroutines and Interrupt Control Section 5-23