beautypg.com

8 port 8, 1 port 8 data direction register (p8ddr), 2 port 8 data register (p8dr) – Renesas H8S/2111B User Manual

Page 152

background image

Rev. 1.00, 05/04, page 118 of 544

7.8 Port

8

Port 8 is an 8-bit I/O port. Port 8 pins also function as SCI_1 I/O pins, the IIC_1 I/O pins, LPC I/O
pins, and interrupt input pins. The output type of P86 and SCK1 is NMOS push-pull output. The
output type of SCL1 is NMOS open-drain output and direct bus driving is enabled. Port 8 has the
following registers.

• Port 8 data direction register (P8DDR)
• Port 8 data register (P8DR)

7.8.1

Port 8 Data Direction Register (P8DDR)

P8DDR specifies input or output for the pins of port 8 on a bit-by-bit basis.

Bit Bit

Name

Initial
Value

R/W Description

7 —

1 — Reserved

The initial value should not be changed.

6 P86DDR

0 W

5 P85DDR

0 W

4 P84DDR

0 W

3 P83DDR

0 W

2 P82DDR

0 W

1 P81DDR

0 W

0 P80DDR

0 W

P8DDR has the same address as PBPIN, and if read,
the port B state will be returned.

The corresponding port 8 pins are output ports when
P8DDR bits are set to 1, and input ports when cleared
to 0.

7.8.2

Port 8 Data Register (P8DR)

P8DR stores output data for the port 8 pins (P86 to P80).

Bit Bit

Name

Initial
Value R/W Description

7 —

1 — Reserved

The initial value should not be changed.

6 P86DR

0 R/W

5 P85DR

0 R/W

4 P84DR

0 R/W

3 P83DR

0 R/W

2 P82DR

0 R/W

1 P81DR

0 R/W

0 P80DR

0 R/W

If a port 8 read is performed while P8DDR bits are set
to 1, the P8DR values are read directly, regardless of
the actual pin states. If a port 8 read is performed while
P8DDR bits are cleared to 0, the pin states are read.

This manual is related to the following products: