![](http://datasheet.mmic.net.cn/330000/MB90F562_datasheet_16437954/MB90F562_198.png)
174
CHAPTER 8 I/O PORTS
MB90560 series
8.1
Overview of I/O Ports
An I/O port can be used as a general-purpose I/O port (parallel I/O port). The MB90560
series has six ports (50 pins). The ports are also used for peripheral function I/O pins
(peripheral function I/O pins).
I
I/O Port Functions
Each I/O port outputs data from the CPU to the I/O pins or inputs signals from the I/O pins to the
CPU as directed by the port data register (PDR). Each I/O port can also be set the direction of a
data flow (input or output) at the I/O pins for each bit using the port data direction register (DDR).
The function of each port and the peripheral functions using it are described below:
Port 0
: General-purpose I/O port
Port 1
: General-purpose I/O port/peripheral function (external interrupt input pins)
Port 2
: General-purpose I/O port/peripheral function (16-bit reload timer/ICU)
Port 3
: General-purpose I/O port/peripheral function (OCU/UART0)
Port 4
: General-purpose I/O port/peripheral function (UART0, 8-bit/16-bit PPG timer)
Port 5
: General-purpose I/O port/peripheral function (analog input pins)
Port 6
: General-purpose I/O port/peripheral function (UART1)
Table 8.1-1 summarizes the functions of individual ports.
Table 8.1-1 Functions of individual ports
<Check>
Port 5 is also used as analog input pins. To use the port as a general-purpose port, be sure
to reset the corresponding bit of the analog data input enable register (ADER) to “0”.
Resetting the CPU sets the ADER register bits to “1”.
Port
Pin
Input form
Output form
Function
bit
15
bit
14
bit
13
bit
12
bit
11
bit
10
bit9 bit8 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
Port 0
P00~P07
CMOS
(hysteresis)
CMOS pull-
up resistor
selectable
General I/O port
–
–
–
–
–
–
–
–
P07
P06
P05
P04 P03
P02
P01
P00
Peripheral function
–
–
–
–
–
–
–
–
–
–
–
–
–
–
–
–
Port 1
P10/INT0
~P17/FRCK
General I/O port
P17 P16 P15 P14 P13
P12
P11
P10
–
–
–
–
–
–
–
–
Peripheral function
FRCK INT6 INT5 INT4 INT3
INT2
INT1
INT0
–
–
–
–
–
–
–
–
Port 2
P20/TIN0
~P27/IN3
CMOS
General I/O port
–
–
–
–
–
–
–
–
P27
P26
P25
P24
P23
P22
P21
P20
Peripheral function
–
–
–
–
–
–
–
–
IN3
IN2
IN1
IN0
TO1
TIN1
TO0
TIN0
Port 3
P30/RTO0
~P37/SOT0
General I/O port
P37
P36
P35
P34
P33
P32
P31
P30
–
–
–
–
–
–
–
–
Peripheral function
SOT0 SIN0 RTO5 RTO4 RTO3 RTO2 RTO1 RTO0
–
–
–
–
–
–
–
–
Port 4
P40/SCK0
~P46/PPG5
General I/O port
–
–
–
–
–
–
–
–
–
P46
P45
P44
P43
P42
P41
P40
Peripheral function
–
–
–
–
–
–
–
–
–
PPG5 PPG4 PPG3 PPG2 PPG1 PPG0 SCK0
Port 5
P50/AN0
~P57/AN7
Analog/CMOS
(hysteresis)
CMOS
General I/O port
P57
P56
P55
P54
P53
P52
P51
P50
–
–
–
–
–
–
–
–
Analog input
AN7
AN6
AN5
AN4
AN3
AN2
AN1
AN0
–
–
–
–
–
–
–
–
Port 6
P60/SIN1
~P63/INT7/
DTTI
Analog input
CMOS
General I/O port
–
–
–
–
–
–
–
–
–
–
–
–
P63
P62
P61
P60
Peripheral function
–
–
–
–
–
–
–
–
–
–
–
–
INT7/
DTTI
SCK1 SOT1 SIN1