I/O Ports (P Ports); Configuration Of I/O Ports; Mask Option; I/O Control Registers And I/O Mode - Epson 0C88832 Technical Manual

Cmos 8-bit single chip microcomputer
Table of Contents

Advertisement

5 PERIPHERAL CIRCUITS AND THEIR OPERATION (I/O Ports)

5.6 I/O Ports (P ports)

5.6.1 Configuration of I/O ports

The E0C88832/88862 is equipped with 8 bits of I/O
ports (P10–P17).
Figure 5.6.1.1 shows the structure of an I/O port.
I/O control
register
Data
register
*1
Input
control
*2
*1: During output mode
*2: During input mode
Fig. 5.6.1.1 Structure of I/O port
I/O port can be set for input or output mode in one
bit unit. These settings are performed by writing
data to the I/O control registers.
I/O port terminals P10–P13 are shared with serial
interface input/output terminals. The function of
the terminals is switchable in software. With
respect to the serial interface, see "5.7 Serial Inter-
face".
The data registers and I/O control registers of the
I/O ports set as serial interface outputs are usable
as general purpose registers with read/write
capabilities which do not affect I/O activities of the
terminal.
The same as above, I/O control registers of the I/O
ports set as serial interface inputs are usable as
general purpose register.

5.6.2 Mask option

I/O port pull-up resistors
P10 ............
With resistor
P11 ............
With resistor
P12 ............
With resistor
P13 ............
With resistor
P14 ............
With resistor
P15 ............
With resistor
P16 ............
With resistor
P17 ............
With resistor
46
I/O ports P10–P17 are equipped with a pull-up
resistor which goes ON in the input mode. Whether
this resistor is used or not can be selected for each
port (one bit unit).
In cases where the 'With resistor' option is selected,
the pull-up resistor goes ON when the port is in
input mode.
When changing the port terminal from LOW level
V
to HIGH with the built-in pull-up resistor, a delay
DD
in the waveform rise time will occur depending on
the time constant of the pull-up resistor and the
load capacitance of the terminal. It is necessary to
Mask
set an appropriate wait time for introduction of an
option
I/O port. Make this wait time the amount of time
Pxx
or more calculated by the following expression.
Wait time = R
V
SS
For unused I/O ports, select the default setting of
"With resistor".

5.6.3 I/O control registers and I/O mode

I/O ports P10–P17 are set either to input or output
modes by writing data to the I/O control registers
IOC10–IOC17 which correspond to each bit.
To set an I/O port to input mode, write "0" to the I/O
control register.
An I/O port which is set to input mode will shift to a
high impedance state and functions as an input port.
Readout in input mode consists simply of a direct
readout of the input terminal state: the data being "1"
when the input terminal is at HIGH (V
"0" when it is at LOW (V
When the "With resistor" option is selected using
the mask option, the resistor is pulled up onto the
port terminal in input mode.
Even in input mode, data can be written to the data
registers without affecting the terminal state.
To set an I/O port to output mode, write "1" to the
I/O control register. An I/O port which is set to
Gate direct
output mode functions as an output port.
Gate direct
When port output data is "1", a HIGH (V
Gate direct
output and when it is "0", a LOW (V
Gate direct
output. Readout in output mode consists of the
Gate direct
contents of the data register.
Gate direct
At initial reset, I/O control registers are set to "0"
Gate direct
(I/O ports are set to input mode).
Gate direct
EPSON
x (C
+ load capacitance on the
IN
IN
board) x 1.6 [sec]
R
: Pull up resistance Max. value
IN
C
: Terminal capacitance Max. value
IN
) level.
SS
E0C88832/88862 TECHNICAL MANUAL
) level and
DD
) level is
DD
) level is
SS

Advertisement

Table of Contents
loading

This manual is also suitable for:

88862

Table of Contents