![](http://datasheet.mmic.net.cn/30000/M37531E4V-XXXGP_datasheet_2359826/M37531E4V-XXXGP_183.png)
8
8-2
INPUT/OUTPUT PORTS AND PIN FUNCTIONS
32182 Group User’s Manual (Rev.1.0)
8.1 Outline of Input/Output Ports
The 32182 has a total of 97 input/output ports from P0-P13, P15, P17 and P22 (except P5, which is reserved for
future use). These input/output ports can be used as input or output ports by setting the respective direction
registers.
Each input/output port is a dual-function or triple-function pin, sharing the pin with other internal peripheral I/O or
extended external bus signal line. Pin functions are selected depending on the current operation mode or by
setting the input/output port operation mode registers. (If any internal peripheral I/O has still another function, it is
also necessary to set the register provided for that peripheral I/O.)
The microcomputer also has a port input function enable bit that can be used to prevent current from flowing into
the input ports. This helps to simplify the software and hardware processing to be performed immediately after
reset or during flash programming. Note that before any ports can be used in input mode, this port input function
enable bit must be set accordingly.
The input/output ports are outlined below.
Table 8.1.1 Outline of Input/Output Ports
Item
Specification
Number of ports
Total 97 ports
P0
:
P00–P07
(8 ports)
P1
:
P10–P17
(8 ports)
P2
:
P20–P27
(8 ports)
P3
:
P30–P37
(8 ports)
P4
:
P41–P47
(7 ports)
P6
:
P61–P63
(3 ports)
P7
:
P70–P77
(8 ports)
P8
:
P82–P87
(6 ports)
P9
:
P93–P97
(5 ports)
P10
:
P100–P107
(8 ports)
P11
:
P110–P117
(8 ports)
P12
:
P124–P127
(4 ports)
P13
:
P130–P137
(8 ports)
P15
:
P150, P153
(2 ports)
P17
:
P174, P175
(2 ports)
P22
:
P220, P221, P224, P225
(4 ports)
Port function
The input/output ports can individually be set for input or output mode using the direction control register
provided for each input/output port. (However, P221 is input-only port.)
Pin function
Shared with peripheral I/O or extended external signals to serve dual-functions (or shared with two or
more peripheral I/O functions to serve triple-functions)
Pin function
P0–P4, P224, P225: Depends on the CPU operation mode (that is set by MOD0 and MOD1 pins). (Note 1)
selection
P6–P22: As set by each input/output port’s operation mode register.
(However, peripheral I/O pin functions are selected by peripheral I/O registers.)
Note 1: If the CPU operation mode is external extension mode, P0–P3, P44–P47, P224 and P225 initially are input/output
port pins, and are switched to extended external signal pin functions by setting the respective port operation mode
registers. P41–P43, when in external extension mode, serve as dedicated external bus interface signal pins.
Note: P14, P16, P18-P21 are nonexist.
8.1 Outline of Input/Output Ports