USER'S GUIDE

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.

PIN

NAME

P3.7

RD

P3.6

WR

P3.5

T1

P3.4

T0

P3.3

INT1

 

P3.2

INT0

P3.1

TXD

P3.0

RXD

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.

FUNCTION

Expanded Data Memory Read Strobe

Expanded Data Memory Write Strobe

Timer/Counter 1 Input

Timer/Counter 0 Input

External Interrupt 1 Input

External Interrupt 0 Input

Serial Port Transmit Data

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

 

EXTERNAL

 

 

VCC

ADDRESS/

ADDRESS

 

 

DATA

CONTROL

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

INTERNAL

DATA BUS

D Q

Q

WRITE

ENABLE

PORT

0.n

POWER DOWN

READREAD

ENABLELATCH/PIN

050396 95/173

96

Page 96
Image 96
Mitsubishi DS907x SIP, DS5000TK manual Parallel I/O Overview, Port 0 Functional Circuitry ±1, PIN Name