Datasheet
Section 9 I/O Ports
Rev.6.00 Mar. 18, 2009 Page 373 of 980
REJ09B0050-0600
9.9 Port B
Port B is an 8-bit I/O port that also has other functions. The port B has the following registers.
• Port B data direction register (PBDDR)
• Port B data register (PBDR)
• Port B register (PORTB)
• Port B MOS pull-up control register (PBPCR)
9.9.1 Port B Data Direction Register (PBDDR)
The individual bits of PBDDR specify input or output for the pins of port B.
PBDDR cannot be read; if it is, an undefined value will be read.
Bit Bit Name Initial Value R/W Description
7 PB7DDR 0 W
6 PB6DDR 0 W
5 PB5DDR 0 W
4 PB4DDR 0 W
3 PB3DDR 0 W
2 PB2DDR 0 W
1 PB1DDR 0 W
0 PB0DDR 0 W
• Modes 1 and 2
Port B pins are address outputs regardless of the
PBDDR settings.
• Modes 4 and 7 (when EXPE = 1)
Setting a PBDDR bit to 1 makes the corresponding
port B pin an address output, while clearing the bit
to 0 makes the pin an input port.
• Mode 7 (when EXPE = 0)
Port B is an I/O port, and its pin functions can be
switched with PBDDR.