![](http://datasheet.mmic.net.cn/330000/MB90F562_datasheet_16437954/MB90F562_212.png)
188
CHAPTER 8 I/O PORTS
MB90560 series
8.5
Port 2
Port 2 is a general-purpose I/O port. It can also be used for peripheral function input
and output. The port pins can be switched in units of bits between the I/O port and the
peripheral function. This section focuses on the general I/O port function. This section
also provides the configuration of port 2, lists its pins, shows a block diagram of the
pins, and describes the corresponding registers.
I
Port 2 Configuration
Port 2 consists of the following:
General-purpose I/O pins/peripheral function I/O pins (P20/TIN0 to P27/IN3)
Port 2 data register (PDR2)
Port 2 data direction register (DDR2)
I
Port 2 Pins
The port 2 I/O pins are also used as peripheral function I/O pins. The pins cannot be used as
general-purpose I/O port pins when they are used as peripheral function I/O pins. Table 8.5-1
lists the port 2 pins.
Table 8.5-1 Port 2 pins
See Section 1.7, "I/O Circuit Types," for information on the circuit types.
Port
Pin
Port function
Peripheral function
I/O form
Circuit
type
Input
Output
Port 2
P20/TIN0
P20
General-
purpose I/O
TIN0
16-bit reload timer 0
event input
CMOS
(hysteresis)
CMOS
D
P21/TO0
P21
TO0
16-bit reload timer 0 timer
output
P22/TIN1
P22
TIN1
16-bit reload timer 1
event input
P23/TO1
P23
TO1
16-bit reload timer 1 timer
output
P24/IN0
P24
IN0
Input capture channel 0
input
P25/IN1
P25
IN1
Input capture channel 1
input
P26/IN2
P26
IN2
Input capture channel 2
input
P27/IN3
P27
IN3
Input capture channel 3
input