Port Configurations; Quasi-Bidirectional Output Configuration - Philips P89LPC938 User Manual

Single-chip microcontroller
Table of Contents

Advertisement

Philips Semiconductors
Table 23:
Clock source
External clock input
Low/medium/high speed oscillator
(external crystal or resonator)
[1]

5.1 Port configurations

All but three I/O port pins on the P89LPC938 may be configured by software to one of four
types on a pin-by-pin basis, as shown in
(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 24:
PxM1.y
0
0
1
1

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.
User manual
Number of I/O pins available
Required for a clock frequency above 12 MHz.
Port output configuration settings
PxM2.y
0
1
0
1
Rev. 03 — 7 June 2005
...continued
Reset option
No external reset (except during power up) 25
External RST pin supported
No external reset (except during power up) 24
External RST pin supported
Table
24. These are: quasi-bidirectional
Port output mode
Quasi-bidirectional
Push-pull
Input only (high-impedance)
Open drain
UM10119
P89LPC938 User manual
Number of I/O
pins
[1]
24
[1]
23
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
34 of 139

Advertisement

Table of Contents
loading

Table of Contents