Philips Semiconductors
P87LPC778
CMOS single-chip 8-bit microcontroller
Product data Rev. 01 — 31 March 2004 12 of 79
9397 750 12378
© Koninklijke Philips Electronics N.V. 2004. All rights reserved.
8. Functional description
Remark: Please refer to the
P87LPC778 User’s Manual
for a more detailed
functional description.
8.1 Enhanced CPU
The P87LPC778 uses an enhanced 80C51 CPU which runs at twice the speed of
standard 80C51 devices. This means that the performance of the P87LPC778
running at 5 MHz is exactly the same as that of a standard 80C51 running at 10 MHz.
A machine cycle consists of 6 oscillator cycles, and most instructions execute in 6 or
12 clocks. A user configurable option allows restoring standard 80C51 execution
timing. In that case, a machine cycle becomes 12 oscillator cycles.
In the following sections, the term ‘CPU clock’ is used to refer to the clock that
controls internal instruction execution. This may sometimes be different from the
externally applied clock, as in the case where the part is configured for standard
80C51 timing by means of the CLKR configuration bit or in the case where the clock
is divided down via the setting of the DIVM register. These features are described in
Section 8.10 “Oscillator” on page 39.
8.2 Analog functions
The P87LPC778 incorporates analog peripheral functions: an Analog to Digital
Converter, two Analog Comparators. In order to give the best analog function
performance and to minimize power consumption, pins that are actually being used
for analog functions must have the digital outputs and the digital inputs must also be
disabled.
Digital outputs are disabled by putting the port output into the Input Only (high
impedance) mode as described in Section 8.9 “I/O ports” on page 34.
Digital inputs on port 0 may be disabled through the use of the PT0AD register. Each
bit in this register corresponds to one pin of Port 0. Setting the corresponding bit in
PT0AD disables that pin’s digital input. Port bits that have their digital inputs disabled
will be read as 0 by any instruction that accesses the port.
8.3 Analog to digital converter
The P87LPC778 incorporates a four channel, 8-bit A/D converter. The A/D inputs are
alternate functions on four port 0 pins. Because the device has a very limited number
of pins, the A/D power supply and references are shared with the processor power
pins, V
DD
and V
SS
. The A/D converter operates down to a V
DD
supply of 3.0 V.
The A/D converter circuitry consists of a 4-input analog multiplexer and an 8-bit
successive approximation ADC. The A/D employs a ratiometric potentiometer which
guarantees DAC monotonicity.
The A/D converter is controlled by the special function register ADCON. Details of
ADCON are shown in Tables 4 and 5. The A/D must be enabled by setting the
ENADC bit at least 10 microseconds before a conversion is started, to allow time for