Input/Output Pins; Programmable Ports - Renesas 7200 Series User Manual

Mitsubishi 8-bit single-chip microcomputer
Table of Contents

Advertisement

FUNCTIONAL DESCRIPTION

2.4 Input/Output pins

2.4 Input/Output pins
The M37221M6-XXXSP/FP has 33 programable ports (I/O ports, input ports, output ports). The double-
function ports function as ports and as pins for internal peripheral devices.
M37220M3-XXXSP/FP
Refer to "CHAPTER 4. M37220M3-XXXSP/FP."
Double-function ports .................... <I/O ports>
I/O port-only ports ......................... <I/O ports>
And also, the M37221M6-XXXSP/FP has 9 pins with only the dedicated function.
Dediated pins .................................

2.4.1 Programmable ports

(1) Port P0
Port P0 is an 8-bit input/output port. This is an N-channel open drain output. Port P0 is assigned to
memory at address 00C0
Port P0 has the direction register (at address 00C1
each bit whether the port is used for input or output. The pins of which the direction register is
programmed to "0" are set for input; when programmed to "1", the pins are set for output.
When pins are programmed as output pins, the output data are written into the port latch and then
output. When reading data from the output pins, the output pin level is not read but the port latch
data is read. This allows a previously-output value to be read correctly even if the output LOW
voltage has risen, for example, because a light emitting diode was directly driven.
The input pins float, so the values of the pins can be read. When writing data into the input pin, it
is written only into the port latch, while the pin remains floating.
Ports P0
–P0
0
5
as external interrupt pin INT2 and analog input pin A-D4. The P0
interrupt input pin INT1. When external interrupts INT1 and INT2 are enabled, an interrupt is processed
according to transition in the level on these pins.
Ports P0
and P0
6
set these pins for input by the port P0 direction register.
2-20
P0
–P0
0
<Input ports>
P3
, P3
3
<Output ports>
P5
–P5
2
P2
–P2
5
V
, V
CC
SS
on zero page.
16
are also used as PWM output pins PWM0–PWM5 respectively. Port P0
have the schmit characteristics when they are used as INT input pins. In this case,
7
7220 Group User's Manual
, P1
–P1
, P2
–P2
, P3
7
0
7
0
4
4
5
, P3
7
2
_ _ _ _ _ _ _ _
, RESET, X
, CNV
, X
IN
SS
on zero page), so that it is possible to program
16
, P3
0
1
, D-A, H
, V
OUT
SYNC
SYNC
pin is also used as external
7
is also used
6

Advertisement

Table of Contents
loading

This manual is also suitable for:

7220

Table of Contents