![](http://datasheet.mmic.net.cn/330000/MB90M407APF_datasheet_16438116/MB90M407APF_22.png)
MB90M405 Series
22
■
PERIPHERAL FUNCTIONS
1.
I/O Ports
There are a maximum of 26 I/O ports (parallel I/O ports) , which are also used as resource I/O pins (peripheral
function I/O pins) .
I/O Port Functions
There are two kinds of I/O port : port direction registers (DDRs) and port data registers (PDRs) . The port direction
register (DDR) can set port pin I/O at the bit level. The port data register (PDR) sets output data to the port pins.
If the port direction register (DDR) sets the I/O port pin to input, the port pin level value can be read by reading
the port data register (PDR) . If the port direction register (DDR) sets the I/O port pin to output, the port data
register (PDR) value is output to the port pin. Below is a list of the functions of each I/O port, and dual use
resources.
Port 8 : I/O port/resource use (external interrupt input pin, ICU, UART)
Port 9 : I/O port/resource use (I
2
C, serial I/O ch3)
Port A : I/O port/resource use (A/D converter, time clock output)
Port B : I/O port/resource use (A/D converter, serial I/O ch2, external interrupt input pin, reload timer ch0)
Note: If port A and port B are also used as analog input pins, and are being used as I/O ports, then in addition to
the ports A and B direction registers (DDR A/B) and ports A and B data registers (PDR A/B) , set both analog
input enable register 0 and 1 (ADER 0/1) to “00
H
”. Upon reset, analog input enable registers 0 and 1 are set
to “FF
H
” by default.
I/O Port
Name
Pin Name
Input
Format
Output
Format
Function
Port 8
P80 to P87
CMOS
(hystere-
sis)
CMOS
I/O Port
P87
P86
P85
P84
P83
P82
P81
P80
Resource
SO1
SC1
SI1
SO0
SC0
SI0
IC1
IC0
INT1
INT0
Port 9
P90/SDA/
SO3, P91/
SCL/SC3
N-ch
open
drain
I/O Port
P91
P90
Resource
SCL
SDA
SC3
SO3
Port A
PA0/AN0/
TMCK to
PA7/AN7
CMOS
I/O Port
PA7
PA6
PA5
PA4
PA3
PA2
PA1
PA0
Resource
AN7
AN6
AN5
AN4
AN3
AN2
AN1
AN0
TMCK
Port B
PB0/AN8 to
PB7/AN15/
INT3
I/O Port
PB7
PB6
PB5
PB4
PB3
PB2
PB1
PB0
Resource
AN15 AN14 AN13 AN12 AN11 AN10 AN9
AN8
INT3
INT2
SO2
SC2
SI2
TO0
TIN0