Summary of the content on the page No. 1
INTEGRATED CIRCUITS
USER
MANUAL
P89LPC901/902/903
8-bit microcontrollers with accelerated two-clock 80C51 core
1KB 3V Low-Power byte-eraseable Flash with 128 Byte RAM
2003 Dec 8
Philips
PHILIPS
Semiconductors
Summary of the content on the page No. 2
User’s Manual - Preliminary - Philips Semiconductors Table of Contents P89LPC901/902/903 Table of Contents 1. General Description................................................................................ 7 Pin Configurations ..................................................................................... 7 Product comparison................................................................................... 8 Pin Descriptions - P89LPC901 ...............................................
Summary of the content on the page No. 3
User’s Manual - Preliminary - Philips Semiconductors Table of Contents P89LPC901/902/903 Mode 6 - P89LPC901 .............................................................................. 47 Timer Overflow toggle output - P89LPC901............................................ 49 6. Real-Time Clock/System Timer............................................................ 51 Real-time Clock Source........................................................................... 51 Changing RTCS1-0 ........
Summary of the content on the page No. 4
User’s Manual - Preliminary - Philips Semiconductors Table of Contents P89LPC901/902/903 Feed Sequence ....................................................................................... 84 Watchdog Timer in Timer Mode .............................................................. 87 Power down operation............................................................................. 87 Watchdog Clock Source .......................................................................... 87 Periodic w
Summary of the content on the page No. 5
User’s Manual - Preliminary - Philips Semiconductors P89LPC901/902/903 List of Figures List of Figures P89LPC901/902/903 Memory Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Using the Crystal Oscillator - P89LPC901 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 On-Chip RC Oscillator TRIM Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Block Diagram of Oscillator Control - P89L
Summary of the content on the page No. 6
User’s Manual - Preliminary - Philips Semiconductors P89LPC901/902/903 List of Figures Serial Port Status Register (SSTAT). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Serial Port Mode 0 (Double Buffering Must Be Disabled) . . . . . . . . . . . . . . . . . . . . . . . . . 66 Serial Port Mode 1 (Only Single Transmit Buffering Case Is Shown) . . . . . . . . . . . . . . . . 66 Serial Port Mode 2 or 3 (Only Single Transmit Buffering Case Is Shown) . . . .
Summary of the content on the page No. 7
User’s Manual - Preliminary - Philips Semiconductors P89LPC901/902/903 GENERAL DESCRIPTION 1. GENERAL DESCRIPTION The P89LPC901/902/903 is a single-chip microcontroller designed for applications demanding high-integration, low cost solutions over a wide range of performance requirements. The P89LPC901/902/903 is based on a high performance processor architecture that executes instructions six times the rate of standard 80C51 devices. Many system level functions have been incorporated into the
Summary of the content on the page No. 8
User’s Manual - Preliminary - Philips Semiconductors P89LPC901/902/903 GENERAL DESCRIPTION Logic Symbols V V DD SS KBI4 CIN1A KBI5 CMPREF RST P89 T0 LPC901 CLKOUT XTAL2 XTAL1 V V DD SS KBI4 CIN1A KBI5 CMPREF RST P89 KBI6 CMP1 KBI2 CIN2A LPC902 KBI0 CMP2 V V DD SS KBI4 CIN1A KBI5 CMPREF RST P89 KBI2 CIN2A RxD LPC903 TxD Product comparison The following table highlights differences between these three devices. UART Ext crystal CMP Ref CMP1 & CMP2 Part number X2 clkout T0 PWM output CMP1 input
Summary of the content on the page No. 9
User’s Manual - Preliminary - Philips Semiconductors P89LPC901/902/903 GENERAL DESCRIPTION Block Diagram - P89LPC901 High Performance Accelerated 2-clock 80C51 CPU 1KB Code 128 byte Flash Internal Bus Data RAM Port 3 Configurable I/Os Timer0 Timer1 Port 1 Configurable I/Os Real-Time Clock/ System Timer Port 0 Configurable I/Os Analog Comparator Keypad Interrupt Watchdog Timer and Oscillator Power Monitor (Power-On Reset, CPU Programmable Brownout Reset) Clock Oscillator Divider On-Chip
Summary of the content on the page No. 10
User’s Manual - Preliminary - Philips Semiconductors P89LPC901/902/903 GENERAL DESCRIPTION Block Diagram - P89LPC902 High Performance Accelerated 2-clock 80C51 CPU 1KB Code Flash Internal Bus 128 byte Data RAM Port 1 Input Timer0 Timer1 Port 0 Configurable I/Os Real-Time Clock/ System Timer Keypad Interrupt Analog Comparators Watchdog Timer and Oscillator CPU Programmable Clock Oscillator Divider On-Chip Power Monitor RC (Power-On Reset, Oscillator Brownout Reset) 2003 Dec 8 10
Summary of the content on the page No. 11
User’s Manual - Preliminary - Philips Semiconductors P89LPC901/902/903 GENERAL DESCRIPTION Block Diagram - P89LPC903 High Performance Accelerated 2-clock 80C51 CPU 128 byte Data RAM 1KB Code Flash Internal Bus UART Port 1 Input Timer0 Timer1 Port 0 Configurable I/Os Real-Time Clock/ System Timer Keypad Interrupt Analog Comparators Watchdog Timer and Oscillator CPU Programmable Clock Oscillator Divider On-Chip Power Monitor RC (Power-On Reset, Oscillator Brownout Reset) 2003 Dec 8 1
Summary of the content on the page No. 12
User’s Manual - Preliminary - Philips Semiconductors P89LPC901/902/903 GENERAL DESCRIPTION PIN DESCRIPTIONS - P89LPC901 MNEMONIC PIN NO. TYPE NAME AND FUNCTION P0.0 - P0.6 6, 7 I/O Port 0: Port 0 is an I/O port with a user-configurable output types. During reset Port 0 latches are configured in the input only mode with the internal pullup disabled. The operation of port 0 pins as inputs and outputs depends upon the port configuration selected. Each port pin is configured independentl
Summary of the content on the page No. 13
User’s Manual - Preliminary - Philips Semiconductors P89LPC901/902/903 GENERAL DESCRIPTION MNEMONIC PIN NO. TYPE NAME AND FUNCTION O XTAL2 Output from the oscillator amplifier (when a crystal oscillator option is selected via the FLASH configuration). O CLKOUTCPU clock divided by 2 when enabled via SFR bit (ENCLK - TRIM.6). It can be used if the CPU clock is the internal RC oscillator, watchdog oscillator or external clock input, except when XTAL1/XTAL2 are used to generate clock source f
Summary of the content on the page No. 14
User’s Manual - Preliminary - Philips Semiconductors P89LPC901/902/903 GENERAL DESCRIPTION PIN DESCRIPTIONS - P89LPC902 MNEMONIC PIN NO. TYPE NAME AND FUNCTION P0.0 - P0.6 2,3,5,6,7 I/O Port 0: Port 0 is an I/O port with a user-configurable output types. During reset Port 0 latches are configured in the input only mode with the internal pullup disabled. The operation of port 0 pins as inputs and outputs depends upon the port configuration selected. Each port pin is configured indepen
Summary of the content on the page No. 15
User’s Manual - Preliminary - Philips Semiconductors P89LPC901/902/903 GENERAL DESCRIPTION PIN DESCRIPTIONS - P89LPC903 MNEMONIC PIN NO. TYPE NAME AND FUNCTION P0.0 - P0.6 2,6,7 I/O Port 0: Port 0 is an I/O port with a user-configurable output types. During reset Port 0 latches are configured in the input only mode with the internal pullup disabled. The operation of port 0 pins as inputs and outputs depends upon the port configuration selected. Each port pin is configured independent
Summary of the content on the page No. 16
User’s Manual - Preliminary - Philips Semiconductors P89LPC901/902/903 GENERAL DESCRIPTION SPECIAL FUNCTION REGISTERS Note: Special Function Registers (SFRs) accesses are restricted in the following ways: 1. User must NOT attempt to access any SFR locations not defined. 2. Accesses to any defined SFR locations must be strictly for the functions for the SFRs. 3. SFR bits labeled ’-’, ’0’ or ’1’ can ONLY be written and read as follows: - ’-’ Unless otherwise specified, MUST be written with ’0’, bu
Summary of the content on the page No. 17
User’s Manual - Preliminary - Philips Semiconductors P89LPC901/902/903 GENERAL DESCRIPTION Bit Functions and Addresses Reset Value SFR Name Description Address LSB MSB Hex Binary PWDRT 1 IP0H# Interrupt Priority 0 High B7H - PBOH - PT1H - PT0H - 00H x0000000 H FF FE FD FC FB FA F9 F8 1 IP1*# Interrupt Priority 1 F8H - - - - - PC PKBI - 00H 00x00000 1 IP1H# Interrupt Priority 1 High F7H - - - - - PCH PKBIH - 00H 00x00000 PATN_S 1 KBCON# Keypad Control Register 94H - - - - - - KBIF 00H xxxxxx00 E
Summary of the content on the page No. 18
User’s Manual - Preliminary - Philips Semiconductors P89LPC901/902/903 GENERAL DESCRIPTION Bit Functions and Addresses Reset Value SFR Name Description Address LSB MSB Hex Binary 8F 8E 8D 8C 8B 8A 89 88 TCON* Timer 0 and 1 Control 88H TF1 TR1 TF0 TR0 - - - - 00H 00000000 TH0 Timer 0 High 8CH 00H 00000000 TH1 Timer 1 High 8DH 00H 00000000 TL0 Timer 0 Low 8AH 00H 00000000 TL1 Timer 1 Low 8BH 00H 00000000 TMOD Timer 0 and 1 Mode 89H - - T1M1 T1M0 - T0C\T T0M1 T0M0 00H 00000000 TRIM# Internal Oscil
Summary of the content on the page No. 19
User’s Manual - Preliminary - Philips Semiconductors P89LPC901/902/903 GENERAL DESCRIPTION Special Function Registers Table - P89LPC902 Bit Functions and Addresses Reset Value SFR Name Description Address LSB MSB Hex Binary E7 E6 E5 E4 E3 E2 E1 E0 ACC* Accumulator E0H 00H 00000000 1 AUXR1# Auxiliary Function Register A2H ---- SRST 0 - DPS00H 000000x0 F7 F6 F5 F4 F3 F2 F1 F0 B* B Register F0H 00H 00000000 1 CMP1# Comparator 1 Control Register ACH - - CE1 - CN1 OE1 CO1 CMF1 00H xx000000 1 CMP2# C
Summary of the content on the page No. 20
User’s Manual - Preliminary - Philips Semiconductors P89LPC901/902/903 GENERAL DESCRIPTION Bit Functions and Addresses Reset Value SFR Name Description Address LSB MSB Hex Binary KBPATN# Keypad Pattern Register 93H FFH 11111111 87 86 85 84 83 82 81 80 CMP1/ CMPREF/ CIN1A/ P0* Port 0 80H - -KB2 -KB0 Note 1 KB6 KB5 KB4 97 96 95 94 93 92 91 90 P1* Port 1 90H - - RST ----- B7 B6 B5 B4 B3 B2 B1 B0 P0M1# Port 0 Output Mode 1 84H - (P0M1.6) (P0M1.5) (P0M1.4) - (P0M1.2) - (P0M1.0) FFH 11111111 P0M2# Po