Mask Option; I/O Control Registers And Input/Output Mode; Pull-Up During Input Mode - Epson S1C63358 Technical Manual

Cmos 4-bit single chip microcomputer
Table of Contents

Advertisement

CHAPTER 4: PERIPHERAL CIRCUITS AND OPERATION (I/O Ports)

4.7.2 Mask option

In the I/O ports P10–P13, P20–P23, P30–P33 and P40–P43, the output specification during output mode
can be selected from either complementary output or N-channel open drain output by mask option. They
are selected in 1-bit units or 4-bit units depending on the terminal group. Note that the P00–P03 can be
only used as complementary output.
Ports to be selected in 1-bit units: P20, P21, P22, P23, P30, P31, P32, P33, P40, P41, P42, P43
Ports to be selected in 4-bit units: P10–P13
The mask option also permits selection of whether the pull-up resistor is used or not during input mode.
They are selected in 1-bit units or 4-bit units depending on the terminal group.
Ports to be selected in 1-bit units: P20, P21, P22, P23, P30, P31, P32, P33, P40, P41, P42, P43
Ports to be selected in 4-bit units: P10–P13
When N-channel open drain output is selected, do not apply a voltage exceeding the power supply
voltage to the port.
When "without pull-up" during the input mode is selected, take care that the floating status does not
occur.
This option is effective even when I/O ports are used for input/output of the serial interface or input of
the A/D converter.

4.7.3 I/O control registers and input/output mode

Input or output mode can be set for the I/O ports by writing data into the corresponding I/O control
registers IOCxx.
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 explained in the following section has been set by software, the input line is
pulled up only during this input mode.
To set the output mode, write "1" is to the I/O control register. When an I/O port is set to output mode , it
works as an output port, it outputs a high level (V
) when the port output data is "1", and a low level
DD
(V
) when the port output data is "0".
SS
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 ports enter the input mode.
The I/O control registers of the ports that are set as input/output for the serial interface and A/D
converter can be used as general purpose registers that do not affect the I/O control. (See Table 4.7.1.1.)

4.7.4 Pull-up during input mode

A pull-up resistor that operates during the input mode is built into each I/O port of the S1C63358. Mask
option can set the use or non-use of this pull-up. The pull-up resistor becomes effective by writing "1" to
the pull-up control register PULxx that corresponds to each port, 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 "1".
The pull-up control registers of the ports in which "without pull-up" have been selected can be used as
general purpose registers. Even when "with pull-up" has been selected, the pull-up control registers of
the ports, that are set as input/output for the serial interface, can be used as general purpose registers
that do not affect the pull-up control. (See Table 4.7.1.1.)
The pull-up control registers of the port, that are set as input for the serial interface, function the same as
the I/O port.
EPSON
S1C63358 TECHNICAL MANUAL
49

Advertisement

Table of Contents
loading

Table of Contents