Epson E0C6001 Technical Manual page 41

Cmos 4-bit single chip microcomputer
Table of Contents

Advertisement

E0C6001 TECHNICAL HARDWARE
I-34
The pin voltage level of the I/O port is read. When the I/
O port is in the input mode the voltage level being input
to the port pin can be read; in the output mode the
output voltage level can be read. When the pin voltage is
high (V
) the port data read is 1, and when the pin
DD
voltage is low (V
down resistance functions during reading, so the I/O port
pin is pulled down.
Note
-
When the I/O port is set to the output mode and a low-imped-
ance load is connected to the port pin, the data written to the
register may differ from the data read.
-
When the I/O port is set to the input mode and a low-level
voltage (Vss) is input by the built-in pull-down resistance, an
erroneous input results if the time constant of the capacitive
load of the input line and the built- in pull-down resistance load
is greater than the read-out time. When the input data is being
read, the time that the input line is pulled down is equivalent to
0.5 cycles of the CPU system clock. Hence, the electric poten-
tial of the pins must settle within 0.5 cycles. If this condition
cannot be met, some measure must be devised, such as
arranging a pull-down resistance externally, or performing
multiple read-outs.
IOC
I/O control register (0FCH D0)
The input or output I/O port mode can be set with this
register.
When 1 is written: Output mode
When 0 is written: Input mode
Reading:
The input or output mode of the I/O port is set in units of
four bits. For instance, IOC sets the mode for P00–P03.
Writing 1 to the I/O control register makes the I/O port
enter the output mode, and writing 0, the input mode.
After an initial reset, the IOC register is set to 0, so the I/O
port is in the input mode.
) the data is 0. Also, the built-in pull-
SS
Valid

Advertisement

Table of Contents
loading

Table of Contents