Philips P89LPC902 Light Therapy Device User Manual


 
Philips Semiconductors
User’s Manual - Preliminary -
P89LPC901/902/903
I/O PORTS
2003 Dec 8 39
4. I/O PORTS
The P89LPC901/902/903 has between 3 and 6 I/O pins. The exact number of I/O pins available depends on the clock and reset
options chosen:
Table 4-1: Number of I/O Pins Available
Port Configurations
All but one I/O port pin on the P89LPC901/902/903 may be configured by software to one of four types on a pin-by-pin basis, as
shown in Table . 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.
Table 4-2: Port Output Configuration Settings
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 pullup transistors in the quasi-bidirectional output
that serve different purposes.
One of these pullups, called the "very weak" pullup, is turned on whenever the port latch for the pin contains a logic 1. This very
weak pullup sources a very small current that will pull the pin high if it is left floating.
A second pullup, called the "weak" pullup, 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 pullup 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, this weak pullup turns off, and only the very weak pullup remains on. In order to pull the pin low
under these conditions, the external device has to sink enough current to overpower the weak pullup and pull the port pin below
its input threshold voltage.
Clock Source Reset Option
Number of I/O
Pins
8-Pin Package
On-chip oscillator or watchdog
oscillator
No external reset(except during power-up) 6
External RST pin supported 5
External clock input
No external reset(except during power-up) 5
External RST
pin supported 4
Low/medium/high speed oscillator
(external crystal or resonator)
(P89LPC901)
No external reset(except during power-up) 4
External RST
pin supported 3
PxM1.y PxM2.y Port Output Mode
0 0 Quasi-bidirectional
0 1 Push-Pull
1 0 Input Only (High Impedance)
11 Open Drain