Control Of I/O Ports; Programming Note - Epson 0C88832 Technical Manual

Cmos 8-bit single chip microcomputer
Table of Contents

Advertisement

5.6.4 Control of I/O ports

Table 5.6.4.1 shows the I/O port control bits.
Address Bit
Name
00FF61 D7
IOC17
D6
IOC16
D5
IOC15
D4
IOC14
D3
IOC13
D2
IOC12
D1
IOC11
D0
IOC10
00FF63 D7
P17D
D6
P16D
D5
P15D
D4
P14D
D3
P13D
D2
P12D
D1
P11D
D0
P10D
P10D–P17D: 00FF63H
How I/O port terminal P1x data readout and
output data settings are performed.
When writing data:
When "1" is written: HIGH level
When "0" is written: LOW level
When the I/O port is set to output mode, the data
written is output as is to the I/O port terminal. In
terms of port data, when "1" is written, the port
terminal goes to HIGH (V
written to a LOW (V
) level.
SS
Even when the port is in input mode, data can still
be written in.
When reading out data:
When "1" is read:
When "0" is read:
When an I/O port is in input mode, the voltage
level being input to the port terminal is read out.
When terminal voltage is HIGH (V
a "1", and when it is LOW (V
Furthermore, in output mode, the contents of the
data register are read out.
At initial reset, this register is set to "1" (HIGH
level).
The data registers of I/O ports set for the output
terminal of serial interface can be used as general
purpose registers with read/write capabilities
which do not affect I/O activities of the terminals.
E0C88832/88862 TECHNICAL MANUAL
Table 5.6.4.1 I/O port control bits
Function
P17 I/O control register
P16 I/O control register
P15 I/O control register
P14 I/O control register
P13 I/O control register
P12 I/O control register
P11 I/O control register
P10 I/O control register
P17 I/O port data
P16 I/O port data
P15 I/O port data
P14 I/O port data
P13 I/O port data
P12 I/O port data
P11 I/O port data
P10 I/O port data
) level and when "0" is
DD
HIGH level ("1")
LOW level ("0")
), it is read as
DD
), it is read as a "0".
SS
5 PERIPHERAL CIRCUITS AND THEIR OPERATIO (I/O Ports)
1
Output
High
IOC10–IOC17: 00FF61H
Sets the I/O ports to input or output mode.
When "1" is written: Output mode
When "0" is written: Input mode
Reading:
IOC1x is the I/O control register which correspond
to each I/O port in a bit unit.
Writing "1" to the IOC1x register will switch the
corresponding I/O port P1x to output mode, and
writing "0" will switch it to input mode.
At initial reset, this register is set to "0" (input
mode).
The data registers of I/O ports set for the input
terminal of serial interface can be used as general
purpose registers with read/write capabilities
which do not affect I/O activities of the terminals.

5.6.5 Programming note

When changing the port terminal from LOW level
to HIGH with the built-in pull-up resistor, a delay
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
set an appropriate wait time for introduction of an
I/O port. Make this wait time the amount of time
or more calculated by the following expression.
Wait time = R
x (C
IN
R
IN
C
IN
EPSON
0
SR R/W
Comment
0
R/W
0
R/W
0
R/W
0
R/W
Input
0
R/W
0
R/W
0
R/W
0
R/W
1
R/W
1
R/W
1
R/W
1
R/W
Low
1
R/W
1
R/W
1
R/W
1
R/W
Valid
+ load capacitance on the
IN
board) x 1.6 [sec]
: Pull up resistance Max. value
: Terminal capacitance Max. value
47

Advertisement

Table of Contents
loading

This manual is also suitable for:

88862

Table of Contents