Rev.6.00 Oct.28.2004 page 279
of 1016
REJ09B0138-0600H
9.3
Port 2
9.3.1
Overview
Port 2 is an 8-bit I/O port. Port 2 pins also function as PPG output pins (PO7 to PO0), TPU I/O pins (TIOCA3, TIOCB3,
TIOCC3, TIOCD3, TIOCA4, TIOCB4, TIOCA5, and TIOCB5) and 8-bit timer I/O pins (TMRI0, TMCI0, TMO0,
TMRI1, TMCI1, and TMO1). Port 2 pin functions are the same in all operating modes. Port 2 uses Schmitt-triggered
input.
Figure 9-2 shows the port 2 pin configuration.
P2
7
(I/O)/PO7 (output)/TIOCB5 (I/O)/TMO1 (output)
P2
6
(I/O)/PO6 (output)/TIOCA5 (I/O)/TMO0 (output)
P2
5
(I/O)/PO5 (output)/TIOCB4 (I/O)/TMCI1 (input)
P2
4
(I/O)/PO4 (output)/TIOCA4 (I/O)/TMRI1 (input)
P2
3
(I/O)/PO3 (output)/TIOCD3 (I/O)/TMCI0 (input)
P2
2
(I/O)/PO2 (output)/TIOCC3 (I/O)/TMRI0 (input)
P2
1
(I/O)/PO1 (output)/TIOCB3 (I/O)
P2
0
(I/O)/PO0 (output)/TIOCA3 (I/O)
Port 2
Port 2 pins
Figure 9-2 Port 2 Pin Functions
9.3.2
Register Configuration
Table 9-4 shows the port 2 register configuration.
Table 9-4
Port 2 Registers
Name
Abbreviation
R/W
Initial Value
Address
*
Port 2 data direction register
P2DDR
W
H'00
H'FEB1
Port 2 data register
P2DR
R/W
H'00
H'FF61
Port 2 register
PORT2
R
Undefined
H'FF51
Note:
*
Lower 16 bits of the address.
Port 2 Data Direction Register (P2DDR)
Bit
:
7
6
5
4
3
2
1
0
P27DDR P26DDR P25DDR P24DDR P23DDR P22DDR P21DDR P20DDR
Initial value :
0
0
0
0
0
0
0
0
R/W
:
W
W
W
W
W
W
W
W
P2DDR is an 8-bit write-only register, the individual bits of which specify input or output for the pins of port 2. P2DDR
cannot be read; if it is, an undefined value will be read.
Setting a P2DDR bit to 1 makes the corresponding port 2 pin an output pin, while clearing the bit to 0 makes the pin an
input pin.
Содержание ZTAT H8S/2357F
Страница 4: ......
Страница 28: ...Rev 6 00 Oct 28 2004 page xxiv of xxiv REJ09B0138 0600H...
Страница 82: ...Rev 6 00 Oct 28 2004 page 54 of 1016 REJ09B0138 0600H...
Страница 108: ...Rev 6 00 Oct 28 2004 page 80 of 1016 REJ09B0138 0600H...
Страница 364: ...Rev 6 00 Oct 28 2004 page 336 of 1016 REJ09B0138 0600H...
Страница 438: ...Rev 6 00 Oct 28 2004 page 410 of 1016 REJ09B0138 0600H...
Страница 566: ...Rev 6 00 Oct 28 2004 page 538 of 1016 REJ09B0138 0600H...
Страница 588: ...Rev 6 00 Oct 28 2004 page 560 of 1016 REJ09B0138 0600H...
Страница 688: ...Rev 6 00 Oct 28 2004 page 660 of 1016 REJ09B0138 0600H...
Страница 694: ...Rev 6 00 Oct 28 2004 page 666 of 1016 REJ09B0138 0600H...
Страница 708: ...Rev 6 00 Oct 28 2004 page 680 of 1016 REJ09B0138 0600H...
Страница 1044: ...Rev 6 00 Oct 28 2004 page 1016 of 1016 REJ09B0138 0600H...
Страница 1047: ...H8S 2357 Group H8S 2357F ZTATTM H8S 2398F ZTATTM Hardware Manual 2 6 2 Ote machi Chiyoda ku Tokyo 100 0004 Japan...