English
Language : 

W79E217A Datasheet, PDF (184/207 Pages) Winbond – 8-bit Microcontroller
Preliminary W79E217A Data Sheet
22. PORT 4 STRUCTURE
Port 4 is a multi-function port that performs general purpose I/O port and chip-select strobe signals
including read strobe, write strobe and read/write strobe signals. The 4 alternate modes are selected
by P4xM1 and P4xM0. The function of chip-select strobe output provides that user can activate
external devices by access to some specific address region.
Port 4 Control Register A
Bit:
7
6
P41M1 P41M0
5
P41C1
4
P41C0
3
P40M1
2
P40M0
1
P40C1
0
P40C0
Mnemonic: P4CONA
Address: 92h
Port 4 Control Register B
Bit:
7
6
5
4
3
2
1
0
P43M1 P43M0 P43C1 P43C0 P42M1 P42M0 P42C1 P42C0
Mnemonic: P4CONB
Address: 93h
BIT NAME
FUNCTION
P4xM1, P4xM0
Port 4 alternate modes.
=00: Mode 0. P4.x is a general purpose I/O port which is the same as Port 1.
=01: Mode 1. P4.x is a Read Strobe signal for chip select purpose. The address
range depends on the SFR P4xAH, P4xAL and bits P4xC1, P4xC0.
=10: Mode 2. P4.x is a Write Strobe signal for chip select purpose. The address
range depends on the SFR P4xAH, P4xAL and bits P4xC1, P4xC0.
=11: Mode 3. P4.x is a Read/Write Strobe signal for chip select purpose. The
address range depends on the SFR P4xAH, P4xAL and bits P4xC1, P4xC0
P4xC1, P4xC0
Port 4 Chip-select Mode address comparison:
=00: Compare the full address (16 bits length) with the base address registers
P4xAH and P4xAL.
=01: Compare the 15 high bits (A15-A1) of address bus with the base address
registers P4xAH and P4xAL.
=10: Compare the 14 high bits (A15-A2) of address bus with the base address
registers P4xAH and P4xAL.
=11: Compare the 8 high bits (A15-A8) of address bus with the base address
registers P4xAH and P4xAL.
- 184 -
Publication Release Date: December 14, 2007
Revision A3.0