2
4.
Ports 0 and 1
Ports 0 and 1 are general-purpose I/O ports that also serve as the external bus pins.
In single-chip mode only, the ports function as general-purpose I/O ports. In external
bus mode, the port pins become external bus pins. This section principally describes
the port functions when operating as general-purpose I/O ports.
The section describes the port structure and pins, the pin block diagram, and the port
registers for ports 0 and 1.
n Structure of Ports 0 and 1
Ports 0 and 1 consist of three components respectively.
l
Port 0
•
General-purpose I/O pins/external bus pins (P00/AD0 to P07/AD7)
•
Port 0 data register (PDR0)
•
Port 0 data direction register (DDR0)
Port 1
l
•
General-purpose I/O pins/external bus pins (P10/A08 to P17/A15)
•
Port 1 data register (PDR1)
•
Port 1 data direction register (DDR1)
n Port 0 and 1 Pins
Ports 0 and 1 both consist of eight I/O pins of a CMOS input and CMOS output type
respectively. As the I/O pins function as external bus pins in external bus mode, the pins cannot
be used as general-purpose I/O ports in this mode.
Table 4.2a lists the port 0 and 1 pins.
Table 4.2a Port 0 and 1 Pins
Port
Port 0
Port 1
Reference: See Section 1.7, "I/O Pins and Pin Functions" for a description of the circuit type.
90
CHAPTER 4 I/O PORTS
Pin name
(Single-chip mode)
P00/AD0 to P07/AD7
General-purpose
I/O
P10/A08 to P17/A15
Function
Shared peripheral
(External bus mode)
Lower address output/
data bus I/O
Upper address output
I/O type
Circuit
type
Input
Output
CMOS
CMOS
D
MB89620 series