M30622ECTFP MITSUBISHI [Mitsubishi Electric Semiconductor], M30622ECTFP Datasheet - Page 161

no-image

M30622ECTFP

Manufacturer Part Number
M30622ECTFP
Description
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Manufacturer
MITSUBISHI [Mitsubishi Electric Semiconductor]
Datasheet
Programmable I/O Port
Programmable I/O Ports
M30622(100-pin package) has 87 programmable I/O ports: P0 to P10 (excluding P8
package) has 70 (P1, P4
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. P8
Figures 1.23.1 to 1.23.3 show the programmable I/O ports. Figure 1.23.4 shows the I/O pins.
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), they function as outputs regardless of the contents of the direction registers. When pins are to be
used as the outputs for the D-A converter, do not set the direction registers to output mode. See the
descriptions of the respective functions for how to set up the built-in peripheral devices.
(1) Direction registers
(2) Port registers
(3) Pull-up control registers
(4) Port control register
Figure 1.23.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.
Note: There is no direction register bit for P8
Figure 1.23.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 port registers corresponds one for one to each I/O pin.
Figure 1.23.7 shows the pull-up control registers.
The pull-up control register can be set to apply a pull-up resistance to each block of 4 ports. When ports
are set to have a pull-up resistance, the pull-up resistance is connected only when the direction register is
set for input.
However, in memory expansion mode and microprocessor mode, P0 to P5 operate as the bus and the
pull-up control register setting is invalid.
Figure 1.23.8 shows the port control register.
The bit 0 of port control resister is used to read port P1 as follows:
This register is valid in the following:
0 : When port P1 is input port, port input level is read.
1 : The contents of port P1 register is read always.
• External bus width is 8 bits in microprocessor mode or memory expansion mode.
• Port P1 can be used as a port in multiplexed bus for the entire space.
Tentative Specifications REV.A
S
When port P1 is output port , the contents of port P1 register is read.
pecifications in this manual are tentative and subject to change.
4
to P4
7
, P7
5
2
to P7
is an input-only port and has no built-in pull-up resistance.
5
, P9
5
.
1
are not connected to external pin).
161
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Mitsubishi microcomputers
M16C / 62T Group
5
). M30623(80-pin

Related parts for M30622ECTFP