
30
EPSON
S1C60N04 TECHNICAL MANUAL
CHAPTER 4: PERIPHERAL CIRCUITS AND OPERATION (Interrupt and HALT/SLEEP)
4.8.1 Interrupt factors
Table 4.8.1.1 shows the factors that generate interrupt requests.
The interrupt factor flags are set to 1 depending on the corresponding interrupt factors.
The CPU is interrupted when the following two conditions occur and an interrupt factor flag is set to 1.
The corresponding mask register is 1 (enabled)
The interrupt flag is 1 (EI)
The interrupt factor flag is a read-only register, but can be reset to 0 when the register data is read.
At initial reset, the interrupt factor flags are reset to 0.
Note: Reading of interrupt factor flag is available at EI, but be careful in the following cases.
If the interrupt mask register value corresponding to the interrupt factor flag to be read is set to 1,
an interrupt request will be generated by the interrupt factor flag set timing, or an interrupt request
will not be generated. Be very careful when interrupt factor flags are in the same address.
Table 4.8.1.1 Interrupt factors
Interrupt factor
Clock timer 2 Hz falling edge
Clock timer 8 Hz falling edge
Clock timer 32 Hz falling edge
Input (K00–K03) port rising edge
Interrupt factor flag
IT2
(0EFHD2)
IT8
(0EFHD1)
IT32
(0EFHD0)
IK0
(0EDHD0)
4.8.2 Specific masks for interrupt
The interrupt factor flags can be masked by the corresponding interrupt mask registers. The interrupt
mask registers are read/write registers. The interrupts are enabled when 1 is written to them, and
masked (interrupt disabled) when 0 is written to them.
At initial reset, the interrupt mask register is set to 0.
Table 4.8.2.1 shows the correspondence between interrupt mask registers and interrupt factor flags.
Table 4.8.2.1 Interrupt mask registers and interrupt factor flags
Interrupt mask register
EIT2
(0EBHD2)
EIT8
(0EBHD1)
EIT32
(0EBHD0)
EIK03*
(0E8HD3)
EIK02*
(0E8HD2)
EIK01*
(0E8HD1)
EIK00*
(0E8HD0)
Interrupt factor flag
IT2
(0EFHD2)
IT8
(0EFHD1)
IT32
(0EFHD0)
IK0
(0EDHD0)
There is an interrupt mask register for each input port pin.