
I-72
EPSON
S1C88348/317/316/308 TECHNICAL HARDWARE
5 PERIPHERAL CIRCUITS AND THEIR OPERATION (I/O Ports)
5.7.3 I/O control registers and I/O mode
I/O ports P00–P07 and P10–P17 are set either to
input or output modes by writing data to the I/O
control registers IOC00–IOC07 and 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 (VDD) level and
"0" when it is at LOW (VSS) level.
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
output mode functions as an output port.
When port output data is "1", a HIGH (VDD) level is
output and when it is "0", a LOW (VSS) level is
output. Readout in output mode consists of the
contents of the data register.
At initial reset, I/O control registers are set to "0"
(I/O ports are set to input mode).
5.7.4 Control of I/O ports
Table 5.7.4.1 shows the I/O port control bits.
Table 5.7.4.1 I/O port control bits
Address Bit
Name
00FF61 D7
D6
D5
D4
D3
D2
D1
D0
IOC17
IOC16
IOC15
IOC14
IOC13
IOC12
IOC11
IOC10
SR R/W
Function
Comment
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
10
0
R/W
Output
Input
00FF62 D7
D6
D5
D4
D3
D2
D1
D0
P07D
P06D
P05D
P04D
P03D
P02D
P01D
P00D
P07 I/O port data
P06 I/O port data
P05 I/O port data
P04 I/O port data
P03 I/O port data
P02 I/O port data
P01 I/O port data
P00 I/O port data
1
R/W
High
Low
00FF63 D7
D6
D5
D4
D3
D2
D1
D0
P17D
P16D
P15D
P14D
P13D
P12D
P11D
P10D
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
1
R/W
High
Low
00FF60 D7
D6
D5
D4
D3
D2
D1
D0
IOC07
IOC06
IOC05
IOC04
IOC03
IOC02
IOC01
IOC00
P07 I/O control register
P06 I/O control register
P05 I/O control register
P04 I/O control register
P03 I/O control register
P02 I/O control register
P01 I/O control register
P00 I/O control register
0
R/W
Output
Input