
68
EPSON
S1C88409 TECHNICAL MANUAL
CHAPTER 5: PERIPHERAL CIRCUITS AND OPERATION (Input Ports)
5.6 Input Ports (K ports)
5.6.1 Configuration of input ports
The S1C88409 has 12 bits of input ports built-in,
and all the ports can be used as a general-purpose
input port that has an interrupt function.
K0 port:
K00–K07
8 bits
K1 port:
K10–K13
4 bits
The K10 and K11 terminals serve both as the
general-purpose input port terminal and the
external clock (EXCL00, EXCL01) input terminal
for the 16-bit programmable timer (event counter),
and the input signal is common used. (Refer to
Section 5.12, "16-bit Programmable Timer")
Figure 5.6.1.1 shows the structure of the input port.
Input interrupt
circuit
VDD
VSS
Data
bus
Kxx
KxxD
Address
Mask
option
Fig. 5.6.1.1 Structure of input port
Each input port terminal is directly connected to
the data bus via a three-state buffer. The input
signal status can be read via the I/O memory as
data.
5.6.2 Mask option
Input port pull-up resistors
K00
s
s With resistor
s
s Gate direct
K01
s
s With resistor
s
s Gate direct
K02
s
s With resistor
s
s Gate direct
K03
s
s With resistor
s
s Gate direct
K04
s
s With resistor
s
s Gate direct
K05
s
s With resistor
s
s Gate direct
K06
s
s With resistor
s
s Gate direct
K07
s
s With resistor
s
s Gate direct
K10
s
s With resistor
s
s Gate direct
K11
s
s With resistor
s
s Gate direct
K12
s
s With resistor
s
s Gate direct
K13
s
s With resistor
s
s Gate direct
The input port has a built-in pull-up resistor, and it
can be individually selected for use or not by the
mask option.
The "With resistor" option is suitable for push
switch and key matrix input.
When the input terminal is changed from a low
level to a high level by the built-in pull-up resistor,
the rise of the waveform is delayed on account of
the time constant of the pull-up resistor and load
capacitance of the terminal. Hence, when reading
the input port, it is necessary to wait an appropri-
ate amount of time. Particular care must be taken
of the key scan for the key matrix configuration.
Make this waiting time the amount of time or
more calculated by the following expression.
Waiting time = RIN
× (CIN + CL) × 1.6 [sec]
RIN: Pull-up resistance Max. value
CIN: Terminal capacitance Max. value
CL:
Load capacitance on the board
When "Gate direct" is selected, the pull-up resistor
is disconnected and the port is suitable for slide
switch input and interfacing with other LSIs. In
this case, take care that a floating status does not
occur in the input.
For unused input ports, select "With resistor" as
the default setting.