S1C60N13 TECHNICAL MANUAL
EPSON
29
CHAPTER 4: PERIPHERAL CIRCUITS AND OPERATION (I/O Ports)
4.6 I/O Ports (P00–P03, P10–P13)
4.6.1 Configuration of I/O ports
The S1C60N13 Series has eight bits (4 bits
× 2) of general-purpose I/O ports. Figure 4.6.1.1 shows the
configuration of the I/O ports.
The four bits of each of the I/O ports P00–P03 and P10–P13 can be set to either input mode or output
mode. Modes can be set by writing data to the I/O control register.
I/O control
register
Address
Data
bus
Address
P
VSS
Register
Input
control
Fig. 4.6.1.1 Configuration of I/O port
The P10–P12 I/O port terminals are shared with the serial interface input/output terminals and the serial
interface is enabled by mask option.
4.6.2 Mask option
(1) Output specification
The output specification during output mode (IOC = "1") of these I/O ports can be set with the mask
option for either complementary output or Pch open drain output. This setting can be performed for
each bit of each port.
However, when Pch open drain output has been selected, voltage in excess of the power voltage must
not be applied to the port.
(2) Serial interface
The serial interface can be enabled by mask option. When the serial interface is enabled, the P10, P11
and P12 terminals are used as the serial I/O port.
4.6.3 I/O control register and I/O mode
Input or output mode can be set for the four bits of I/O port P00–P03 and I/O port P10–P13 by writing
data into the corresponding I/O control register IOC0 and IOC1.
To set the input mode, "0" is written to the I/O control register. When an I/O port is set to input mode, it
becomes high impedance status and works as an input port.
However, the input line is pulled down when input data is read.
The output mode is set when "1" is written to the I/O control register. When an I/O port set to output
mode works as an output port, it outputs a high signal (VDD) when the port output data is "1", and a low
signal (VSS) when the port output data is "0".
At initial reset, the I/O control registers are set to "0", and the I/O port enters the input mode.
When the serial interface is used, the IOC1 register controls only the P13 port.