Mitsubishi Motors DS5000TK User Manual

Page 96

Advertising
background image

EXTERNAL
ADDRESS
CONTROL

VCC

ADDRESS/
DATA

POWER
DOWN

PORT

0.n

INTERNAL
DATA BUS

WRITE
ENABLE

READ
ENABLE

READ
LATCH/PIN

D

Q

Q

USER’S GUIDE

050396 95/173

96

SECTION 12: PARALLEL I/O

OVERVIEW

The Secure Microcontroller provides four 8–bit bidirec-
tional ports for general purpose I/O functions. Each port
pin is bit and byte addressable using four SFRs that con-
trol the respective port latch. Each bit has an associated
latch (accessed via SFR), input buffer circuit, and output
driver circuit. Ports 0, 2, and 3 also have alternate func-
tions that can be used in place of general I/O. All of the
SFR latches for the parallel port pins are written with 1’s
during a hardware reset. Figure 12–1 illustrates func-
tional circuit diagrams for bits within each of the four I/O
ports. Port 1 has no alternate function; it is always avail-
able for parallel I/O functions.

Ports 0 and 2 can serve as a multiplexed Expanded
Memory bus for applications needing memory mapped
I/O. In the DS5001/2FP the Ports 0 and 2 can also serve
as a slave RPC interface to a host microprocessor.

Port 3 pins each have individual, optional functions de-
scribed below. Enabling the optional function by writing
a 1 to the associated latch bit in the Port 3 SFR automati-
cally converts the I/O pin into its alternate function. For
example, enabling the serial port automatically converts
P3.0 and P3.1 into the RXD and TXD function. Alternate
functions pins and general I/O pins can be enabled inde-
pendent of each other. Enabling selected pins to per-
form their alternate function leaves the other as bit
addressable I/O pins.

PIN

NAME

FUNCTION

P3.7

RD

Expanded Data Memory Read Strobe

P3.6

WR

Expanded Data Memory Write Strobe

P3.5

T1

Timer/Counter 1 Input

P3.4

T0

Timer/Counter 0 Input

P3.3

INT1

External Interrupt 1 Input

P3.2

INT0

External Interrupt 0 Input

P3.1

TXD

Serial Port Transmit Data

P3.0

RXD

Serial Port Receive Data

In many cases it may be desirable to use a combination
of pure I/O and alternate function pins on port 3. For ex-
ample, a user may decide to use the serial port and
INTO pins, leaving 5 pins available for use as general
purpose I/O (assuming P3.6 and P3.7 are not being
used to access external memory). SETB and CLR com-
mands can be used to access the general I/O pins with-

out any effect on the pins being used in their alternate
function. If the MOV command is used to write to port 3,
however, software must always write a logic 1 to the pins
that are being used in their alternate function. Failure to
do so will disturb their function, resulting in serial port
data corruption or disabling of the alternate function in
the case of other pins.

PORT 0 FUNCTIONAL CIRCUITRY Figure 12–1

Advertising
This manual is related to the following products: