Renesas H8S/2111B Network Card User Manual


 
Rev. 1.00, 05/04, page 107 of 544
7.4 Port 4
Port 4 is an 8-bit I/O port. Port 4 pins also function as TMR_0 and TMR_1 I/O pins, and the IIC_1
I/O pin. The output type of P42 is NMOS push-pull output. The output type of SDA1 is NMOS
open-drain output. Port 4 has the following registers.
Port 4 data direction register (P4DDR)
Port 4 data register (P4DR)
7.4.1 Port 4 Data Direction Register (P4DDR)
P4DDR specifies input or output for the pins of port 4 on a bit-by-bit basis.
Bit Bit Name
Initial
Value R/W Description
7 P47DDR 0 W
6 P46DDR 0 W
5 P45DDR 0 W
4 P44DDR 0 W
3 P43DDR 0 W
2 P42DDR 0 W
1 P41DDR 0 W
0 P40DDR 0 W
When a bit in P4DDR is set to 1, the corresponding pin
functions as an output port, and when cleared to 0, as
an input port.
7.4.2 Port 4 Data Register (P4DR)
P4DR stores output data for port 4.
Bit Bit Name
Initial
Value
R/W Description
7 P47DR 0 R/W
6 P46DR 0 R/W
5 P45DR 0 R/W
4 P44DR 0 R/W
3 P43DR 0 R/W
2 P42DR 0 R/W
1 P41DR 0 R/W
0 P40DR 0 R/W
If a port 4 read is performed while P4DDR bits are set
to 1, the P4DR values are read directly, regardless of
the actual pin states. If a port 4 read is performed while
P4DDR bits are cleared to 0, the pin states are read.