Datasheet
Section 9 I/O Ports
Rev.6.00 Sep. 27, 2007 Page 366 of 1268
REJ09B0220-0600
9.3.3 Pin Functions
Port 2 pins also function as PPG output pins (PO
7
to PO
0
) and TPU I/O pins (TIOCA
3
, TIOCB
3
,
TIOCC
3
, TIOCD
3
, TIOCA
4
, TIOCB
4
, TIOCA
5
, and TIOCB
5
), and 8-bit timer I/O pins (TMRI
0
,
TMCI
0
, TMO
0
, TMRI
1
, TMCI
1
, and TMO
1
). Port 2 pin functions are shown in table 9.5.
Table 9.5 Port 2 Pin Functions
Pin Selection Method and Pin Functions
P2
7
/PO
7
/TIOCB
5
/
TMO
1
The pin function is switched as shown below according to the combination of
the TPU channel 5 setting (by bits MD3 to MD0 in TMDR5, bits IOB3 to IOB0
in TIOR5, and bits CCLR1 and CCLR0 in TCR5), bit NDER7 in NDERL, bits
OS3 to OS0 in TCSR1, and bit P27DDR.
OS3 to OS0 All 0 Not all 0
TPU Channel
5 Setting
Table
Below (1)
Table Below (2)
—
P27DDR — 0 1 1 —
NDER7 — — 0 1 —
Pin function TIOCB
5
output
P2
7
input
P2
7
output
PO
7
output
TMO
1
output
TIOCB
5
input
*
Note: * TIOCB
5
input when MD3 to MD0 = B'0000 or B'01xx, and IOB3 = 1.
TPU Channel
5 Setting
(2)
(1)
(2)
(2)
(1)
(2)
MD3 to MD0 B'0000, B'01xx B'0010 B'0011
IOB3 to IOB0 B'0000
B'0100
B'1xxx
B'0001 to
B'0011
B'0101 to
B'0111
— B'xx00 Other than B'xx00
CCLR1,
CCLR0
— — — — Other
than B'10
B'10
Output
function
— Output
compare
output
— — PWM
mode 2
output
—
x: Don’t care