English
Language : 

HD64F2168 Datasheet, PDF (236/874 Pages) Renesas Technology Corp – Renesas 16-Bit Single-Chip Microcomputer
8.4 Port 4
Port 4 is an 8-bit I/O port. Port 4 pins also function as external interrupt input, and TMR_0,
TMR_1, TMR_X, and TMR_Y input/output pins. Port 4 has the following registers.
• Port 4 data direction register (P4DDR)
• Port 4 data register (P4DR)
8.4.1 Port 4 Data Direction Register (P4DDR)
The individual bits of P4DDR specify input or output for the pins of port 4.
Bit Bit Name Initial Value R/W Description
7
P47DDR 0
6
P46DDR 0
5
P45DDR 0
4
P44DDR 0
W If port 4 pins are specified for use as the general I/O
W port, the corresponding port 4 pins are output ports
when the P4DDR bits are set to 1, and input ports when
W cleared to 0.
W
3
P43DDR 0
W
2
P42DDR 0
W
1
P41DDR 0
W
0
P40DDR 0
W
8.4.2 Port 4 Data Register (P4DR)
P4DR stores output data for the port 4 pins.
Bit Bit Name Initial Value R/W Description
7
P47DR
0
6
P46DR
0
5
P45DR
0
4
P44DR
0
3
P43DR
0
R/W P4DR stores output data for the port 4 pins that are
R/W used as the general output port.
R/W
If a port 4 read is performed while the P4DDR bits are
set to 1, the P4DR values are read. If a port 4 read is
R/W performed while the P4DDR bits are cleared to 0, the
R/W pin states are read.
2
P42DR
0
R/W
1
P41DR
0
R/W
0
P40DR
0
R/W
Rev. 3.00, 03/04, page 196 of 830