
Preliminary W79E217A Data Sheet
Publication Release Date: December 14, 2007
- 11 -
Revision A3.0
5.1 Port 4
Port 4, SFR P4 at address A5H, is a 4-bit multipurpose programmable I/O port which functions are I/O
and chip-select function. It has four different operation modes:
Mode 0 - P4.0 ~ P4.3 is 4-bit bi-directional I/O port which is the same as port 1. The default Port
4 is a general I/O function.
Mode1 - P4.0 ~ P4.3 are read data strobe signals which are synchronized with
RD
signal at
specified addresses. These read data strobe signals can be used as chip-select signals for
external peripherals.
Mode2 - P4.0 ~ P4.3 are write data strobe signals which are synchronized with
WR
signal at
specified addresses. These write data strobe signals can be used as chip-select signals for
external peripherals.
Mode3 - P4.0 ~ P4.3 are read/write data strobe signals which are synchronized with
RD
or
WR
signal at specified addresses. These read/write data strobe signals can be used as chip-
select signals for external peripherals.
When Port 4 is configured with the feature of chip-select signals, the chip-select signal address range
depends on the contents of the SFR P4xAH, P4xAL, P4CONA and P4CONB. P4xAH and P4xAL
contain the 16-bit base address of P4.x. P4CONA and P4CONB contain the control bits to configure
the Port 4 operation mode.
z
z
z
z