
24
EPSON
S1C62920 TECHNICAL MANUAL
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 S1C62920 has 8 bits general-purpose I/O ports. Figure 4.6.1.1 shows the configuration of the I/O port.
The 8 bits of the I/O ports P00–P03 and P10–P13 can be set to either input mode or output mode (1 bit
unit). Modes can be set by writing data to the I/O control register.
Moreover, pull up resistor which is turned ON during input mode can be controlled by the software.
The I/O ports P10–P13 are common used with the input/output ports of the serial interface, and function
of these ports can be selected by the software.
See Section 4.9, "Serial Interface", for details of the serial interface.
Fig. 4.6.1.1 Configuration of I/O port
4.6.2 Mask option
A pull up resistor that operates during the input mode is built into the I/O ports of the S1C62920. Mask
option can set the use or non-use of this pull up. The pull up resistor corresponding to each of P00–P03 and
P10–P13 becomes effective by selecting with the mask option.
Even when the serial interface function is selected, mask option (pull up function) of ports that function as
input ports (SIN and SCLK in the slave mode) is effective.
4.6.3 I/O control registers and input/output mode
Input or output mode can be set for the 8 bits of I/O ports P00–P03 and P10–P13 by writing data into the
corresponding I/O control registers IOC00–IOC03 and IOC10–IOC13.
To set the input mode, write "0" 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, when the pull up has been set by the mask option, the input line is pulled up only during this
input mode.
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 level (VDD) when the port output data is "1", and a low
level (VSS) when the port output data is "0".
If perform the read out in each mode; when output mode, the register value is read out, and when input
mode, the port value is read out.
When the serial interface function is selected, the registers IOC10–IOC12 in the master mode and the
registers IOC10–IOC13 in the slave mode can be used as a general register.
At initial reset, the I/O control registers are set to "0", and the I/O port enters the input mode.
Data
bus
Pxx
VDD
Address
I/O control
register
Address
Data register
Input selector
Address
*1
*2
*1: During output mode
*2: During input mode
Mask option
VDD
VSS