
38
EPSON
S1C8F626 TECHNICAL MANUAL
5 PERIPHERAL CIRCUITS AND THEIR OPERATION (Input Ports)
The exception processing vectors for each interrupt
factor are set as follows:
K07 input: 000006H
K03 input: 00000EH
K06 input: 000008H
K02 input: 000010H
K05 input: 00000AH
K01 input: 000012H
K04 input: 00000CH
K00 input: 000014H
Figure 5.5.4.1 shows the configuration of the input
interrupt circuit. The input comparison register
KCP selects whether the interrupt for each input
port will be generated on the rising edge or the
falling edge of input. When the K0x input signal
changes to the status set by the input comparison
register KCP0x, the interrupt factor flag FK0x is set
to "1" and an interrupt occurs. The input port has a
chattering-eliminate circuit that checks input level
to avoid unnecessary interrupt generation due to
chattering. There are two separate chattering-
eliminate circuits for K00–K03 and K04–K07 and
they can be set up individually. The CTK00x–
CTK02x registers allow selection of signal level
check time as shown in Table 5.5.4.1.
Table 5.5.4.1 Setting the input level check time
CTK02x
1
0
CTK01x
1
0
1
0
CTK00x
1
0
1
0
1
0
1
0
Check time (
)
4/fOSC3
(2
s)
2/fOSC3
(1
s)
1/fOSC3
(0.5
s)
4096/fOSC1
(128 ms)
2048/fOSC1
(64 ms)
512/fOSC1
(16 ms)
128/fOSC1
(4 ms)
None
–
: When OSC1 = 32 kHz, OSC3 = 2 MHz
Notes: Input interrupts cannot be accepted in
SLEEP mode if the CPU enters SLEEP
mode when the chattering-eliminate circuit
is active. The chattering-eliminate circuit
should be turned OFF (CTP2x = "000")
before executing the SLP instruction.
Be sure to disable interrupts before
changing the contents of the CTK0x
register. Unnecessary interrupts may
occur if the register is changed when the
corresponding input port interrupts have
been enabled by the interrupt enable
register EK0x.
The chattering-eliminate check time
means the maximum pulse width that can
be eliminated. The valid interrupt input
needs a pulse width of the set check time
(minimum) to twice that of the check time
(maximum).
The internal signal may oscillate if the rise /
fall time of the input signal is too long
because the input signal level transition to
the threshold level duration of time is too
long. This causes the input interrupt to
malfunction, therefore setup the input signal
so that the rise/fall time is 25 nsec or less.
Fig. 5.5.4.1 Configuration of input interrupt circuit
K03
Data
bus
K02
K00
Input comparison
register KCP00
Address
K01
Input port
K00D
Chattering-eliminate
circuit
Check time setup register
CTK00L–CTK02L
Interrupt
priority level
judgment
circuit
Interrupt
request
Interrupt factor
flag FK00
Address
Interrupt
priority
register
PK00, PK01
Interrupt enable
register EK00
K07
K06
K04
Input comparison
register KCP04
Address
K05
Chattering-eliminate
circuit
Check time setup register
CTK00H–CTK02H
Interrupt factor
flag FK04
Address
Interrupt enable
register EK04
Divider
fOSC1
Input port
K04D
OSC1
oscillation circuit
Divider
fOSC3
OSC3
oscillation circuit