
78
EPSON
S1C88409 TECHNICAL MANUAL
CHAPTER 5: PERIPHERAL CIRCUITS AND OPERATION (I/O Ports)
5.8 I/O Ports (P ports)
5.8.1 Configuration of I/O ports
The S1C88409 has 28 bits of I/O ports.
P0 port:
P00–P07
8 bits
P1 port:
P10–P17
8 bits
P2 port:
P20–P23
4 bits
P3 port:
P30–P37
8 bits
These ports can be switched between general-
purpose I/O ports and input/output ports for the
following functions by software.
Data bus for external memory access
Serial interface
Touch panel controller
A/D converter
D/A converter
This section explains control only when using
these ports as general-purpose I/O ports. Refer to
respective sections for other functions.
Figure 5.8.1.1 shows the structure of the I/O port.
Input
control
VDD
VSS
Data
bus
Pxx
Data
register
I/O control
register
Mask
option
1
2
1: During output mode
2: During input mode
(a) P00–P07, P10–P17, P20–P23
Input
control
VDD
VSS
Data
bus
P30
~P35
I/O control
register
Data
register
A/D converter
input control
A/D converter
Mask
option
*1
*2
1: During output mode
2: During input mode
(b) P30–P35
VDD
VSS
P36
P37
*1
*2
1: During output mode
2: During input mode
Input
control
Data
bus
I/O control
register
Data
register
A/D converter
input control
A/D converter
D/A converter
Mask
option
D/A converter
output control
(c) P36, P37
Fig. 5.8.1.1 Structure of I/O port
The port can be set individually in input mode or
output mode when it is used as a general-purpose
I/O port. This setting is done by writing data to
the I/O control register (IOC).
5.8.2 Terminal configuration of I/O port
and change of function
The I/O port terminals are shared with two or
three functions. Therefore, the configuration of the
terminals changes depending on the setting of
each function. Since all the terminals are set for the
I/O port at initial reset except for the MPU mode,
switch them using software according to the
functions to be used.
Table 5.8.2.1 lists the terminal functions.
When the expanded bus mode is set
(P00–P07)
When a bus mode except for the single chip mode
is set, P00–P07 functions as the data bus D0–D7. In
this case, the data register P00D–P07D and the I/O
control register IOC00–IOC07 can be used as a
general-purpose register that does not affect the
input/output for the data bus.
Refer to Section 5.2, "System Controller and Bus
Control", for setting of bus mode.