xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx
xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx
Philips Semiconductors
P87LPC778
CMOS single-chip 8-bit microcontroller
9397 750 12378
© Koninklijke Philips Electronics N.V. 2004. All rights reserved.
Product data Rev. 01 — 31 March 2004 10 of 79
I2CON* I
2
C-bus control register D8h/RD RDAT ATN DRDY ARL STR STP MASTER - 80h
D8h/WR CXA IDLE CDR CARL CSTR CSTP XSTR XSTP
I2DAT I
2
C-bus data register D9h/RD RDAT 000000080h
D9h/WR XDAT x x x xxxx
Bit address AF AE AD AC AB AA A9 A8
IEN0* Interrupt enable 0 A8h EA EWD EBO ES ET1 EX1 ET0 EX0 00H
Bit address EF EE ED EC EB EA E9 E8
IEN1* Interrupt enable 1 E8h ETI - EC1 EAD - EC2 EKB EI2 00H
Bit address BF BE BD BC BB BA B9 B8
IP0* Interrupt priority 0 B8h - PWD PBO PS PT1 PX1 PT0 PX0 00H
IP0H Interrupt priority 0 HIGH B7h - PWDH PBOH PSH PT1H PX1H PT0H PX0H 00H
Bit address FF FE FD FC FB FA F9 F8
IP1* Interrupt priority 1 F8h PTI - PC1 PAD - PC2 PKB PI2 00H
IP1H Interrupt priority 1 HIGH F7h PTIH - PC1H PADH - PC2H PKBH PI2H 00H
KBI Keyboard Interrupt 86h 00H
Bit address 87 86 85 84 83 82 81 80
P0* Port 0 80h T1 CMP1 CMPREF CIN1A CIN1B CIN2A CIN2B CMP2
[1]
Bit address 97 96 95 94 93 92 91 90
P1* Port 1 90h DAC0 DAC1
RST INT1 INT0 T0 RxD TxD
[1]
Bit address A7 A6 A5 A4 A3 A2 A1 A0
P2*Port 2 A0h------X1X2
[1]
P0M1 Port 0 output mode 1 84h (P0M1.7) (P0M1.6) (P0M1.5) (P0M1.4) (P0M1.3) (P0M1.2) (P0M1.1) (P0M1.0) 00H
P0M2 Port 0 output mode 2 85h (P0M2.7) (P0M2.6) (P0M2.5) (P0M2.4) (P0M2.3) (P0M2.2) (P0M2.1) (P0M2.0) 00H
P1M1 Port 1 output mode 1 91h (P1M1.7) (P1M1.6) - (P1M1.4) - - (P1M1.1) (P1M1.0) 00H
P1M2 Port 1 output mode 2 92h (P1M2.7) (P1M2.6) - (P1M2.4) - - (P1M2.1) (P1M2.0) 00H
P2M1 Port 2 output mode 1 A4h P2S P1S P0S ENCLK ENT1 ENT0 (P2M1.1) (P2M1.0) 00H
P2M2 Port 2 output mode 2 A5h ------(P2M2.1) (P2M2.0) 00H
PCON Power control register 87h SMOD1 SMOD0 BOF POF GF1 GF0 PD IDL
[2]
Table 3: Special function registers
…continued
* indicates SFRs that are bit addressable.
Name Description SFR
addr.
Bit functions and addresses Reset
value
MSB LSB Hex
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx
xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx
Philips Semiconductors
P87LPC778
CMOS single-chip 8-bit microcontroller
9397 750 12378
© Koninklijke Philips Electronics N.V. 2004. All rights reserved.
Product data Rev. 01 — 31 March 2004 11 of 79
[1] I/O port values at reset are determined by the PRHI bit in the UCFG1 configuration byte.
[2] The PCON reset value is xxBOF POF - 0000b. The BOF and POF flags are not affected by reset. The POF flag is set by hardware upon power up. The BOF flag is set by the
occurrence of a brownout reset/interrupt and upon power up.
[3] The WDCON reset value is xx11 0000b for a Watchdog reset, xx01 0000b for all other reset causes if the Watchdog is enabled, and xx00 0000b for all other reset causes if the
Watchdog is disabled.
Bit address D7 D6 D5 D4 D3 D2 D1 D0
PSW* Program status word D0h CY AC F0 RS1 RS0 OV F1 P 00H
PT0AD Port 0 digital input disable F6h 00H
Bit address 9F 9E 9D 9C 9B 9A 99 98
SCON* Serial port control 98h SM0 SM1 SM2 REN TB8 RB8 TI RI 00H
SBUF Serial port data buffer register 99h xxh
SADDR Serial port address register A9h 00H
SADEN Serial port address enable B9h 00H
SP Stack pointer 81h 07h
Bit address 8F 8E 8D 8C 8B 8A 89 88
TCON* Timer0 and 1 control 88h TF1 TR1 TF0 TR0 IE1 IT1 IE0 IT0 00H
TH0 Timer0 HIGH 8Ch 00H
TH1 Timer1 HIGH 8Dh 00H
TL0 Timer0 LOW 8Ah 00H
TL1 Timer1 LOW 8Bh 00H
TMOD Timer0 and 1 mode 89h GATE C/T M1 M0 GATE C/T M1 M0 00H
WDCON Watchdog control register A7h - - WDOVF WDRUN WDCLK WDS2 WDS1 WDS0
[3]
WDRST Watchdog reset register A6h xxh
Table 3: Special function registers
…continued
* indicates SFRs that are bit addressable.
Name Description SFR
addr.
Bit functions and addresses Reset
value
MSB LSB Hex
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

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