Datasheet

Section 8 I/O Ports
Rev.7.00 Dec. 24, 2008 Page 239 of 698
REJ09B0074-0700
8.7 Port B (H8S/2218 Group Only)
The port B is an 8-bit I/O port also functioning as address bus (A15 to A8) output pins. The port B
has the following registers.
Note: When the USB is used while the E6000 emulator is used, the AE3 to AE0 bits in PFCR
must be set so that the PB1 and PB0 pins output addresses A9 and A8. This note applies to
both the H8S/2218 Group and H8S/2212 Group.
Port B data direction register (PBDDR)
Port B data register (PBDR)
Port B register (PORTB)
Port B pull-up MOS control register (PBPCR)
8.7.1 Port B Data Direction Register (PBDDR)
PBDDR specifies input or output for the pins of the port B.
Since PBDDR is a write-only register, the bit manipulation instructions must not be used to write
PBDDR. For details, see section 2.9.4, Accessing Registers Containing Write-Only Bits.
Bit Bit Name Initial Value R/W Description
7
6
5
4
3
2
1
0
PB7DDR
PB6DDR
PB5DDR
PB4DDR
PB3DDR
PB2DDR
PB1DDR
PB0DDR
0
0
0
0
0
0
0
0
W
W
W
W
W
W
W
W
Modes 4 to 6:
If address output is enabled by the setting of bits AE3 to
AE0 in PFCR, the corresponding port B pins are address
outputs. When address output is disabled, setting a
PBDDR bit to 1 makes the corresponding port B pin an
output port, while clearing the bit to 0 makes the pin an
input port.
Mode 7:
Setting a PBDDR bit to 1 makes the corresponding port B
pin an output port, while clearing the bit to 0 makes the
pin an input port.