English
Language : 

7220 Datasheet, PDF (47/303 Pages) Renesas Technology Corp – 8-BIT SINGLE-CHIP MICROCOMPUTER
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.”
qDouble-function ports .................... <I/O ports>
P00–P07, P10–P17, P20–P24, P30, P31
<Input ports>
P33, P34
<Output ports>
P52–P55
qI/O port-only ports ......................... <I/O ports>
P25–P27, P32
And also, the M37221M6-XXXSP/FP has 9 pins with only the dedicated function.
________
qDediated pins ................................. VCC, VSS, RESET, XIN, CNVSS, XOUT, D-A, HSYNC, VSYNC
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 00C016 on zero page.
Port P0 has the direction register (at address 00C116 on zero page), so that it is possible to program
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 P00–P05 are also used as PWM output pins PWM0–PWM5 respectively. Port P06 is also used
as external interrupt pin INT2 and analog input pin A-D4. The P07 pin is also used as external
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 P06 and P07 have the schmit characteristics when they are used as INT input pins. In this case,
set these pins for input by the port P0 direction register.
2-20
7220 Group User’s Manual