English
Language : 

W78IRD2A25DL Datasheet, PDF (30/76 Pages) List of Unclassifed Manufacturers – 8-BIT MICROCONTROLLER
W78IRD2
7. PORT 4 AND BASE ADDRESS REGISTERS
Port 4, address E8H, is a 4-bit, multi-purpose, programmable I/O port. Each bit can be configured
individually, and registers P4CONA and P4CONB contain the control bits that select the mode of each
pin. Each pin has four operating modes.
Mode 0: Bi-directional I/O port, like port 1. P4.2 and P4.3 serve as external interrupts INT3 and INT2 ,
if enabled.
Mode 1: Read-strobe signals synchronized with the RD signal at specified addresses. These signals
can be used as chip-select signals for external peripherals.
Mode 2: Write-strobe signals synchronized with the WR signal at specified addresses. These signals
can be used as chip-select signals for external peripherals.
Mode 3: Read/write-strobe signals synchronized with the RD or WR signal at specified addresses.
These signals can be used as chip-select signals for external peripherals.
In modes 1 – 3, the address range for chip-select signals depends on the contents of registers P4xAH
and P4xAL, which contain the high-order byte and low-order byte, respectively, of the 16-bit address
comparator for P4.x. This is illustrated in the following schematic.
P4 REGISTER
P4.x
READ
WRITE
P4xCSINV
DATA I/O
RD_CS
MUX 4->1
WR_CS
RD/WR_CS
ADDRESS BUS
EQUAL
REGISTER
P4xAL
P4xAH
Bit Length
Selectable
comparator
REGISTER
P4xCMP0
P4xCMP1
P4xFUN0
P4xFUN1
P4.x INPUT DATA BUS
PIN
P4.x
Figure 7-1
- 30 -