Datasheet

Section 8 I/O Ports
Rev. 4.00 Jun 06, 2006 page 213 of 1004
REJ09B0301-0400
8.5 Port 4
8.5.1 Overview
Port 4 is an 8-bit I/O port. Port 4 pins also function as 14-bit PWM output pins (PWX1, PWX0),
8-bit timer 0 and 1 (TMR0, TMR1) I/O pins (TMCI0, TMRI0, TMO0, TMCI1, TMRI1, TMO1),
timer connection I/O pins (CSYNCI, HSYNCI, HSYNCO) (H8S/2138 Group only), SCI2 I/O pins
(TxD2, RxD2, SCK2), IrDA interface I/O pins (IrTxD, IrRxD), host interface output pins
(HIRQ12, HIRQ1, HIRQ11) (H8S/2138 Group only), and the IIC1 I/O pin (SDA1) (option in
H8S/2138 Group only). Port 4 pin functions are the same in all operating modes.
Figure 8.12 shows the port 4 pin configuration.
P47 (I/O)/PWX1 (Output)
P46 (I/O)/PWX0 (Output)
P45 (I/O)/TMRI1 (Input)/HIRQ12 (Output)/CSYNCI (Input)
P44 (I/O)/TMO1 (Output)/HIRQ1 (Output)/HSYNCO (Output)
P43 (I/O)/TMCI1 (Input)/HIRQ11 (Output)/HCYNCI (Input)
P42 (I/O)/TMRI0 (Input)/SCK2 (I/O)/SDA1 (I/O)
P41 (I/O)/TMO0 (Output)/RxD2 (Input)/IrRxD (Input)
P40 (I/O)/TMCI0 (Input)/TxD2 (Output)/IrTxD (Output)
Port 4
Port 4 pins
Figure 8.12 Port 4 Pin Functions
8.5.2 Register Configuration
Table 8.9 shows the port 4 register configuration.
Table 8.9 Port 4 Registers
Name Abbreviation R/W Initial Value Address
*
Port 4 data direction register P4DDR W H'00 H'FFB5
Port 4 data register P4DR R/W H'00 H'FFB7
Note: * Lower 16 bits of the address.