English
Language : 

IC89E54 Datasheet, PDF (13/36 Pages) Integrated Circuit Solution Inc – 8-BITS SINGLE MICROCONTROLLER with 16/32/64-Kbytes of FLASH, 256 byte +512 byte RAM
IC89E54/58/64
Operation of Power-Save Mode
Refer to IC80C32 data sheet.
Instruction Definitions
Refer to IC80C32 data sheet.
Enhanced Function
Port 4
Port 4, SFR P4 at address D8H, is a 4-bit multipurpose programmable I/O port. Each bit can be configured individually
by software. The Port 4 has four different operation modes.
In mode 0, P4.0~P4.3 is a bi-directional I/O port which is same as port 1. P4.2 and P4.3 also serve as external
interrupt INT3 and INT2 if enabled.
In mode 1, P4.0~P4.3 are read data strobe signals which are synchronized with beginning of read address signal at
specified address. These signals can be used as chip-select signals for external peripherals.
In mode 2, P4.0~P4.3 are write data strobe signals which are synchronized with beginning of written address signal at
specified address. These signals can be used as chip-select signals for external peripherals.
In mode 3, P4.0~P4.3 are write data strobe signals which are synchronized with beginning of read or written address
signal at specified address. These 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 SFRs P4xAH, P4xAL, P4CONA an P4CONB. The registers P4xAH and P4xAL contain the 16-bit base
address of P4.x. The registers P4CONA and P4CONB contain the control bits to configure the Port 4 operating mode.
Here is an example to program the P4.0 as a write strobe signal at the I/O port address 1234H~1237H and positive
polarity, and P4.1~P4.3 are used as general I/O ports.
MOV
MOV
MOV
MOV
MOV
P40AH,#12H
P40AL,#34H
P4CONA,#00001010B
P4CONB,#00H
P2ECON,#10H
;Define the base I/O address 1234H for P4.0 as an special function pin.
;Define the P4.0 as a write strobe signal pin and the compartor, length is 14.
;P4.1~P4.3 as general I/O port which are the same as Port 1.
;Write the P40SINV=1 to inverse the P4.0 write strobe polarity, default is
;negative.
Then any instruction MOVX @DPTR,A (with DPTR=1234H~1237H) will generate the positive polarity write strobe
signal at pin P4.0. And the instruction MOV P4,#XX will output the bit 3 to bit 1 of data #XX to pin P4.3~P4.1.
The SFRs of Port 4 are described in following. Figure 11 shows architecture of Port 4.
Port 4 base Address Registers : Reset values are 00000000B.
P40AH, P40AL(85H, 84H): The Base address register for comparator of P4.0. P40AH contains the high-order byte of
address, P40AL contains the low-order byte of address.
P41AH, P41AL(95H, 94H): The Base address register for comparator of P4.1. P41AH contains the high-order byte of
address, P41AL contains the low-order byte of address.
P42AH, P42AL(ADH, ACH): The Base address register for comparator of P4.2. P42AH contains the high-order byte of
address, P42AL contains the low-order byte of address.
P43AH, P43AL(B5H , B4H): The Base address register for comparator of P4.3. P43AH contains the high-order byte of
address, P43AL contains the low-order byte of address.
Integrated C ircuitSolution Inc.
13
MC012-0C 11/16/2001