![](http://datasheet.mmic.net.cn/120000/M30833MJFP_datasheet_3558608/M30833MJFP_311.png)
Under
development
Preliminary Specifications REV.B3
Specifications in this manual are tentative and subject to change.
Mitsubishi Microcomputers
M32C/83 group
SINGLE-CHIP 16/32-BIT CMOS MICROCOMPUTER
Programmable I/O Port
310
Programmable I/O Ports
There are 123 programmable I/O ports in 144-pin version: P0 to P15 (excluding P85). There are 87 pro-
grammable I/O ports in 100-pin version: P0 to P10 (excluding P85). Each port can be set independently for
input or output using the direction register. A pull-up resistance for each block of 4 ports can be set. P85 is
an input-only port and has no built-in pull-up resistance.
Figures 1.29.1 to 1.29.4 show the programmable I/O ports.
Each pin functions as a programmable I/O port and as the I/O for the built-in peripheral devices.
To use the pins as the inputs for the built-in peripheral devices, set the direction register of each pin to input
mode. When the pins are used as the outputs for the built-in peripheral devices (other than the D-A con-
verter), set the corresponding function select registers A, B and C. When pins are to be used as the outputs
for the D-A converter, set the function select register A3 of each pin to I/O port, and set the direction
registers to input mode.
See the descriptions of the respective functions for how to set up the built-in peripheral devices.
(1) Direction registers
Figurs 1.29.5 shows the direction registers.
These registers are used to choose the direction of the programmable I/O ports. Each bit in these regis-
ters corresponds one for one to each I/O pin.
In memory expansion and microprocessor mode, the contents of corresponding direction register of pins
_____
_______
_____ _________
_______
_____ _____
A0 to A22, A23, D0 to D15, MA0 to MA12, CS0 to CS3, WRL/WR/CASL, WRH/BHE/CASH, RD/DW, BCLK/
_________
_______
ALE/CLKOUT, HLDA/ALE, HOLD, ALE/RAS, and RDY are not changed.
Note: There is no direction register bit for P85.
(2) Port registers
Figure 1.29.6 shows the port registers.
These registers are used to write and read data for input and output to and from an external device. A
port register consists of a port latch to hold output data and a circuit to read the status of a pin. Each bit
in a port register corresponds one for one to each I/O pin.
In memory expansion and microprocessor mode, the contents of corresponding port register of pins A0 to
_____
_______
_____
_________
_______
_____ _____
A22, A23, D0 to D15, MA0 to MA12, CS0 to CS3, WRL/WR/CASL, WRH/BHE/CASH, RD/DW, BCLK/ALE/
_________
_______
CLKOUT, HLDA/ALE, HOLD, ALE/RAS, and RDY are not changed.
(3) Function select register A
Figures 1.29.7 to 1.29.11 show the function select registers A.
The register is used to select port output and peripheral function output when the port functions for both
port output and peripheral function output.
Each bit of this register corresponds to each pin that functions for both port output and peripheral function
output.