I/O Ports; Port Configurations; Quasi-Bidirectional Output Configuration; Number Of I/O Pins Available - Philips P89LPC920 User Manual

80c51 8-bit microcontroller with two-clock core
Table of Contents

Advertisement

Philips Semiconductors

I/O PORTS

4. I/O PORTS
The P89LPC920/921/922 has 3 I/O ports: Port 0, Port 1, and Port 3. Ports 0 and 1 are 8-bit ports and Port 3 is a 2-bit port. The
exact number of I/O pins available depends upon the clock and reset options chosen (see Table 4-1)
Table 4-1: .Number of I/O pins available
Clock source
On-chip oscillator or watchdog
oscillator
External clock input
Low/medium/high speed oscillator
(external crystal or resonator)

Port configurations

All but three I/O port pins on the P89LPC920/921/922 may be configured by software to one of four types on a pin-by-pin basis,
as shown in Table 4-3. These are: quasi-bidirectional (standard 80C51 port outputs), push-pull, open drain, and input-only. Two
configuration registers for each port select the output type for each port pin.
P1.5 (RST) can only be an input and cannot be configured.
P1.2 (SCL/T0) and P1.3 (SDA/INT0) may only be configured to be either input-only or open drain.
Table 4-2: Port output configuration settings
PxM1.y
PxM2.y
0
0
1
1

Quasi-bidirectional output configuration

Quasi-bidirectional outputs can be used both as an input and output without the need to reconfigure the port. This is possible
because when the port outputs a logic high, it is weakly driven, allowing an external device to pull the pin low. When the pin is
driven low, it is driven strongly and able to sink a large current. There are three pull-up transistors in the quasi-bidirectional output
that serve different purposes.
One of these pull-ups, called the "very weak" pull-up, is turned on whenever the port latch for the pin contains a logic 1. This very
weak pull-up sources a very small current that will pull the pin high if it is left floating.
A second pull-up, called the "weak" pull-up, is turned on when the port latch for the pin contains a logic 1 and the pin itself is also
at a logic 1 level. This pull-up provides the primary source current for a quasi-bidirectional pin that is outputting a 1. If this pin is
pulled low by an external device, the weak pull-up turns off, and only the very weak pull-up remains on. In order to pull the pin
low under these conditions, the external device has to sink enough current to overpower the weak pull-up and pull the port pin
below its input threshold voltage.
2003 Dec 8
Reset option
No external reset (except during power-up)
External RST pin supported
No external reset (except during power-up)
External RST pin supported
No external reset (except during power-up)
External RST pin supported
Port output mode
0
Quasi-bidirectional
1
Push-Pull
0
Input Only (High Impedance)
1
Open Drain
Number of I/O pins
29
User's Manual - Preliminary -
P89LPC920/921/922
18
17
17
16
16
15

Advertisement

Table of Contents
loading

This manual is also suitable for:

P89lpc921P89lpc922

Table of Contents