9 i/O PORTS (P)
9-4
Seiko epson Corporation
S1C17624/604/622/602/621 TeChniCal Manual
Pull-up Control
9.4
The I/O port contains a pull-up resistor that can be enabled or disabled individually for each bit using P
x
PU
y
/P
x
_
PU register. Setting P
x
PU
y
to 1 (default) enables the pull-up resistor and pulls up the port pin in input mode. It will
not be pulled up if set to 0. The P
x
PU
y
setting is ignored and not pulled up in output mode, regardless of how the
P
x
IEN
y
is set.
I/O ports that are not used should be set with pull-up enabled.
This pull-up setting is also enabled for ports for which the peripheral module function has been selected.
A delay will occur in the waveform rising edge depending on time constants such as pull-up resistance and pin load
capacitance if the port pin is switched from Low level to High level through the internal pull-up resistor. An ap-
propriate wait time must be set for the I/O port loading. The wait time set should be a value not less than that calcu-
lated from the following equation.
Wait time = R
IN
×
(C
IN
+ load capacitance on board)
×
1.6 [s]
R
IN
: pull-up resistance maximum value, C
IN
: pin capacitance maximum value
input interface level
9.5
Some I/O ports allow software to select the input interface level from two types: CMOS Schmitt level and CMOS
level.
5.1 Input Interface Level
Table 9.
I/O port
S1C17624/622
S1C17604/602/621
CMOS Schmitt level
(P
x
SM
y
= 1)
CMOS level
(P
x
SM
y
= 0)
CMOS Schmitt level
(P
x
SM
y
= 1)
CMOS level
(P
x
SM
y
= 0)
P00–P07
(Selectable)
(Selectable)
(Selectable)
(Selectable)
P10–P15
(Selectable)
(Selectable)
(Selectable)
(Selectable)
P16–P17
(Fixed)
×
(Fixed)
×
P20–P27
(Fixed)
×
(Fixed)
×
P30–P37
(Fixed)
×
(Fixed)
×
P40
(Fixed)
×
(Fixed)
×
DSIO (P41)
(Fixed)
×
(Fixed)
×
DST2 (P42)
(Fixed)
×
(Fixed)
×
DCLK (P43)
*
–
–
–
–
P44–P47
(Selectable)
(Selectable)
P50–P52
(Selectable)
(Selectable)
P53–P56
(Fixed)
×
*
DCLK (P43) is an output-only port.
(Selectable) The input interface can be selected using the P
x
SM
y
bit.
(Fixed)
The input interface level is fixed at CMOS Schmitt level.
The input interface level for the I/O ports listed with “ (Selectable)” can be selected individually for each bit us-
ing P
x
SM
y
/P
x
_SM register. Setting P
x
SM
y
to 1 (default) selects CMOS Schmitt level; setting to 0 selects CMOS
level.
The input interface level for the I/O ports listed with “ (Fixed)” is fixed at CMOS Schmitt level and cannot be
switched to CMOS level. In the S1C17624/622/604, the P
x
SM
y
bits for these ports are read-only bits (always read as
1) and cannot be altered. In the S1C17602/621, both 1 and 0 can be written to and read from these bits. However, the
input interface level cannot be switched.
P0 and P1 Port Chattering Filter Function
9.6
The P0 and P1 ports include a chattering filter circuit for key entry that can be disabled or enabled with a check
time specified individually for the four P
x
[3:0] and P
x
[7:4] ports using P
x
CF1[2:0]/P
x
_CHAT register and
P
x
CF2[2:0]/P
x
_CHAT register, respectively.