UM10147_2
© NXP B.V. 2008. All rights reserved.
User manual
Rev. 02 — 28 April 2008
37 of 134
NXP Semiconductors
UM10147
P89LPC952/954 User manual
[1]
Required for a clock frequency above 12 MHz.
5.1 Port configurations
All but three I/O port pins on the P89LPC952/954 may be configured by software to one of
four types on a pin-by-pin basis, as shown in
. 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.
5.2 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.
External clock input
No external reset (except during power up) 39
External RST pin supported
38
Low/medium/high speed oscillator
(external crystal or resonator)
No external reset (except during power up) 38
External RST pin supported
37
Table 23.
Number of I/O pins available
…continued
Clock source
Reset option
Number of I/O
pins
Table 24.
Port output configuration settings
PxM1.y
PxM2.y
Port output mode
0
0
Quasi-bidirectional
0
1
Push-pull
1
0
Input only (high-impedance)
1
1
Open drain