INTEGRATED CIRCUITS
P87LPC768
Low power, low price, low pin count
(20 pin) microcontroller with 4 kB OTP
8-bit A/D,and Pulse Width Modulator
Preliminary data
Supersedes data of 2001 Aug 06
2002 Mar 12
Philips
Semiconductors
Philips Semiconductors
Preliminary data
Low power, low price, low pin count (20 pin) microcontroller
with 4 kB OTP 8-bit A/D, Pulse Width Modulator
P87LPC768
GENERAL DESCRIPTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FEATURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ORDERING INFORMATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PIN CONFIGURATION, 20-PIN DIP AND SO PACKAGES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LOGIC SYMBOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BLOCK DIAGRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PIN DESCRIPTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FUNCTIONAL DESCRIPTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Enhanced CPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Analog Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Analog to Digital Converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A/D Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The A/D in Power Down and Idle Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Code Examples for the A/D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Analog Comparators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
I2C Serial Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
I/O Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Keyboard Interrupt (KBI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Power Monitoring Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Power Reduction Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Timer/Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
UART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Watchdog Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Additional Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
EPROM Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ABSOLUTE MAXIMUM RATINGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DC ELECTRICAL CHARACTERISTICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
COMPARATOR ELECTRICAL CHARACTERISTICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A/D CONVERTER DC ELECTRICAL CHARACTERISTICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AC ELECTRICAL CHARACTERISTICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
REVISION HISTORY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
1
2
2
2
3
5
9
9
9
9
10
11
12
13
20
24
26
28
30
32
33
35
36
39
49
51
52
53
54
55
55
57
62
2002 Mar 12
i
Philips Semiconductors
Preliminary data
Low power, low price, low pin count (20 pin) microcontroller
with 4 kB OTP 8-bit A/D, Pulse Width Modulator
P87LPC768
•
I
2
C communication port.
•
Eight keypad interrupt inputs, plus two additional external interrupt
inputs.
•
Four interrupt priority levels.
•
Watchdog timer with separate on-chip oscillator, requiring no
external components. The watchdog timeout time is selectable
from 8 values.
•
Active low reset. On-chip power-on reset allows operation with no
GENERAL DESCRIPTION
The P87LPC768 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 P87LPC768 offers
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
P87LPC768 is based on an accelerated 80C51 processor
architecture that executes instructions at twice the rate of standard
80C51 devices.
external reset components.
•
Low voltage reset. One of two preset low voltage levels may be
selected to allow a graceful system shutdown when power fails.
May optionally be configured as an interrupt.
•
Oscillator Fail Detect. The watchdog timer has a separate fully
on-chip oscillator, allowing it to perform an oscillator fail detect
function.
•
Configurable on-chip oscillator with frequency range and RC
oscillator options (selected by user programmed EPROM bits).
The RC oscillator option allows operation with no external
oscillator components.
•
Programmable port output configuration options:
FEATURES
quasi-bidirectional, open drain, push-pull, input-only.
•
An accelerated 80C51 CPU provides instruction cycle times of
300–600 ns for all instructions except multiply and divide when
executing at 20 MHz. Execution at up to 20 MHz when
V
DD
= 4.5 V to 6.0 V, 10 MHz when V
DD
= 2.7 V to 6.0 V.
•
Selectable Schmitt trigger port inputs.
•
LED drive capability (20 mA) on all port pins.
•
Controlled slew rate port outputs to reduce EMI. Outputs have
approximately 10 ns minimum ramp times.
•
Four-channel 10-bit Pulse Width Modulator
•
Four-channel multiplexed 8-bit A/D converter. Conversion time of
•
2.7 V to 6.0 V operating range for digital functions.
•
4 kbytes EPROM code memory.
•
128 byte RAM data memory.
•
32-byte customer code EPROM allows serialization of devices,
storage of setup parameters, etc.
9.3µS at f
osc
= 20 MHz.
•
15 I/O pins minimum. Up to 18 I/O pins using on-chip oscillator
and reset options.
•
Only power and ground connections are required to operate the
P87LPC768 when fully on-chip oscillator and reset options are
selected.
•
Serial EPROM programming allows simple in-circuit production
coding. Two EPROM security bits prevent reading of sensitive
application programs.
•
Two 16-bit counter/timers. Each timer may be configured to toggle
a port output upon timer overflow.
•
Idle and Power Down reduced power modes. Improved wakeup
from Power Down mode (a low interrupt input starts execution).
Typical Power Down current is 1
µA.
•
Two analog comparators.
•
Full duplex UART.
•
20-pin DIP and SO packages.
2002 Mar 12
1
Philips Semiconductors
Preliminary data
Low power, low price, low pin count (20 pin) microcontroller
with 4 kB OTP 8-bit A/D, Pulse Width Modulator
P87LPC768
ORDERING INFORMATION
Part Number
P87LPC768BN
P87LPC768BD
P87LPC768FN
P87LPC768FD
Temperature Range
°C
and Package
0 to +70, Plastic Dual In-Line Package
0 to +70, Plastic Small Outline Package
–45 to +85, Plastic Dual In-Line Package
–45 to +85, Plastic Small Outline Package
Frequency
20 MHz (5 V), 10 MHz (3 V)
20 MHz (5 V), 10 MHz (3 V)
20 MHz (5 V), 10 MHz (3 V)
20 MHz (5 V), 10 MHz (3 V)
Drawing Number
SOT146–1
SOT163–1
SOT146–1
SOT163–1
PIN CONFIGURATION, 20-PIN DIP AND SO PACKAGES
PWM3/CMP2/P0.0
PWM2/P1.7
PWM1/P1.6
RST/P1.5
V
SS
X1/P2.1
X2/CLKOUT/P2.0
INT1/P1.4
SDA/INT0/P1.3
1
2
3
4
5
6
7
8
9
20 P0.1/CIN2B/PWM0
19 P0.2/CIN2A/BRAKE
18 P0.3/CIN1B/AD0
17 P0.4/CIN1A/AD1
16 P0.5/CMPREF/AD2
15 V
DD
14 P0.6/CMP1/AD3
13 P0.7/T1
12 P1.0/TxD
11 P1.1/RxD
SCL/T0/P1.2 10
SU01361
LOGIC SYMBOL
V
DD
V
SS
PWM3
PWM0
BRAKE
AD0
AD1
AD2
AD3
CMP2
CIN2B
CIN2A
CIN1B
CIN1A
CMPREF
CMP1
T1
CLKOUT/X2
X1
PORT 2
PORT 0
PORT 1
TxD
RxD
T0
INT0
INT1
RST
PWM1
PWM2
SCL
SDA
SU01362
2002 Mar 12
2
Philips Semiconductors
Preliminary data
Low power, low price, low pin count (20 pin) microcontroller
with 4 kB OTP 8-bit A/D, Pulse Width Modulator
P87LPC768
BLOCK DIAGRAM
ACCELERATED
80C51 CPU
INTERNAL BUS
UART
4K BYTE
CODE EPROM
I
2
C
128 BYTE
DATA RAM
TIMER 0, 1
PORT 2
CONFIGURABLE I/OS
PORT 1
CONFIGURABLE I/OS
WATCHDOG TIMER
AND OSCILLATOR
PORT 0
CONFIGURABLE I/OS
ANALOG
COMPARATORS
KEYPAD
INTERRUPT
A/D
CONVERTER
PULSE WIDTH
MODULATOR
CRYSTAL OR
RESONATOR
CONFIGURABLE
OSCILLATOR
ON-CHIP
RC
OSCILLATOR
POWER MONITOR
(POWER-ON RESET,
BROWNOUT RESET)
SU01363
2002 Mar 12
3