© Koninklijke Philips Electronics N.V. 2004.
Printed in the U.S.A.
All rights are reserved. Reproduction in whole or in part is prohibited without the prior
written consent of the copyright owner.
The information presented in this document does not form part of any quotation or
contract, is believed to be accurate and reliable and may be changed without notice. No
liability will be accepted by the publisher for any consequence of its use. Publication
thereof does not convey nor imply any license under patent- or other industrial or
intellectual property rights.
Date of release: 31 March 2004 Document order number: 9397 750 12378
Contents
Philips Semiconductors
P87LPC778
CMOS single-chip 8-bit microcontroller
1 General description . . . . . . . . . . . . . . . . . . . . . . 1
2 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
3 Ordering information. . . . . . . . . . . . . . . . . . . . . 2
4 Block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 3
5 Pinning information. . . . . . . . . . . . . . . . . . . . . . 5
5.1 Pinning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
5.2 Pin description . . . . . . . . . . . . . . . . . . . . . . . . . 5
6 Logic symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
7 Special function registers. . . . . . . . . . . . . . . . . 8
8 Functional description . . . . . . . . . . . . . . . . . . 12
8.1 Enhanced CPU. . . . . . . . . . . . . . . . . . . . . . . . 12
8.2 Analog functions . . . . . . . . . . . . . . . . . . . . . . . 12
8.3 Analog to digital converter . . . . . . . . . . . . . . . 12
8.4 A/D timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
8.4.1 The A/D in Power-down and Idle modes . . . . 15
8.4.2 Code examples for the A/D. . . . . . . . . . . . . . . 16
8.5 Analog comparators . . . . . . . . . . . . . . . . . . . . 17
8.5.1 Comparator configuration . . . . . . . . . . . . . . . . 17
8.5.2 Internal reference voltage. . . . . . . . . . . . . . . . 19
8.5.3 Comparator interrupt. . . . . . . . . . . . . . . . . . . . 19
8.5.4 Comparators and power reduction modes . . . 19
8.5.5 Comparator configuration example. . . . . . . . . 20
8.6 Pulse width modulator . . . . . . . . . . . . . . . . . . 20
8.6.1 PWM brake function . . . . . . . . . . . . . . . . . . . . 25
8.7 I
2
C-bus serial interface . . . . . . . . . . . . . . . . . . 26
8.7.1 I
2
C-bus interrupts . . . . . . . . . . . . . . . . . . . . . . 27
8.7.2 Reading I2CON . . . . . . . . . . . . . . . . . . . . . . . 28
8.7.3 Checking ATN and DRDY . . . . . . . . . . . . . . . . 28
8.7.4 Writing I2CON . . . . . . . . . . . . . . . . . . . . . . . . 29
8.7.5 Regarding Transmit Active . . . . . . . . . . . . . . . 29
8.7.6 Regarding software response time. . . . . . . . . 30
8.8 Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
8.8.1 External interrupt inputs . . . . . . . . . . . . . . . . . 33
8.9 I/O ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
8.9.1 Quasi-bidirectional output configuration . . . . . 34
8.9.2 Open drain output configuration . . . . . . . . . . . 35
8.9.3 Push-pull output configuration . . . . . . . . . . . . 36
8.9.4 Keyboard interrupt (KBI) . . . . . . . . . . . . . . . . . 38
8.10 Oscillator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
8.10.1 Low speed oscillator option . . . . . . . . . . . . . . 39
8.10.2 Medium speed oscillator option . . . . . . . . . . . 39
8.10.3 High speed oscillator option. . . . . . . . . . . . . . 39
8.10.4 On-chip RC oscillator option. . . . . . . . . . . . . . 40
8.10.5 External clock input option . . . . . . . . . . . . . . . 40
8.10.6 Clock output . . . . . . . . . . . . . . . . . . . . . . . . . . 40
8.10.7 CPU clock modification: CLKR and DIVM . . . 41
8.11 Power monitoring functions. . . . . . . . . . . . . . . 42
8.11.1 Brownout detection. . . . . . . . . . . . . . . . . . . . . 42
8.11.2 Power-on detection. . . . . . . . . . . . . . . . . . . . . 43
8.12 Power reduction modes . . . . . . . . . . . . . . . . . 43
8.12.1 Idle mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
8.12.2 Power-down mode . . . . . . . . . . . . . . . . . . . . . 43
8.12.3 Low voltage EPROM operation . . . . . . . . . . . 44
8.13 Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
8.14 Timer/counters . . . . . . . . . . . . . . . . . . . . . . . . 46
8.14.1 Mode 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
8.14.2 Mode 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
8.14.3 Mode 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
8.14.4 Mode 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
8.14.5 Timer overflow toggle output . . . . . . . . . . . . . 50
8.15 UART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
8.15.1 Mode 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
8.15.2 Mode 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
8.15.3 Mode 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
8.15.4 Mode 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
8.15.5 Serial port control register (SCON) . . . . . . . . 51
8.15.6 Baud rates . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
8.15.7 Using Timer1 to generate baud rates. . . . . . . 53
8.15.8 More about UART Mode 0 . . . . . . . . . . . . . . . 54
8.15.9 More about UART Mode 1 . . . . . . . . . . . . . . . 55
8.15.10 More about UART Modes 2 and 3 . . . . . . . . . 56
8.15.11 Multiprocessor communications. . . . . . . . . . . 57
8.15.12 Automatic address recognition. . . . . . . . . . . . 57
8.16 Watchdog timer . . . . . . . . . . . . . . . . . . . . . . . 63
8.16.1 Watchdog feed sequence. . . . . . . . . . . . . . . . 64
8.16.2 Watchdog reset . . . . . . . . . . . . . . . . . . . . . . . 64
8.17 Additional features . . . . . . . . . . . . . . . . . . . . . 65
8.17.1 Software reset . . . . . . . . . . . . . . . . . . . . . . . . 66
8.17.2 Dual data pointers . . . . . . . . . . . . . . . . . . . . . 66
8.18 EPROM characteristics . . . . . . . . . . . . . . . . . 66
8.18.1 System configuration bytes . . . . . . . . . . . . . . 67
8.18.2 Security bits . . . . . . . . . . . . . . . . . . . . . . . . . . 68
9 Limiting values . . . . . . . . . . . . . . . . . . . . . . . . 69
10 Static characteristics . . . . . . . . . . . . . . . . . . . 70
11 Dynamic characteristics. . . . . . . . . . . . . . . . . 74
12 Comparator electrical characteristics. . . . . . 75
13 Package outline . . . . . . . . . . . . . . . . . . . . . . . . 76
14 Revision history . . . . . . . . . . . . . . . . . . . . . . . 77
15 Data sheet status. . . . . . . . . . . . . . . . . . . . . . . 78
16 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
17 Disclaimers . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
18 Licenses. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

P87LPC778FDH,529

Mfr. #:
Manufacturer:
NXP Semiconductors
Description:
IC MCU 8BIT 8KB OTP 20TSSOP
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet