S1C62740 TECHNICAL SOFTWARE
EPSON
II-27
CHAPTER 6: PERIPHERAL CIRCUITS (I/O Ports)
I/O Ports (P00–P03, P10–P13 and P20–P23)
6.5
I/O data memory of
the I/O ports
The control registers of the I/O ports are shown in Table 6.5.1.
Table 6.5.1 Control registers of I/O ports
*1 Initial value at the time of initial reset
*5 Constantly "0" when being read
*2 Not set in the circuit
*6 Refer to main manual
*3 Undefined
*7 Page switching in I/O memory is not necessary
*4 Reset (0) immediately after being read
Control of the I/O
ports
The S1C62740 contains 3 sets of general I/O port (4 bits
× 3).
These ports can be use as input port or output port, according to
I/O port control register IOC (D6H). When IOC is "0", the port is set
for input, when it is "1", the port is set for output.
How to set as input
Set "0" in the I/O port control register D6H, D0 (D1 for P1, D2 for
P2) and the I/O port (P00–P03) is set as an input port. The state of
the I/O port (P00–P03) is decided by the address D8H (D9H for P1,
DAH for P2). (In the input mode, the port level is read directly.)
The P0, P1 and P2 I/O ports can be pull up by software. Set "1" in
the I/O pull up control register D7H, D0 (D1 for P1, D2 for P2) and
the pull up register will directly connect to P00–P03 internally.
Address
Comment
Register
D3
D2
D1
D0
Name
Init
1
0
*1
D6H
IOC0
R
0
IOC2
IOC1
IOC0
–
0
Output
Input
IOC1
IOC2
0
*2
*6
D7H
PUP0
R/W
0
PUP2
PUP1
PUP0
–
0
Unused
Pull up control register 2 (P20–P23)
Pull up control register 1 (P10–P13)
Pull up control register 0 (P00–P03)
On
Off
PUP1
PUP2
0
*2
*6
D8H
P00
P03
P02
P01
P00
–
High
Low
P01
P02
P03
*2
D9H
P10
P13
P12
P11
P10
–
High
Low
P11
P12
P13
*2
DAH
P20
P23
P22
P21
P20
–
High
Low
P21
P22
P23
*2
R/W
*7
R/W
Unused
I/O control register 2 (P20–P23)
I/O control register 1 (P10–P13)
I/O control register 0 (P00–P03)
R/W
R
I/O port (P00–P03)
I/O port (P10–P13)
I/O port (P20–P23)
When P20–P23 is selected as SIO port, P20–
P23 registers will function as register only
*5