P87LPC778
CMOS single-chip 8-bit 80C51 microcontroller with
128-byte data RAM, 8 kB OTP
Rev. 01 — 31 March 2004
Product data
1. General description
The P87LPC778 is a 20-pin single-chip microcontroller designed for low pin count
applications demanding high-integration, low cost solutions over a wide range of
performance requirements. A member of the Philips low pin count family, the
P87LPC778 offers a 4 channel, 8-bit A/D converter, programmable oscillator
configurations for high and low speed crystals or RC operation, wide operating
voltage range, programmable port output configurations, selectable Schmitt trigger
inputs, LED drive outputs, and a built-in Watchdog timer. The P87LPC778 is based
on an accelerated 80C51 processor architecture that executes instructions at twice
the rate of standard 80C51 devices.
2. Features
s
An accelerated 80C51 CPU provides instruction cycle times of 300 ns to 600 ns
for all instructions except multiply and divide when executing at 20 MHz.
s
2.7 V to 5.5 V operating range for digital functions.
s
Four channel, 10-bit Pulse Width Modulator.
s
Four channel, 8-bit Analog to Digital Converter. Conversion time is 9.3
µs
with a
20 MHz crystal.
s
I
2
C-bus communication port and Full duplex UART.
s
Internal oscillator 2.5 %. The internal oscillator option allows operation with no
external oscillator components.
s
Two analog comparators.
s
Eight keypad interrupt inputs, plus two additional external interrupt inputs.
s
Watchdog timer with separate on-chip oscillator, requiring no external
components. The Watchdog time-out time is selectable from 8 values.
s
20-pin TSSOP package.
Philips Semiconductors
P87LPC778
CMOS single-chip 8-bit microcontroller
FFFFh
UNUSED SPACE
UNUSED CODE
MEMORY SPACE
FCFFh
32-BYTE CUSTOMER
CODE SPACE
(ACCESSIBLE VIA
MOVC)
FCE0h
UNUSED CODE
MEMORY SPACE
2000h
1FFFh
8 KBYTES ON-CHIP
DATA MEMORY
128 BYTES ON-CHIP DATA 7Fh
MEMORY (DIRECTLY AND
INDIRECTLY ADDRESSABLE
VIA MOVC)
16 BYTES
BIT-ADDRESSABLE
0000h
on-chip data
memory space
00h
external data
memory space(1)
UNUSED SPACE
SPECIAL FUNCTION
REGISTERS
(ONLY DIRECTLY
ADDRESSABLE)
80h
FFh
CONFIGURATION BYTES
UCFG1, UCFG2
(ACCESSIBLE VIA MOVX)
FFFFh
FD01h
FD00h
INTERRUPT
VECTORS
on-chip code
memory space
0000h
002aaa615
(1) The P87LPC778 does not support access to external data memory. However, the User
Configuration Bytes are accessed via the MOVX instruction as if they were in external
data memory.
Fig 2. Memory map.
9397 750 12378
© Koninklijke Philips Electronics N.V. 2004. All rights reserved.
Product data
Rev. 01 — 31 March 2004
4 of 79
Philips Semiconductors
P87LPC778
CMOS single-chip 8-bit microcontroller
5. Pinning information
5.1 Pinning
handbook, halfpage
PWM3/CMP2/P0.0 1
PWM2/P1.7 2
PWM1/P1.6 3
RST/P1.5 4
20 P0.1/CIN2B/PWM0
19 P0.2/CIN2A
18 P0.3/CIN1B/AD0
17 P0.4/CIN1A/AD1
P87LPC778
VSS 5
X1/P2.1 6
X2/CLKOUT/P2.0 7
INT1/P1.4 8
SDA/INT0/P1.3 9
SCL/T0/P1.2 10
16 P0.5/CMPREF/AD2
15 VDD
14 P0.6/CMP1/AD3
13 P0.7/T1
12 P1.0/TxD
11 P1.1/RxD
002aaa612
Fig 3. 20 pin DIP and SO configuration.
5.2 Pin description
Table 2:
Symbol
P0.0 - P0.7
Pin description
Pin
1, 20-16,
14, 13
Type
I/O
Description
Port 0:
Port 0 is an 8-bit I/O port with a user-configurable output type. Port 0 latches are
configured in the quasi-bidirectional mode and have either ones or zeros written to them
during reset, as determined by the PRHI bit in the UCFG1 configuration byte. The
operation of port 0 pins as inputs and outputs depends upon the port configuration
selected. Each port pin is configured independently. Refer to
Section 8.9 “I/O ports”
and
Table 67 “DC electrical characteristics”
for details.
The Keypad Interrupt feature operates with Port 0 pins.
Port 0 also provides various special functions as described below:
P0.0
P0.1
P0.2
P0.3
P0.4
P0.5
P0.6
1
20
19
18
17
16
14
O
O
I
O
I
I
I
I
I
I
I
O
I
9397 750 12378
CMP2 —
Comparator 2 output.
PWM3 —
PWM output 3.
CIN2B —
Comparator 2 positive input B.
PWM0 —
PWM output 0.
CIN2A —
Comparator 2 positive input A.
CIN1B —
Comparator 1 positive input B.
AD0 —
A/D channel 0 input.
CIN1A —
Comparator 1 positive input A.
AD1 —
A/D channel 1 input.
CMPREF —
Comparator reference (negative) input.
AD2 —
A/D channel 2 input.
CMP1 —
Comparator 1 output.
AD3 —
A/D channel 3 input.
© Koninklijke Philips Electronics N.V. 2004. All rights reserved.
Product data
Rev. 01 — 31 March 2004
5 of 79