P87LPC768FN NXP Semiconductors, P87LPC768FN Datasheet
P87LPC768FN
Specifications of P87LPC768FN
Available stocks
Related parts for P87LPC768FN
P87LPC768FN Summary of contents
Page 1
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 hilips Semiconductors INTEGRATED CIRCUITS 2002 Mar 12 ...
Page 2
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator GENERAL DESCRIPTION . . . . . . . . . . . . . . . . . ...
Page 3
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator GENERAL DESCRIPTION The P87LPC768 is a 20-pin single-chip microcontroller designed for low pin count applications demanding high-integration, low cost ...
Page 4
... Part Number Temperature Range C and Package P87LPC768BN 0 to +70, Plastic Dual In-Line Package P87LPC768BD 0 to +70, Plastic Small Outline Package P87LPC768FN –45 to +85, Plastic Dual In-Line Package P87LPC768FD –45 to +85, Plastic Small Outline Package PIN CONFIGURATION, 20-PIN DIP AND SO PACKAGES LOGIC SYMBOL PWM3 ...
Page 5
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator BLOCK DIAGRAM 4K BYTE CODE EPROM 128 BYTE DATA RAM PORT 2 CONFIGURABLE I/OS PORT 1 CONFIGURABLE I/OS PORT ...
Page 6
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator FFFFh UNUSED CODE MEMORY SPACE FCFFh 32-BYTE CUSTOMER CODE SPACE (ACCESSIBLE VIA MOVC) FCE0h UNUSED CODE MEMORY SPACE 1000h ...
Page 7
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator PIN DESCRIPTIONS MNEMONIC PIN NO. TYPE P0.0–P0.7 1, 13, 14, I/O Port 0: Port 8-bit I/O ...
Page 8
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator MNEMONIC PIN NO. TYPE P2.0–P2 I/O Port 2: Port 2-bit I/O port with a ...
Page 9
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator SPECIAL FUNCTION REGISTERS SFR Name Description Address ACC* Accumulator ADCON#* A/D Control C0h AUXR1# Auxiliary Function Register B* B ...
Page 10
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator SFR Name Description Address KBI# Keyboard Interrupt P0* Port 0 P1* Port 1 P2* Port 2 P0M1# Port 0 ...
Page 11
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator FUNCTIONAL DESCRIPTION Details of P87LPC768 functions will be described in the following sections. Enhanced CPU The P87LPC768 uses an ...
Page 12
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator ADCON Address: C0h ENADC Bit addressable Reset Value: 00h BIT SYMBOL FUNCTION ADCON.7 ENADC When ENADC = 1, the ...
Page 13
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator Table 1. Example A/D Conversion Times CPU Clock Rate CPU Clock Rate RCCLK = 0 RCCLK = 0 32 ...
Page 14
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator Code Examples for the A/D The first piece of sample code shows an example of port configuration for use ...
Page 15
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator Analog Comparators Two analog comparators are provided on the P87LPC768. Input and output options allow use of the comparators ...
Page 16
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator (P0.4) CIN1A (P0.3) CIN1B (P0.5) CMPREF V ref (P0.2) CIN2A (P0.1) CIN2B Figure 5. Comparator Input and Output Connections ...
Page 17
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator Internal Reference Voltage An internal reference voltage generator may supply a default reference when a single comparator input pin ...
Page 18
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator CNSW0: Counter Shadow register 0 Addr: 0D1H Reset Value: FFH 7 6 CNSW7 CNSW6 CNSW1: Counter Shadow register 1 ...
Page 19
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator The width of each PWM output pulse is determined by the value in the appropriate compare shadow registers, CPSW0 ...
Page 20
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator state when Run is cleared the Compare registers can be written to either the “always 1” or “always 0” ...
Page 21
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator Poll PWMCON0 to find that Transfer Bit PWMCON0.6 is “0”. When “0”: Write CNSW.(0:1) and CPSW.(0:4) for desired pulse ...
Page 22
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator Serial Interface 2 The I C bus uses two wires (SDA and SCL) to transfer information ...
Page 23
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator I2CON Address: D8h 1 Bit Addressable 7 READ RDAT ATN CXA IDLE WRITE BIT SYMBOL FUNCTION I2CON.7 RDAT Read: ...
Page 24
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator ARL “Arbitration Loss” when transmit Active was set, but this device lost arbitration to another transmitter. Transmit ...
Page 25
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator I2CFG Address: C8h Bit Addressable 7 6 SLAVEN MASTRQ BIT SYMBOL FUNCTION I2CFG.7 SLAVEN Slave Enable. Writing a 1 ...
Page 26
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator Table 2. Interaction of TIRUN with SLAVEN, MASTRQ, and MASTER SLAVEN, MASTRQ, TIRUN MASTER 2 The I C interface ...
Page 27
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator External Interrupt Inputs The P87LPC768 has two individual interrupt inputs as well as the Keyboard Interrupt function. The latter ...
Page 28
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator I/O Ports The P87LPC768 has 3 I/O ports, port 0, port 1, and port 2. The exact number of ...
Page 29
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator Configuration Open Drain Output The open drain output configuration turns off all pull-ups and only drives the pull-down transistor ...
Page 30
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator P2M1 Address: A4h Not Bit Addressable 7 6 P2S P1S BIT SYMBOL FUNCTION P2M1.7 P2S When P2S = 1, ...
Page 31
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator P0.7 KBI.7 P0.6 KBI.6 P0.5 KBI.5 P0.4 KBI.4 P0.3 KBI.3 P0.2 KBI.2 P0.1 KBI.1 P0.0 KBI.0 KBI Address: 86h ...
Page 32
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator Oscillator The P87LPC768 provides several user selectable oscillator options, allowing optimization for a range of needs from high precision ...
Page 33
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator THE OSCILLATOR MUST BE CONFIGURED IN ONE OF THE FOLLOWING MODES: – LOW FREQUENCY CRYSTAL – MEDIUM FREQUENCY CRYSTAL ...
Page 34
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator FOSC2 (UCFG1.2) FOSC1 (UCFG1.1) FOSC0 (UCFG1.0) EXTERNAL CLOCK INPUT INTERNAL RC OSCILLATOR CRYSTAL: LOW FREQUENCY CRYSTAL: MEDIUM FREQUENCY CRYSTAL: ...
Page 35
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator For correct activation of Brownout Detect, the V no faster than 50 mV/ s. When V is restored, is ...
Page 36
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator Table 9. Sources of Wakeup from Power Down Mode Wakeup Source Conditions External Interrupt The corresponding ...
Page 37
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator Low Voltage EPROM Operation The EPROM array contains some analog circuits that are not required when V is less ...
Page 38
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator Timer/Counters The P87LPC768 has two general purpose counter/timers which are upward compatible with the standard 80C51 Timer 0 and ...
Page 39
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator Mode 0 Putting either Timer into Mode 0 makes it look like an 8048 Timer, which is an 8-bit ...
Page 40
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator Mode 1 Mode 1 is the same as Mode 0, except that all 16 bits of the timer register ...
Page 41
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator OSC OSC/12 T0 PIN C TR0 GATE INT0 PIN OSC/6 OR OSC/12 Figure ...
Page 42
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator Serial Port Control Register (SCON) The serial port control and status register is the Special Function Register SCON, shown ...
Page 43
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator Baud Rates The baud rate in Mode 0 is fixed: Mode 0 Baud Rate = CPU clock/6. The baud ...
Page 44
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator Table 11. Baud Rates, Timer Values, and CPU Clock Frequencies for SMOD1 = 1 Timer Co nt Timer Count ...
Page 45
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator More About UART Mode 0 Serial data enters and exits through RxD. TxD outputs the shift clock. 8 bits ...
Page 46
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator WRITE TO SBUF SERIAL PORT INTERRUPT REN RI LOAD SBUF READ SBUF S1 ... ...
Page 47
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator TB8 WRITE TO SBUF D TIMER 1 OVERFLOW CL 2 SMOD1 = 0 SMOD1 = 1 16 1-TO-0 TRANSITION ...
Page 48
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator More About UART Modes 2 and 3 Eleven bits are transmitted (through TxD), or received (through RxD): a start ...
Page 49
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator WRITE TO SBUF D PHASE 2 CLOCK (1 OSC CL 2 SMOD1 = 0 SMOD1 = 1 ...
Page 50
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator TB8 WRITE TO SBUF S D TIMER 1 OVERFLOW CL 2 SMOD1 = 0 SMOD1 = 1 16 1-TO-0 ...
Page 51
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator Automatic Address Recognition Automatic Address Recognition is a feature which allows the UART to recognize certain addresses in the ...
Page 52
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator 500 kHz RC OSCILLATOR CLOCK OUT ENABLE WDCLK * WDTE STATE CLOCK WDTE + WDRUN WATCHDOG FEED DETECT BOF ...
Page 53
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator Additional Features The AUXR1 register contains several special purpose control bits that relate to several chip features. AUXR1 is ...
Page 54
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator EPROM Characteristics Programming of the EPROM on the P87LPC768 is accomplished with a serial programming method. Commands, addresses, and ...
Page 55
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator UCFG2 Address: FD01h 7 6 SB2 SB1 BIT SYMBOL FUNCTION UCFG2.7, 6 SB2, SB1 EPROM security bits. See table ...
Page 56
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator DC ELECTRICAL CHARACTERISTICS 6.0 V unless otherwise specified SYMBOL PARAMETER SYMBOL PARAMETER ...
Page 57
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator SYMBOL SYMBOL PARAMETER PARAMETER V Offset voltage comparator inputs IO V Common mode range comparator inputs CR 1 CMRR ...
Page 58
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator 255 254 253 252 251 250 7 Code Out ...
Page 59
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator AC ELECTRICAL CHARACTERISTICS + – + amb DD ...
Page 60
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator t XLXL CLOCK t XHQX t QVXH OUTPUT DATA 0 WRITE TO SBUF t XHDV INPUT DATA VALID CLEAR ...
Page 61
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator 10,000 1,000 4.0 V 3.3 V 2.7 V 100 1 10 Frequency (MHz) Figure 46. Typical high frequency oscillator ...
Page 62
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator DIP20: plastic dual in-line package; 20 leads (300 mil) 2002 Mar 12 60 Preliminary data P87LPC768 SOT146-1 ...
Page 63
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator SO20: plastic small outline package; 20 leads; body width 7.5 mm 2002 Mar 12 61 Preliminary data P87LPC768 SOT163-1 ...
Page 64
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator REVISION HISTORY Date CPCN 2002 Mar 12 9397 750 09558 2001 Aug 06 9397 750 08661 2002 Mar 12 ...
Page 65
Philips Semiconductors Low power, low price, low pin count (20 pin) microcontroller with 4 kB OTP 8-bit A/D, Pulse Width Modulator Purchase of Philips I to use the components in the specifications defined by Philips. This ...