
40
EPSON
S1C6P366 TECHNICAL MANUAL
CHAPTER 4: PERIPHERAL CIRCUITS AND OPERATION (I/O Ports)
4.6 I/O Ports (P00–P03, P10–P13, P20–P23, P30–P33 and P40–P43)
4.6.1 Configuration of I/O ports
The S1C6P366 has 20 bits general-purpose I/O ports. Figure 4.6.1.1 shows the configuration of the I/O
port. The output specification during output mode is fixed at complementary output and the P10–P13,
P20–P23 and P30–P33 ports have built-in pull-up resistors.
Address
Data
register
Data
bus
P
Address
I/O control
register (IOC)
Pull-up control
register (PUL)
VDD
P40–P43 ports do not have a pull-up resistor
Fig. 4.6.1.1 Configuration of I/O port
The P10–P13 I/O port terminals are shared with the serial interface input/output terminals and this
function is selected by the software. The P40–P43 I/O port terminals are shared with the A/D converter
input terminals and this function is also selected by the software.
At initial reset, these are all set to the I/O port.
Table 4.6.1.1 shows the setting of the input/output terminals by function selection.
Table 4.6.1.1 Function setting of input/output terminals
Terminal
name
P00–P03
P10
P11
P12
P13
P20–P23
P30–P33
P40
P41
P42
P43
Terminal status
at initial reset
P00–P03 (Input & pull-up)
P10 (Input & pull-up)
P11 (Input & pull-up)
P12 (Input & pull-up)
P13 (Input & pull-up)
P20–P23 (Input & pull-up)
P30–P33 (Input & pull-up)
P40 (Input & high impedance)
P41 (Input & high impedance)
P42 (Input & high impedance)
P43 (Input & high impedance)
Serial I/F
Master
Slave
P00–P03 P00–P03
SIN(I)
SOUT(O) SOUT(O)
SCLK(O) SCLK(I)
P13
SRDY(O)
P20–P23 P20–P23
P30–P33 P30–P33
A/D
converter
P00–P03
P20–P23
P30–P33
AD0(I)
AD1(I)
AD2(I)
AD3(I)
When these ports are used as I/O ports, the ports can be set to either input mode or output mode (in 1-bit
unit). Modes can be set by writing data to the I/O control registers.
Refer to Section 4.10, "Serial Interface", for control of the serial interface.
Refer to Section 4.11, "A/D Converter", for control of the A/D converter.
4.6.2 Mask option
In the S1C6P366, the output specification of all the I/O ports is fixed at "complementary output", and the
pull-up option for the P10–P13, P20–P23 and P30–P33 ports is fixed at "with pull-up resistor".