!
!
187
for it will be run as soon as the bit is unmasked (unless it is cleared first – see
below). All interrupts are initially masked.
A control code of CC = 001 causes the masks on those bits of the designated
Interrupt Input Unit, corresponding to ON bits in D to be cleared so that the
subroutine will not be executed even if the interrupt is unmasked. Because
interrupt inputs are stored, masked interrupts will be serviced after the mask
is removed, unless they are cleared first.
A control code of CC = 002 writes the current mask status of the designated
Interrupt Input Unit into D.
Scheduled Interrupts (N = 004)
Subroutine 99 can be established so that it will be executed repeatedly at a
fixed interval through scheduled interrupts.The actual time at which it is exe-
cuted is independent of the cycle time. INT(89) is used to control the sched-
uled interrupt. If N is 004, CC is used to designate the desired function as
follows:
CC = 000: Setting time interval
001: Setting the time to first scheduled interrupt
002: Reading the current time interval
Even when a subroutine 99 has been written, it will not be executed accord-
ing to scheduled interrupts unless INT(89) is used to set the proper times.
INT(89) should be used to set both the time interval (CC = 000) for the
scheduled interrupt and the time to the first scheduled interrupt (CC = 001.
Unstable operation may result is the time to the first interrupt is not set.
To set the time interval for the scheduled interrupt, set CC to 000 and set D
to any value between 00.01 and 99.99 seconds. The decimal point is not in-
put. The time interval can be changed at any time.
To cancel the scheduled interrupt, set the time interval to 00.00 seconds.
Caution
If the scheduled execution time of the subroutine becomes too large, it will have
a serious effect on the overall execution time of the main program. Therefore,
you should take extra care to write a subroutine that is fast and efficient. INT(89),
with a CC of 000, is used to change the scheduled interrupt time interval, the new
time interval is not effective until after the next scheduled interrupt. (c.f. CC = 001
below.)
To set the time to the first interrupt, set CC to 001 and set D to any value be-
tween 00.01 and 99.99 seconds. The decimal point is not entered. If D is set
to 00.00, the interrupt will not occur.
Caution
INT(89), with a CC code of 001, can be used to change the scheduled interrupt
time interval for one cycle. The new time interval is effective immediately. The
scheduled interrupt may never actually occur if the time to the first interrupt is
changed repeatedly, i.e., before the interrupt has time to occur.
To access the current time interval for the scheduled interrupt, set CC 002.
The current time interval will be placed in D.
Flags
ER:
CC, D, or N is not within specified values.
CC = 001
(Clear)
CC = 002
(Read Mask)
Description
Scheduling the Interrupt
CC = 000
(Interval)
CC = 001
(Time to First Interrupt)
CC = 002
(Read Interval)
Subroutines and Interrupt Control
Section 5-20