I/O Ports (P00-P03); Configuration Of I/O Port; I/O Control Register And I/O Mode; I/O Memory Of I/O Port - Epson E0C6006 Technical Manual

Cmos 4-bit single chip microcomputer
Table of Contents

Advertisement

CHAPTER 4: PERIPHERAL CIRCUITS AND OPERATION (I/O Ports)
4.6 I/O Ports (P00–P03)

4.6.1 Configuration of I/O port

The E0C6006 has 4 bits of general-purpose I/O ports. Figure 4.6.1.1 shows the configuration of the I/O
ports. The I/O ports P00–P03 can be set to either input mode or output mode by writing data to the I/O
control register (IOC).

4.6.2 I/O control register and I/O mode

Input or output mode can be set for the I/O ports P00–P03 by writing data to the I/O control register
IOC.
To set the input mode, write "0" to the I/O control register (IOC). When the I/O ports are set to the input
mode, the terminals become high impedance and they work as input ports. The input line is pulled up
during read operation.
The output mode is set when "1" is written to the I/O control register (IOC). When the I/O ports are set
to the output mode, they work as output ports and output a high signal (V
is "1", and a low signal (V
output mode, the register value is read out, and when input mode, the port value is read out.
At initial reset, the I/O control register is set to "0", and the I/O ports enter the input mode.

4.6.3 I/O memory of I/O port

Table 4.6.3.1 shows the I/O addresses and the control bits for the I/O port.
Register
Address
D3
D2
P03
P02
0FEH
R/W
0
0
0FFH
R
∗1
Initial value at initial reset
∗2
Not set in the circuit
22
Input control
Data register
Address
I/O control
register
Address
Fig. 4.6.1.1 Configuration of I/O port
) when the port output data is "0". If perform the read out in each mode; when
SS
Table 4.6.3.1 Control bits of I/O port
∗1
D1
D0
Name Init
∗2
P03
P01
P00
∗2
P02
∗2
P01
∗2
P00
∗3
∗2
0
IOC
0
∗3
∗2
0
IOC
0
R/W
R
∗3
∗2
0
∗3
Always "0" being read
∗4
Reset (0) immediately after being read
1
0
High
Low
High
Low
P0 I/O port data
High
Low
High
Low
Unused
Unused
Output
Input
I/O port I/O control
Unused
EPSON
V
DD
P0x
) when the port output data
DD
Comment
∗5 Undefined
E0C6006 TECHNICAL MANUAL

Advertisement

Table of Contents
loading

Table of Contents