3 port p2 (p22 to p20), Toshiba – Toshiba TMP87CP24AF User Manual
Page 56
Attention! The text in this document has been recognized automatically. To view the original document, you can use the "Original mode".

TOSHIBA
TMP87CM24A/P24A
2.2.3 Port P2 (P22 to P20)
Port
P2
is
a
3-bit
input/output
port.
It
is
also
used
as
an
external
interrupt
input,
a
STOP
mode
release
signal
input,
and
low-frequency
crystal
connection
pins.
When
used
as
an
input
port,
or
a
secondary
function pin, the output latch should be set to "1". During reset, the output latches are initialized to
## ^ n
A
low-frequency
crystal
(32.768
kHz)
is
connected
to
pins
P21
(XTIN)
and
P22
(XTOUT)
in
the
dual-clock
mode. In the single-clock mode, pins P21 and P22 can be used as normal input/output ports.
It is recommended that pin P20 should be used as an external interrupt input, a STOP mode release signal
input,
or
an
input
port.
If
used
as
an
output
port,
the
interrupt
latch
is
set
on
the
falling
edge
of
the
output pulse.
When a read instruction is executed for port P2, bits 7 to 3 read in as indefinite.
P2
(0002
h
)
R/W
P22
XTOUT
P21
XTIN
P20
INT5
STOP
(Initial value:
*****
1 1 1
)
Figure 2-5. Port P2
3
-
24-56
2002
-
10-03