32
EPSON
S1C63406/408 TECHNICAL MANUAL
CHAPTER 4: PERIPHERAL CIRCUITS AND OPERATION (Input Ports)
The interrupt selection registers (SIK00–SIK03) and input comparison registers (KCP00–KCP03) are
individually provided for the input ports K00–K03.
The interrupt selection registers (SIK0x) select the ports to be used for generating input interrupts or
canceling the SLEEP mode. Writing "1" into an interrupt selection register incorporates that port into the
interrupt generation conditions. The changing the port where the interrupt selection register has been set
to "0" does not affect the generation of the interrupt.
The input interrupt timing can select that the interrupt be generated at the rising edge of the input or that
it be generated at the falling edge according to the set value of the input comparison registers (KCP0x).
By setting these two conditions, an interrupt request signal and a wake up signal are generated at the
rising or falling edge (selected by KCP0x) of the signal input to the port (selected by SIK0x).
When an interrupt factor is generated, the interrupt factor flag (IK00–IK03) is set to "1". At the same time,
an interrupt rquest is generated to the CPU if the corresponding interrupt mask register (EIK00–EIK03) is
set to "1".
When the interrupt mask registers (EIK0x) is set to "0", the interrupt request is masked and no interrupt is
generated to the CPU. However, the SLEEP mode can be cancelled regardless of the interrupt enable
register setting.
The input interrupt circuit has a noise rejector to avoid unnecessary interrupt generation due to noise or
chattering. This noise rejector allows selection of a noise-reject width from among three types shown in
Table 4.4.3.1. Use the K0NR1 and K0NR0 registers to select a noise-reject width. If a pulse shorter than the
selected width is input to the port, an interrupt is not generated. When high speed response is required,
the noise rejecter can be disconnected from the input line.
Table 4.4.3.1 Setting up noise rejector
K0NR1
1
0
K0NR0
1
0
1
0
Noise-reject width
7.8 msec
2.0 msec
0.5 msec
OFF (bypassed)
(When fOSC1 = 32.768 kHz)
Notes: Be sure to turn the noise rejector OFF before executing the SLP instruction.
Reactivating from SLEEP status can only be done by generation of an input interrupt factor.
Therefore when using the SLEEP function, it is necessary to set the interrupt selection register
(SIK0x = "1") of the port to be used for releasing SLEEP status before executing the SLP
instruction. Furthermore, enable the input port interrupt using the corresponding interrupt mask
register (EIK0x = "1") before executing the SLP instruction to run input interrupt handler routine
after SLEEP status is released.
Each input port (K00–K03) has a different interrupt factor, thus the input interrupt is controlled
individually. Be aware that this interrupt configuration is different from that of the previous
models.