
I-40
EPSON
S1C62740 TECHNICAL HARDWARE
CHAPTER 4: PERIPHERAL CIRCUITS AND OPERATION (I/O Ports)
Input or output mode can be set for the four bits of I/O ports P00–
P03, P10–P13 and P20–P23 by writing data into the corresponding
I/O control register IOC0, IOC1 and IOC2.
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, when the pull up explained in the following section has
been set by software, 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.
At initial reset, the I/O control registers are set to "0", and the I/O
port enters the input mode.
When P20–P23 are used as the input/output ports of the serial
interface, the I/O control of the IOC2 register becomes invalid and
IOC2 can be used as a 1 bit general-purpose register.
I/O control registers
and input/output
mode
Pull up during input
mode
A pull up resistor that operates during the input mode is built into
the I/O ports of the S1C62740. Software can set the use or non-
use of this pull up. The pull up resistor becomes effective by
writing "1" into the pull up control registers PUP0, PUP1 and PUP2
that correspond to each 4 bits of P00–P03, P10–P13 and P20–P23,
and the input line is pulled up during the input mode. When "0"
has been written, no pull up is done.
At initial reset, the pull up control registers are set to "0".
Output specifications during the output mode (IOC = "1") can be
selected with the mask option.
Output specifications for the I/O ports (P00–P03, P10–P13, P20–
P23) enable selection of either complementary output or Nch open
drain output for each of the 12 bits.
However, even when Nch open drain output is selected, voltage
exceeding source voltage must not be applied to the output port.
Mask option