S1C60N13 TECHNICAL MANUAL
EPSON
21
CHAPTER 4: PERIPHERAL CIRCUITS AND OPERATION (Input Ports)
The input interrupt timing for K00–K03 and K10 depends on the value set for the input comparison
registers (KCP00–KCP03 and KCP10). Interrupt can be selected to occur at the rising or falling edge of the
input.
The interrupt mask registers (EIK00–EIK03, EIK10) enables the interrupt mask to be selected individually
for K00–K03 and K10. However, whereas the interrupt function is enabled inside K00–K03, the interrupt
occurs when the contents change from matching those of the input comparison register to non-matching
contents. Interrupt for K10 can be generated by setting the same conditions individually.
When the interrupt is generated, the interrupt factor flag (IK0 and IK1) is set to "1".
Figure 4.4.2.2 shows an example of an interrupt for K00–K03.
Interrupt mask register
EIK03
1
EIK02
1
EIK01
1
EIK00
0
Input port
(1)
(Initial value)
Interrupt generation
K03
1
K02
0
K01
1
K00
0
Input comparison register
KCP03
1
KCP02
0
KCP01
1
KCP00
0
With the above setting, the interrupt of K00–K03 is generated under the following condition:
(2)
K03
1
K02
0
K01
1
K00
1
(3)
K03
0
K02
0
K01
1
K00
1
(4)
K03
0
K02
1
K01
1
K00
1
Because K00 interrupt is masked, interrupt will be
generated when no matching occurs between the
contents of the 3 bits K01–K03 and the 3 bits input
comparison register KCP01–KCP03.
Fig. 4.4.2.2 Example of interrupt of K00–K03
K00 is masked by the interrupt mask register (EIK00), so that an interrupt does not occur at (2). At (3),
K03 changes to "0"; the data of the terminal that is interrupt enabled no longer matches the data of the
input comparison register, so that interrupt occurs. As already explained, the condition for the interrupt
to occur is the change in the port data and contents of the input comparison register from matching to
nonmatching. Hence, in (4), when the nonmatching status changes to another nonmatching status, an
interrupt does not occur. Further, terminals that have been masked for interrupt do not affect the condi-
tions for interrupt generation.
4.4.3 Mask option
The contents that can be selected with the input port mask option are as follows:
(1) Internal pull-down resistor can be selected for each of the five bits of the input ports (K00–K03, K10).
When you have selected "Gate direct", take care that the floating status does not occur for the input.
Select "With pull-down resistor" for input ports that are not being used.
(2) The input interrupt circuit contains a noise rejector for preventing interrupt occurring through noise.
The mask option enables selection of whether to use the noise rejector for each separate terminal
series.
When "Use" is selected, a maximum delay of 1 msec occurs from the time interrupt condition is
established until the interrupt factor flag (IK) is set to "1".