INTEGRATED CIRCUITS SEE THE LAST 2 PAGES OF THIS DATA SHEET FOR A LIST OF ERRATA RELATED TO THIS PART. P87C51MB2/P87C51MC2 80C51 8-bit microcontroller family with extended memory 64KB/96KB OTP with 2KB/3KB RAM Preliminary specification 2001 Apr 06 Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM GENERAL DESCRIPTION The P87C51Mx2 represents the first microcontroller based on Philips Semiconductors’ new 51MX core. The P87C51MC2 features 96 Kbytes of OTP program memory and 3 Kbytes of data SRAM, while the P87C51MB2 has 64 Kbytes of OTP and 2 Kbytes of RAM. In addition, both devices are equipped with a Programmable Counter Array (PCA), a watchdog timer that can be configured to different time ranges through SFR bits, as well as two enhanced UARTs or one enhanced UART and an SPI. Philips Semiconductors’ 51MX (Memory eXtension) core is an accelerated 80C51 architecture that executes instructions at twice the rate of standard 80C51 devices. The linear address range of the 51MX has been expanded to support up to 8 Mbytes of program memory and 8Mbytes of data memory. It retains full program code compatibility to enable design engineers to re-use 80C51 development tools, eliminating the need to move to a new, unfamiliar architecture. The 51MX core also retains 80C51 bus compatibility to allow for the continued use of 80C51-interfaced peripherals and Application Specific Integrated Circuits (ASICs). The P87C51Mx2 provides greater functionality, increased performance and overall lower system cost. By offering an embedded memory solution combined with the enhancements to manage the memory extension, the P87C51Mx2 eliminates the need for software work-arounds. The increased program memory enables design engineers to develop more complex programs in a highlevel language like C, for example, without struggling to contain the program within the traditional 64 Kbytes of program memory. These enhancements also greatly improve C Language efficiency for code size below 64 Kbytes. The 51MX core is described in more details in the 51MX Architecture Reference. KEY FEATURES • Extended features of the 51MX Core: - 23-bit program memory space and 23-bit data memory space - linear program and data address range expanded to support up to 8 Mbytes each - Program counter expanded to 23 bits - Stack pointer extended to 16 bits enabling stack space beyond the 80C51 limitation - New 23-bit extended data pointer and two 24-bit universal pointers greatly improve C compiler code efficiency in using pointers to access variables in different spaces. • 100% binary compatibility with the classic 80C51 so that existing code is completely reusable • Up to 24 MHz CPU clock with 6 clock cycles per machine cycle • 96 Kbytes or 64 Kbytes of on-chip OTP • 3 Kbytes or 2 Kbytes of on-chip RAM • Programmable Counter Array (PCA) • Two full-duplex enhanced UARTs • Industry-standard Serial Peripheral Interface (SPI) KEY BENEFITS • Increases program/data address range to 8 Mbytes each • Enhances performance and efficiency for C programs • Fully 80C51-compatible microcontroller • Provides seamless and compelling upgrade path from classic 80C51 • Preserves 80C51 code base, investment/knowledge, and peripherals & ASICs • Supported by 80C51 development and programming tools (Keil, Nohau, BP Micro, etc.) • The P87C51Mx2 makes it possible to develop applications at a lower cost and with a reduced time-to-market 2001 Apr 06 2 Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM COMPLETE FEATURES • Fully static • Up to 24 MHz CPU clock with 6 clock cycles per machine cycle • 96 Kbytes or 64 Kbytes of on-chip OTP • 3 Kbytes or 2 Kbytes of on-chip RAM • 23-bit program memory space and 23-bit data memory space • Four-level interrupt priority • 34 I/O lines (5 ports) • Three Timers: Timer0, Timer1 and Timer2 • Two full-duplex enhanced UARTs with baud rate generator • Framing error detection • Automatic address recognition • Supports industry-standard Serial Peripheral Interface (SPI) with a baud rate up to 6 Mbits/sec • Power control modes • Clock can be stopped and resumed • Idle mode • Power down mode • Second DPTR register • Asynchronous port reset • Programmable Counter Array (PCA) (compatible with 8xC51Rx+) with five Capture/Compare modules • Low EMI (inhibit ALE) • Watchdog timer with programmable prescaler for different time ranges (compatible with 8xC66x with added prescaler) ORDERING INFORMATION MEMORY PART ORDER NUMBER OTP RAM TEMPERATURE RANGE AND PACKAGE FREQUENCY VDD VOLTAGE RANGE VDD = 2.7-5.5V VDD = 4.5-5.5V DWG # 1 P87C51MB2BA 64 KB 2048 B 0 to +70°C, PLCC44 2.7-5.5V 4.5-5.5V 0-12MHz 0-24MHz SOT187-2 2 P87C51MC2BA 96 KB 3072 B 0 to +70°C, PLCC44 2.7-5.5V 4.5-5.5V 0-12MHz 0-24MHz SOT187-2 2001 Apr 06 3 Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM LOGIC SYMBOL RST XTAL2 EA/Vpp XTAL1 PSEN ALE/PROG 2001 Apr 06 4 MOSI SPICLK Address Bus 16-22 T2 T2EX ECI CEX0 CEX1 CEX2 CEX3 CEX4 Address Bus 8-15 P87C51Mx2 PORT1 PORT3 RXD1 TXD1 VSS PORT2 PORT0 RXD0 TXD0 INT0 INT1 T0 T1 WR RD PORT4 MISO SS Data Bus Address Bus 0-7 VDD Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM PIN CONFIGURATION Pin Function PLCC44 6 1 40 7 39 PLASTIC LEADED CHIP CARRIER 17 29 18 28 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 Pin Function 1 (NC/VSS) P1.0/T2 P1.1/T2EX P1.2/ECI P1.3/CEX0 P1.4/CEX1/MOSI P1.5/CEX2/SPICLK P1.6/CEX3 P1.7/CEX4 RST P3.0/RXD0 P4.0/RXD1/MISO1 P3.1/TXD0 P3.2/INT0 P3.3/INT1 P3.4/T0 P3.5/T1 P3.6/WR P3.7/RD XTAL2 XTAL1 VSS 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 (NC/VDD)1 P2.0/A8/A16 P2.1/A9/A17 P2.2/A10/A18 P2.3/A11/A19 P2.4/A12/A20 P2.5/A13/A21 P2.6/A14/A22 P2.7/A15 PSEN ALE P4.1/TXD1/SS1 EA/Vpp P0.7/AD7 P0.6/AD6 P0.5/AD5 P0.4/AD4 P0.3/AD3 P0.2/AD2 P0.1/AD1 P0.0/AD0 VDD 1. Pins 1, 12, 23, 34 were not internally connected in some derivatives. Please refer to section on Pin Descriptions for details. 2001 Apr 06 5 Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM BLOCK DIAGRAM High Performance 80C51 CPU (51MX Core) 96K/64K Byte Code EPROM UART 0 Internal Bus Crystal or Resonator 2001 Apr 06 3K/2K Byte Data RAM Baud Rate Generator Port 4 Configurable I/Os UART 1 Port 3 Configurable I/Os SPI Port 2 Configurable I/Os Timer0 Timer1 Port 1 Configurable I/Os Watchdog Timer Port 0 Configurable I/Os PCA (Programmable Counter Array) Oscillator Timer2 6 Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM PIN DESCRIPTIONS MNEMONIC PIN NO. TYPE NAME AND FUNCTION P0.0 - P0.7 43 - 36 I/O Port 0: Port 0 is an open drain, bidirectional I/O port. Port 0 pins that have 1s written to them float and can be used as high-impendance inputs. Port 0 is also the multiplexed loworder address and data bus during accesses to external program and data memory. In this application, it uses strong internal pull-ups when emitting 1s. P1.0 - P1.7 2-9 I/O Port 1: Port 1 is an 8-bit bidirectional I/O port with internal pull-ups on all pins. Port 1 pins that have 1s written to them are pulled high by the internal pull-ups and can be used as inputs. As inputs, port 1 pins that are externally pulled low will source current because of the internal pull-ups. (Note: When SFR bit SPEN (SPCTL.6) is ’1’, the pull-ups at P1.4 and P1.5 are disabled.) 2 I/O P1.0 T2 Timer/Counter 2 external count input/Clockout 3 I P1.1 T2EX Timer/Counter 2 Reload/Capture/Direction Control 4 I P1.2 ECI External Clock Input to the PCA 5 I/O P1.3 CEX0 Capture/Compare External I/O for PCA module 0 6 I/O P1.4 CEX1 Capture/Compare External I/O for PCA module 1 (with pull-up on pin) MOSI SPI Master Out/Slave In (Selected when SFR bit SPEN (SPCTL.6) is ’1’, in which case the pull-up for this pin is disabled) CEX2 Capture/Compare External I/O for PCA module 2 (with pull-up on pin) SPICLK SPI Clock (Selected when SFR bit SPEN (SPCTL.6) is ’1’, in which case the pull-up for this pin is disabled) I/O 7 I/O P1.5 I/O P2.0 - P2.7 8 I/O P1.6 CEX3 Capture/Compare External I/O for PCA module 3 9 I/O P1.7 CEX4 Capture/Compare External I/O for PCA module 4 24 - 31 I/O Port 2: Port 2 is a 8-bit bidirectional I/O port with internal pull-ups. Port 2 pins that have 1s written to them are pulled high by the internal pull-ups and can be used as inputs. As inputs, port 2 pins that are externally being pulled low will source current because of the internal pull-ups. (See DC Electrical Characteristics: IIL ). Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that use 16-bit addresses ( MOVX @ DPTR) or 23-bit addresses (MOVX @EPTR, EMOV). In this application, it uses strong internal pull-ups when emitting 1s. During accesses to external data memory that use 8-bit addresses ( MOV @ Ri), port2 emits the contents of the P2 Special Function Register. Note that when 23-bit address is used, address bits A16-A22 will be output to P2.0-P2.6 when ALE is High, and address bits A8-A14 are output to P2.0-P2.6 when ALE is Low. Address bit A15 is output on P2.7 regardless of ALE. P3.0 - P3.7 2001 Apr 06 11,13 -19 I/O Port 3: Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. Port 3 pins that have 1s written to them are pulled high by the internal pull-ups and can be used as inputs. As inputs, port 3 pins that are externally pulled low will source current because of the internal pull-ups. 11 I P3.0 RXD0 Serial input port 0 13 O P3.1 TXD0 Serial output port 0 14 I P3.2 INT0 External interrupt 0 15 I P3.3 INT1 External interrupt 1 16 I P3.4 T0 Timer0 external input 17 I P3.5 T1 Timer1 external input 18 O P3.6 WR External data memory write strobe 19 O P3.7 RD External data memory read strobe 7 Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM MNEMONIC PIN NO. P4.0 - P4.1 12,34 TYPE NAME AND FUNCTION I/O 12 I Port 4: Port 4 is an 8-bit bidirectional I/O port with internal pull-ups on all pin. Port 4 pins that have 1s written to them are pulled high by the internal pull-ups and can be used as inputs. As inputs, port 4 pins that are externally pulled low will source current because of the internal pull-ups. (Note: When SFR bit SPEN (SPCTL.6) is ’1’, the pull-ups at these port pins are disabled.) P4.0 I/O 34 O I P4.1 RXD1 Serial input port 1. (Note: This pin is a no connect pin on some derivatives.) (with pull-up on pin) MISO SPI Master In/Slave Out (Selected when SFR bit SPEN (SPCTL.6) is ’1’, in which case the pull-up for this pin is disabled) TXD1 Serial output port 1. (Note: This pin is a no connect pin on some derivatives.) (with pull-up on pin) SS SPI Slave Select (Selected when SFR bit SPEN (SPCTL.6) is ’1’, in which case the pull-up for this pin is disabled) RST 10 I Reset: A high on this pin for two machine cycles while the oscillator is running, resets the device. An internal diffused resistor to VSS permits a power-on reset using only an external capacitor to VDD. ALE 33 O Address Latch Enable: Output pulse for latching the low byte of the address during an access to external memory. In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency, and can be used for external timing or clocking. Note that one ALE pulse is skipped during each access to external data memory. If SFR bit AO (AUXR.0) is ’0’, ALE is emitted at the constant rate as indicated above. With this bit set to ’1’, ALE will be active only during a MOVX instruction. PSEN 32 O Program Store Enable: The read strobe to external program memory. When executing code from the external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory. PSEN is not activated during fetches from internal program memory. EA/Vpp 35 I External Access Enable/Programming Supply Voltage: EA must be externally held low to enable the device to fetch code from external program memory locations. If EA is held high, the device executes from internal program memory. The value on the EA pin is latched when RST is released and any subsequent changes have no effect. XTAL1 21 I Crystal 1: Input to the inverting oscillator amplifier and input to the internal clock generator circuits. XTAL2 20 O Crystal 2: Output from the inverting oscillator amplifier. VSS 22 I Ground: 0V reference. VDD 44 I Power Supply: This is the power supply voltage for normal operation as well as Idle and Power Down modes. (NC/VSS) 1 I No Connect/Ground: This pin is a no connect pin on some derivatives, but is internally connected to VSS on the P87C51Mx2. If connected externally, this pin must only be connected to the same V SS as at pin 22. (Note: Connecting the second pair of V SS and V DD pins is not required. However, they may be connected in addition to the primary VSS and VDD pins to improve power distribution, reduce noise in output signals, and improve system-level EMI characteristics.) (NC/VDD) 23 I No Connect/Power Supply: This pin is a no connect pin on some derivatives, but is internally connected to VDD on the P87C51Mx2. If connected externally, this pin must only be connected to the same VDD as at pin 44. (Note: Connecting the second pair of VSS and VDD pins is not required. However, they may be connected in addition to the primary VSS and VDD pins to improve power distribution, reduce noise in output signals, and improve system-level EMI characteristics.) 2001 Apr 06 8 Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM SPECIAL FUNCTION REGISTERS Note: Special Function Register (SFR) accesses are restricted in the following ways: 1. User must NOT attempt to access any SFR locations not defined. 2. SFR bits labeled ’-’, ’0’ or ’1’ can ONLY be written and read as follows: - ’-’ MUST be written with ’0’, but can return any value when read (even if it was written with ’0’). It is a reserved bit and may be used in future derivatives. - ’0’ MUST be written with ’0’, and will return a ’0’ when read. - ’1’ MUST be written with ’1’, and will return a ’1’ when read. Special Function Registers SYMBOL DESCRIPTION DIRECT ADDRESS BIT ADDRESS, SYMBOL, OR ALTERNATE PORT FUNCTION MSB E7 LSB E6 E5 E4 E3 E2 E1 Reset Value E0 ACC* Accumulator E0H AUXR# Auxiliary Function Register 8EH - - - - - - EXTRAM AO 00H% AUXR1# Auxiliary Function Register 1 A2H - - - LPEP GF2 0 - DPS 00H% F7 F6 F5 F4 F3 F2 F1 F0 B* B Register F0H BRGR0#§ Baud Rate Generator Rate Low 86H‡ BRATE11 BRATE10 BRATE9 BRATE8 BRATE7 BRATE6 BRATE5 BRATE4 00H BRGR1#§ Baud Rate Generator Rate High 87H‡ BRATE3 BRATE2 BRATE1 BRATE0 - - - - 00H% 85H‡ - - - - - - S0BRGS BRGEN 00H% BRGCON# Baud Rate Generator Control 00H 00H CCAP0H# Module 0 Capture High FAH XXH CCAP1H# Module 1 Capture High FBH XXH CCAP2H# Module 2 Capture High FCH XXH CCAP3H# Module 3 Capture High FDH XXH CCAP4H# Module 4 Capture High FEH XXH CCAP0L# Module 0 Capture Low EAH XXH CCAP1L# Module 1 Capture Low EBH XXH CCAP2L# Module 2 Capture Low ECH XXH CCAP3L# Module 3 Capture Low EDH XXH CCAP4L# Module 4 Capture Low EEH XXH CCAPM0# Module 0 Mode DAH - ECOM_0 CAPP_0 CAPN_0 MAT_0 TOG_0 PWM_0 ECCF_0 00H% CCAPM1# Module 1 Mode DBH - ECOM_1 CAPP_1 CAPN_1 MAT_1 TOG_1 PWM_1 ECCF_1 00H% CCAPM2# Module 2 Mode DCH - ECOM_2 CAPP_2 CAPN_2 MAT_2 TOG_2 PWM_2 ECCF_2 00H% CCAPM3# Module 3 Mode DDH - ECOM_3 CAPP_3 CAPN_3 MAT_3 TOG_3 PWM_3 ECCF_3 00H% CCAPM4# Module 4 Mode DEH - ECOM_4 CAPP_4 CAPN_4 MAT_4 TOG_4 PWM_4 ECCF_4 00H% 2001 Apr 06 9 Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM Special Function Registers (Continued) SYMBOL CCON# DESCRIPTION PCA Counter Control DIRECT ADDRESS D8H CH# PCA Counter High F9H CL# PCA Counter Low E9H CMOD# PCA Counter Mode D9H DPTR BIT ADDRESS, SYMBOL, OR ALTERNATE PORT FUNCTION MSB LSB DF DE DD DC DB DA D9 D8 CF CR - CCF4 CCF3 CCF2 CCF1 CCF0 Reset Value 00H% 00H 00H CIDL WDTE - - - CPS1 CPS0 ECF Data Pointer (2 bytes) 00H% 00H DPH Data Pointer High 83H 00H DPL Data Pointer Low 82H 00H EPL# Extended Data Pointer Low FCH‡ 00H EPM# Extended Data Pointer Middle FDH‡ 00H EPH# Extended Data Pointer High FEH‡ 00H IEN0* Interrupt Enable 0 AF IEN1* Interrupt Enable 1 IP0* Interrupt Priority IP0H Interrupt Priority 0 High A8H E8H AE AD AC AB AA A9 A8 ET1 EX1 ET0 EX0 EA EC ET2 ES0/ ES0R EF EE ED EC EB EA E9 E8 - - - - ESPI ES1T ES0T ES1/ ES1R BF BE BD BC BB BA B9 B8 PT1 PX1 PT0 PX0 00H 00H 00H% B8H - PPC PT2 PS0/ PS0R B7H - PPCH PT2H PS0H/ PS0RH PT1H PX1H PT0H PX0H FF FE FD FC FB FA F9 F8 F8H - - - - PSPI PS1T PS0T PS1/ PS1R 00H% F7H - - - - PSPIH PS1TH PS0TH PS1H/ PS1RH 00H% - - - - EAM ESMM EIFM 00H% IP1* Interrupt Priority 1 IP1H Interrupt Priority 1 High MXCON# MX Control Register FFH ‡ - 87 86 85 84 83 82 81 80 P0* Port 0 80H AD7 AD6 AD5 AD4 AD3 AD2 AD1 AD0 97 96 95 94 93 92 91 90 P1* Port 1 CEX3 CEX2/ SPICLK CEX1/ MOSI CEX0 ECI T2EX T2 2001 Apr 06 00H 90H CEX4 10 FFH FFH Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM Special Function Registers (Continued) SYMBOL DESCRIPTION P2* Port 2 P3* Port 3 DIRECT ADDRESS BIT ADDRESS, SYMBOL, OR ALTERNATE PORT FUNCTION MSB LSB Reset Value A7 A6 A5 A4 A3 A2 A1 A0 A0H AD15 AD14/ AD22 ADA13/ AD21 AD12/AD20 AD11/ AD19 AD10/ AD18 AD9/ AD17 AD8/ AD16 B7 B6 B5 B4 B3 B2 B1 B0 B0H RD WR T1 T0 INT1 INT0 TxD0 RxD0 C7‡ C6‡ C5‡ C4‡ C3‡ C2‡ C1‡ C0‡ C0H‡ - - - - - - TxD1/SS RxD1/ MISO FFH SMOD0 - POF GF1 GF0 PD IDL 00H/10H& P4*# Port 4 PCON# Power Control Register 87H SMOD1 D7 D6 D5 D4 D3 D2 D1 D0 PSW* Program Status Word D0H CY AC F0 RS1 RS0 OV F1 P RCAP2H# Timer2 Capture High CBH RCAP2L# Timer2 Capture Low CAH FFH FFH 00H 00H 00H 9F 9E 9D 9C 9B 9A 99 98 SM0_0/ FE_0 SM1_0 SM2_0 REN_0 TB8_0 RB8_0 TI_0 RI_0 S0CON* Serial Port 0 Control S0BUF Serial Port 0 Data Buffer Register 99H xxH S0ADDR Serial Port 0 Address Register A9H 00H S0ADEN Serial Port 0 Address Enable B9H S0STAT# Serial Port 0 Status S1CON#* 98H ‡ 8CH 00H 00H DBMOD_ 0 INTLO_0 87‡ 86‡ 85‡ SM0_1/ FE_1 SM1_1 SM2_1 CIDIS_0 DBISEL_0 FE_0 BR_0 OE_0 STINT_0 84‡ 83‡ 82‡ 81‡ 80‡ REN_1 TB8_1 RB8_1 TI_1 RI_1 00H% Serial Port 1 Control 80H‡ S1BUF# Serial Port 1 Data buffer Register 81H‡ XXH S1ADDR# Serial Port 1 Address Register 82H‡ 00H ‡ 00H S1ADEN# Serial Port 1 Address Enable 83H S1STAT# Serial Port 1 Status 84H‡ SP Stack Pointer (or Stack Pointer Low Byte When EDATA Supported) 81H SPCTL# SPI Control Register E2H SSIG SPEN DORD MSTR CPOL CPHA - - 00H% SPCFG# SPI Configuration Register E1H SPIF SPWCOL - - PSC3 PSC2 PSC1 PSC0 00H% SPDAT# SPI Data E3H 00H SPE# Stack Pointer High FBH‡ 00H 2001 Apr 06 00H DBMOD_ INTLO_1 1 CIDIS_1 DBISEL1 FE_1 BR_1 OE_1 STINT_1 00H% 08H 11 Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM Special Function Registers (Continued) SYMBOL DESCRIPTION BIT ADDRESS, SYMBOL, OR ALTERNATE PORT FUNCTION DIRECT ADDRESS MSB LSB Reset Value 8F 8E 8D 8C 8B 8A 89 88 TCON* Timer Control Register 88H TF1 TR1 TF0 TR0 IE1 IT1 IE0 IT0 CF CE CD CC CB CA C9 C8 T2CON#* Timer2 Control Register C8H TF2 EXF2 RCLK TCLK EXEN2 TR2 C/T2 CP/RL2 00H T2MOD# Timer2 Mode Control C9H - - - - - - T2OE DCEN 00H% TH0 Timer 0 High 8CH 00H TH1 Timer 1 High 8DH 00H TH2 Timer 2 High CDH 00H TL0 Timer 0 Low 8AH 00H TL1 Timer 1 Low 8BH 00H TL2 Timer 2 Low CCH 00H TMOD Timer 0 and 1 Mode 89H WDTRST# Watchdog Timer Reset A6H WDCON# 8FH‡ Watchdog Timer Control GATE C/T M1 M0 GATE C/T M1 M0 00H 00H FFH - - - - - WDPRE2 WDPRE1 WDPRE0 00H% Notes: * SFRs are bit addressable. # SFRs are modified from or added to the 80C51 SFRs. ‡ Extended SFRs accessed by preceeding the instruction with 51MX escape (opcode A5h). - Reserved bits, must be written with 0’s. & Power on reset is 10H. Other reset is 00H. § BRGR1 and BRGR0 must only be written if BRGEN in BRGCON SFR is ’0’. If any of them is written if BRGEN = 1, result is unpredictable. % The unimplemented bits (labeled ’-’) in the SFRs are ’X’s (unknown) at all times. ’1’s should NOT be written to these bits, as they may be used for other purposes in future derivatives. The reset values shown for these bits are ’0’s although they are unknown when read. 2001 Apr 06 12 Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM FUNCTIONAL DESCRIPTION The following paragraphs briefly describe the features of the P87C51Mx2. For more detailed information, please refer to the P87C51Mx2 User Manual or the 51MX Architecture Reference. INTERRUPTS Table 1 summarizes the interrupt sources, flag bits, vector addresses, enable bits, priority bits, polling priority, and whether each interrupt may wake up the CPU from Power Down mode. Interrupt Flag Bit(s) Vector Address Interrupt Enable Bit(s) Interrupt Priority Polling Priority Power Down Wakeup External Interrupt 0 IE0 0003h EX0 (IEN0.0) IP0H.0, IP0.0 1 (highest) Yes Timer 0 Interrupt TF0 000Bh ET0 (IEN0.1) IP0H.1, IP0.1 2 No Description External Interrupt 1 IE1 0013h EX1 (IEN0.2) IP0H.2, IP0.2 3 Yes Timer 1 Interrupt TF1 001Bh ET1 (IEN0.3) IP0H.3, IP0.3 4 No 0023h ES0(IEN0.4) IP0H.4, IP0.4 6 No Serial Port 0 Tx and Serial Port 0 Rx1,5 Rx1,5 TI_0 & RI_05 RI_05 Timer 2 Interrupt TF2, EXF2 002Bh ET2 (IEN0.5) IP0H.5, IP0.5 7 No PCA interrupt CF, CCFn* 0033h EC (IEN0.6) IP0H.6, IP0.6 5 No 0053h ES1 (IEN1.0) IP1H.0, IP1.0 11 No Serial Port 1 Tx and Serial Port 1 Rx2,6 Rx2,6 TI_1 & RI_16 RI_16 Serial Port 0 Tx3 TI_0 003Bh EI10 (IEN1.1) IP1H.1, IP1.1 8 No Serial Port 1 Tx4 TI_1 0043h EI11 (IEN1.2) IP1H.2, IP1.2 9 No SPI Interrupt SPI 004Bh EI11 (IEN1.3) IP1H.3, IP1.3 10 No 005Bh EI12 (IEN1.4) IP1H.4, IP1.4 12 No Reserved 0063h EI13 (IEN1.5) IP1H.5, IP1.5 13 No 006Bh EI13 (IEN1.6) IP1H.6, IP1.6 14 No 0073h EI14 (IEN1.7) IP1H.7, IP1.7 15 (lowest) No 1. S0STAT.5 = 0 selects combined Serial Port 0 Tx and Rx interrupt; S0STAT.5 = 1 selects Serial Port 0 Rx interrupt only (and TX interrupt will be different, see Note 3 below). 2. S1STAT.5 = 0 selects combined Serial Port 1 Tx and Rx interrupt; S1STAT.5 = 1 selects Serial Port 1 Rx interrupt only (and TX interrupt will be different, see Note 4 below). 3. This interrupt is used as Serial Port 0 Tx interrupt if and only if S0STAT.5 = 1, and is disabled otherwise. 4. This interrupt is used as Serial Port 1 Tx interrupt if and only if S1STAT.5 = 1, and is disabled otherwise. 5. If S0STAT.0 = 1, the following Serial Port 0 additional flag bits can cause this interrupt: FE_0, BR_0, OE_0. 6. If S1STAT.0 = 1, the following Serial Port 1 additional flag bits can cause this interrupt: FE_1, BR_1, OE_1. Table 1: Summary of Interrupts 2001 Apr 06 13 Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM DATA RAM The P87C51MB2 and P87C51MC2 have 2 Kbytes and 3 K bytes of on-chip RAM respectively. Usages of the different data segments are described in the 51MX Architecture Reference. Data Memory Type Size (in Bytes) Description P87C51MB2 P87C51MC2 DATA memory that can be addressed directly and indirectly 128 128 IDATA memory that can be addressed indirectly (where direct address is for SFR only) 128 128 EDATA memory that can only be addressed indirectly 1024 1024 XDATA memory (on-chip "External Data") that is accessed using the MOVX instructions 768 1792 2048 3072 Total Table 2: On-Chip Data Memory Usage. PORT 4 The P87C51Mx2 has a fifth I/O port (Port 4) that is shared with the second UART pins (RXD1 and TXD1) and two of the SPI pins (MISO and SS). This port is also bit addressable and can be accessed in the same manner as any other ports, except that the associated SFR is in the extended SFR space. Accesses to this SFR space is the same as those to the conventional SFR space except that the instructions must be preceeded by an escape code (A5h), as described in the 51MX Architecture Reference. LOW POWER MODES The P87C51Mx2 supports the standard 51MX low power modes - Stop Clock Mode, Idle Mode and Power-Down Mode. The PCON register is the same as the standard 51MX PCON register. Note that bits PCON.7 and PCON.6 are for UART configurations (see section "UARTs"). ONCE™ MODE The ONCE (“On-Circuit Emulation”) Mode facilitates testing and debugging of systems without the device having to be removed from the circuit. It is supported in the P87C51Mx2. PERIPHERALS The P87C51Mx2 peripherals are described in more detail in the User Manual. The on-chip peripherals include: • Timers: - Timers 0 and 1. - Timer 2. Note: When Timer 1 or Timer 2 can only be used as a baud rate generator for UART 0, but not for UART 1. • Two enhanced UARTs with an independent Baud Rate Generator - The section "UARTs" provides information regarding the two UARTs. Note: UART 1 shares the RXD1 and TXD1 with the SPI pins. The SPEN (SPCTL.6) bit must be cleared ’0’ (reset value) to enable UART 1 operation. • Serial Peripheral Interface (SPI). Note: The SPI shares pins with the UART 1 shares the RXD1 and TXD1 with the SPI pins. The SPEN (SPCTL.6) bit must be set to ’1’ to enable SPI operation. • Watchdog Timer. • Programmable Counter Array (PCA). 2001 Apr 06 14 Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM UARTS P87C51Mx2 includes two enhanced UART ports with one independent Baud Rate Generator: • UART 0 is the standard 51MX enhanced UART as described in the User Manual. It can be selected to use Timer1 overflow, Timer2 overflow or the independent Baud Rate Generator. • UART 1 only uses the independent Baud Rate Generator to generate its baud rate. It has the same baud rate for both transmission and reception. • The Baud Rate Generator is described in the User Manual. Each of the UARTs has one set of enhanced UART SFRs. Please refer to the descriptions on the corresponding SFRs in the User Manual: Register Description SFR Location 51MX Extended SFR Location See Description in User Manual on S0CON Serial Port 0 Control 98H SCON S0BUF Serial Port 0 Data Buffer 99H SBUF S0ADDR Serial Port 0 Address A9H SADDR S0ADEN Serial Port 0 Address Enable B9H SADEN S0STAT Serial Port 0 Status 8CH SSTAT S1CON Serial Port 1 Control 80H SCON S1BUF Serial Port 1 Data Buffer 81H SBUF S1ADDR Serial Port 1 Address 82H SADDR S1ADEN Serial Port 1 Address Enable 83H SADEN S1STAT Serial Port 1 Status 84H SSTAT Table 3: UARTs 0 and 1 SFRs. PCON.7 and PCON.6 SFR Bits The PCON.7 and PCON.6 SFR bits configure the UARTs as follows: • PCON.7 (SMOD1) - Baud Rate Control bit for serial port 0. When 0, the baud rate for UART 0 will be the input rate (T1 timer or baud rate generator, as determined by the BRGCON extended SFR) divided by two. When 1, the baud rate for UART 0 will be the input rate (T1 timer or baud rate generator). UART 1 is not affected by this bit • PCON.6 (SMOD0) - Framing Error Location: - When 0, bit 7 of S0CON and S1CON will function as SM0 for UARTs 0 and 1 respectively. - When 1, bit 7 of S0CON and S1CON will be used for framing error status for UART 0 and 1 respectively. PCON.6 also determines when the UART receive interrupts RI_0 and RI_1 occur in UART modes 2 or 3. (Refer to User Manual for details.) 2001 Apr 06 15 Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM Baud Rate Selection UART 0 and UART 1 selects the baud rate differently as shown in Tables 4 and 5: S0CON.7 (SM0_0) S0CON.6 (SM1_0) T2CON.5/4 (RCLK - Receive TCLK - Transmit) PCON.7 (SMOD1) BRGCON.1 (S0BRGS) Receive/Transmit Baud Rate for UART 0 0 0 X X X fOSC/6 0 0 X T1_rate/32* 0 1 X T1_rate/16* 1 X 0 T2_rate/16* 1 X 1 fOSC/(BRATE×16+16)* X 0 X fOSC/32 X 1 X fOSC/16 0 0 X T1_rate/32* 0 1 X T1_rate/16* 1 X 0 T2_rate/16* 1 X 1 fOSC/(BRATE×16+16)* 0 1 1 1 0 1 * UART 0 can have different receive and transmit baud rates. Table 4: Baud Rate Generation for UART 0. Use T2CON.5 (RCLK) in Receive Baud Rate Selection, T2CON.4 (TCLK) in Transmit Baud Rate Selection S1CON.7 (SM0_1) S1CON.6 (SM1_1) Baud Rate for UART 1 0 0 fOSC/6 0 1 fOSC/(BRATE×16+16)* 1 0 fOSC/(BRATE×16+16)* 1 1 fOSC/(BRATE×16+16)* * UART 1 has the same receive and transmit baud rate. Table 5: Baud Rate Generation for UART 1. 2001 Apr 06 16 Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM SECURITY BITS The P87C51Mx2 has security bits to protect users’ firmware codes. With none of the security bits programmed, the code in the program memory can be verified. With only security bit 1 (see Table 6) is programmed, MOVC instructions executed from external program memory are disabled from fetching code bytes from the internal memory. EA is latched on Reset and all further programming of EPROM is disabled. When security bits 1 and 2 are programmed, in addition to the above, verify mode is disabled. When all three security bits are programmed, all of the conditions above apply and all external program memory execution is disabled. Security Bits1,2 Bit 1 Bit 2 Bit 3 1 U U U Protection Description No program security features enabled. EEPROM is programmable and verifiable. 2 P U U MOVC instructions executed from external program memory are disabled from fetching code bytes from internal memory, EA is sampled and latched on Reset, and further programming of the EPROM is disabled. 3 P P U Same as 2, also verification is disabled. 4 P P P Same as 3, external execution is disabled. Notes: 1. P - programmed. U- unprogrammed. 2. Any other combination of security bits is not defined. Table 6: EPROM Security Bits 2001 Apr 06 17 Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM ABSOLUTE MAXIMUM RATINGS PARAMETER RATING UNIT Operating temperature under bias -55 to +125 °C Storage temperature range -65 to +150 °C Voltage on EA/VPP pin to VSS 0 to + 13.0 V Voltage on any other pin to VSS -0.5 to VDD+0.5V V Maximum IOL per I/O pin 20 mA Power dissipation (based on package heat transfer, not device power consumption) 1.5 W Notes: 1. Stresses above those listed under Absolute Maximum Ratings may cause permanent damage to the device. This is a stress rating only and functional operation of the device at these or any conditions other than those described in the AC and DC Electrical Characteristics section of this specification are not implied. 2. This product includes circuitry specifically designed for the protection of its internal devices from the damaging effects of excessive static charge. Nonetheless, it is suggested that conventional precautions be taken to avoid applying greater than the rated maximum. 3. Parameters are valid over operating temperature range unless otherwise specified. All voltages are with respect to VSS unless otherwise noted. 2001 Apr 06 18 Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM DC ELECTRICAL CHARACTERISTICS VDD = 2.7V to 5.5V unless otherwise specified; Tamb = 0 to +70°C for commercial, unless otherwise specified. SYMBOL PARAMETER TEST CONDITIONS VIL Input low voltage VIH Input high voltage (ports 0, 1, 2, 3, 4, EA) VIH1 Input high voltage, XTAL1, RST VOL VOL1 VOH VOH1 IIL ITL IL1 Output low voltage, ports 1, 2, 3, 4 Output low voltage, port 0, ALE, PSEN7,8 8 Output high voltage, ports 1, 2, 3, 4 LIMITS TYP1 UNIT -0.5 MAX 0.2VDD-0.1 0.2VDD+0.9 VDD+0.5 V 0.7VDD VDD+0.5 V VDD = 2.7V, IOL = 1.6mA 0.4 V VDD = 2.7V, IOL = 3.2mA 0.4 V VDD = 4.5V, IOH = -30µA VDD = 2.7V, IOH = -10µA Output high voltage (port 0 in VDD = 2.7V, IOH = -3.2mA external bus mode), ALE9, PSEN3 Logical 0 input current, ports 1, 2, VIN = 0.4V 3, 4 4.5V < VDD < 5.5V, Logical 1 -to-0 transition current, VIN = 2.0V, See Note 4 ports 1, 2, 3, 48 0.45 < VIN < VDD-0.3 Input leakage current, port 0 MIN V VDD - 0.7 V VDD - 0.7 V -1 -75 µA -650 µA ±10 µA Power supply current VDD = 5.5V 7+ 2.7 /MHz × fOSC VDD = 3.6V 4+ 1.3 /MHz × fOSC VDD = 5.5V 4+ 1.3 /MHz × fOSC VDD = 3.6V 1+ 1.0 /MHz × fOSC Active mode (see Note 5) ICC Idle mode (see Note 5) Power-down mode or clock stopped (see Figure 16 for conditions) RRST C10 VDD = 5.0V VDD = 5.5V Internal reset pull-down resistor Pin capacitance10 (except 20 40 EA) mA mA µA 100 µA 225 kΩ 15 pF Notes: 1. Typical ratings are not guaranteed. The values listed are at room temperature (+25°C), 5V, unless otherwise stated. 2. Capacitive loading on ports 0 and 2 may cause spurious noise to be superimposed on the VOL of ALE and ports 1, 3 and 4. The noise is due to external bus capacitance discharging into the port 0 and port 2 pins when these pins make 1-to-0 transitions during bus operations. In the worst cases (capacitive loading>100 pF), the noise pulse on the ALE pin may exceed 0.8 V. In such cases, it may be desirable to qualify ALE with a Schmitt Trigger, or use an address latch with a Schmitt Trigger STROBE input. IOL can exceed these conditions provided that no single output sinks more than 5mA and no more than two outputs exceed the test conditions. 3. Capacitive loading on ports 0 and 2 may cause the VOH on ALE and PSEN to momentarily fall below the VDD-0.7V specification when the address bits are stabilizing. 4. Pins of ports 1, 2, 3 and 4 source a transition current when they are being externally driven from 1 to 0. The transition current reaches its maximum value when VIN is approximately 2 V for 4.5V < VDD < 5.5V. 5. See Figures 13 through 16 for ICC test conditions. fOSC is the oscillator frequency in MHz. 6. This value applies to Tamb = 0°C to +70°C. 2001 Apr 06 19 Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM 7. Load capacitance for port 0, ALE, and PSEN = 100 pF, load capacitance for all other outputs = 80pF 8. Under steady state (non-transient) conditions, IOL must be externally limited as follows: Maximum IOL per port pin: 15 mA Maximum IOL per 8-bit port: 26 mA Maximum total IOL for all outputs: 71 mA If IOL exceeds the test condition, VOL may exceed the related specification. Pins are not guaranteed to sink current greater than the listed test conditions. 9. ALE is tested to VOH1, except when ALE is off then VOH is the voltage specification. 10. Pin capacitance is characterized but not tested. 2001 Apr 06 20 Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM AC ELECTRICAL CHARACTERISTICS Tamb = 0 to +70°C for commercial unless otherwise specified.1,2,3 2.7V < VDD < 5.5V SYMBOL FIGURE(S) fOSC PARAMETER Oscillator frequency tCLCL 15 CLock cycle tLHLL 1,2 ALE pulse width Variable Clock 4 MIN MAX 0 12 4.5V < VDD < 5.5V fOSC=12MHz4 MIN MAX Variable Clock4 MIN MAX 0 24 83 fOSC=24MHz4 MIN MHz 41.5 ns tCLCL-66 16 tCLCL-33 8 ns ns tAVLL 1,2,3, 4,5,6 Address valid to ALE low tCHCX-25 8 tCHCX-12 4 tLLAX 1,2,3, 4,5,6 Address hold after ALE low tCLCX-25 8 tCLCX-12 4 tLLIV 1,2 ALE low to valid instruction in tLLPL 1,2 ALE low to PSEN low tPLPH 1,2 PSEN pulse width tPLIV 1,2 PSEN low to valid instruction in tPXIX 1,2 Input instruction hold after PSEN tPXIZ 1,2 Input instruction float after PSEN UNIT MAX 2tCLCL-108 tCLCX-25 tCLCL+tCHCX -66 ns 29 ns 8 tCLCX-12 4 ns 50 tCLCL+tCHCX -33 25 ns tCLCL +tCHCX-91 0 2tCLCL-54 58 tCLCL +tCHCX-46 25 0 tCLCX-25 0 12 0 ns ns 8 tCLCX-12 4 ns 180 2tCLCL +tCHCX-28 81 ns tAVIV 1 Address (A8-A15) to valid instruction in (non-Extended Addressing Mode) 2tCLCL +tCHCX-36 tAVIV1 2 Address (A8-A15) to valid instruction in (Extended Addressing Mode) tCLCL +tCHCX-44 89 2tCLCL +tCHCX-34 33 ns tPLAZ 1,2 PSEN low to address float 16 16 8 8 ns 3,4 RD pulse width 3tCLCL-166 83 3tCLCL-83 41.5 ns WR pulse width 3tCLCL-166 83 3tCLCL-83 41.5 ns Data Memory tRLRH tWLWH 5,6 tRLDV 3,4 RD low to valid data in tRHDX 3,4 Data hold after RD tRHDZ 3,4 Data float after RD tLLDV 3,4 2tCLCL +tCHCX-141 0 2tCLCL +tCHCX-70 58 0 0 29 0 ns ns tCLCL-34 49 tCLCL-17 24 ns ALE low to valid data in 4tCLCL-250 83 4tCLCL-125 41 ns 4tCLCL +tCHCX-36 346 4tCLCL +tCHCX-28 164 ns 3tCLCL +tCHCX-44 255 3tCLCL +tCHCX-34 116 ns tCLCL +tCLCX+83 208 tCLCL +tCLCX+41 104 ns tAVDV 3 Address (A8-A15) to valid data in (non-Extended Addressing Mode) tAVDV1 4 Address (A8-A15) to valid data in (Extended Addressing Mode) tLLWL 3,4, 5,6 tAVWL ALE low to RD or WR low tCLCL +tCLCX-83 3,5 Address (A8-A15) valid to WR or RD low (non-Extended Addressing Mode) 2tCLCL-15 151 2tCLCL-20 63 ns tAVWL1 4,6 Address (A8-A15) valid to WR or RD low (Extended Addressing Mode) tCLCL-20 63 tCLCL-25 16.5 ns tQVWX 5,6 Data valid to WR transition tCLCX-33 0 tCLCX-16 0 ns tWHQX 5,6 Data hold after WR tCHCX-24 9 tCHCX-11 5 ns 75 3tCLCL +tCLCX-103 37.5 ns tQVWH 5,6 Data valid to WR high tRLAZ 3,4 RD low to address float tWHLH 3,4, 5,6 RD or WR high to ALE high 3tCLCL +tCLCX-207 0 tCHCX-24 tCHCX+25 tCLCL +tCLCX-41 0 9 75 0 tCHCX-11 tCHCX+12 0 ns 5 37 ns External Clock tCHCX 12 High time 33 tCLCL-tCLCX 33 50 16 tCLCL-tCLCX 16 24.5 ns tCLCX 12 Low time 33 tCLCL-tCHCX 33 50 16 tCLCL-tCHCX 16 24.5 ns tCLCH 12 Rise time 8 8 4 4 ns tCHCL 12 Fall Time 8 8 4 4 ns 2001 Apr 06 21 Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM 2.7V < VDD < 5.5V SYMBOL FIGURE(S) PARAMETER Variable MIN Clock4 MAX 4.5V < VDD < 5.5V fOSC=12MHz4 MIN MAX Variable Clock4 MIN MAX fOSC=24MHz4 MIN UNIT MAX Shift Register tXLXL 7 Serial port clock cycle time tQVXH 7 Output data setup to clock rising edge tXHQX 7 Output data hold after clock rising edge tXHDX 7 Input data hold after clock rising edge tXHDV 7 Clock rising edge to input data valid 6tCLCL 500 6tCLCL 250 ns 5tCLCL-221 195 5tCLCL-110 98 ns tCLCL-50 34 tCLCL-25 17 ns 0 0 0 0 ns 5tCLCL-222 5tCLCL-111 195 97 ns MHz SPI Interface Operating frequency fSPI - 3.0MHz 0 3.0 0 3.0 0 3.0 0 3.0 - 6.0MHz - - - - 0 6.0 0 6.0 Cycle time tSPICYC 8, 9, 10, 11 - 3.0MHz 333 333 333 333 - - 166 166 - 3.0MHz TBD TBD TBD TBD - 6.0MHz - - TBD TBD - 3.0MHz TBD TBD TBD TBD - 6.0MHz - - TBD TBD TBD TBD TBD TBD TBD TBD TBD TBD TBD TBD TBD TBD TBD TBD TBD TBD TBD TBD TBD - 6.0MHz ns Enable lead time (Slave) tSPILEAD 10, 11 ns Enable lag time (Slave) tSPILAG 10, 11 ns SPICLK high time tSPICLKH 8, 9, 10, 11 - Master - Slave ns SPICLK low time tSPICLKL 8, 9, 10, 11 - Master - Slave tSPIDSU 8, 9, 10, 11 Data setup time (Master or Slave) TBD tSPIDH 8, 9, 10, 11 Data hold time (Master or Slave) TBD tSPIA 10, 11 Access time (Slave) TBD TBD ns ns TBD ns TBD TBD TBD TBD ns - 3.0MHz TBD TBD TBD TBD ns - 6.0MHz TBD TBD TBD TBD TBD TBD TBD TBD - - TBD TBD Disable time (Slave) tSPIDIS 10, 11 Enable to output data valid tSPIDV 8, 9, 10, 11 - 3.0MHz - 6.0MHz tSPIOH 8, 9, 10, 11 Output data hold time 0 0 0 0 ns ns Rise time tSPIR 8, 9, 10, 11 - SPI outputs (SPICLK,MOSI, MISO) - SPI inputs (SPICLK,MOSI, MISO, SS) TBD TBD TBD TBD TBD TBD TBD TBD TBD TBD TBD TBD TBD TBD TBD TBD ns Fall time tSPIF 8, 9, 10, 11 - SPI outputs (SPICLK,MOSI, MISO) - SPI inputs (SPICLK,MOSI, MISO, SS) ns Notes: 1. Parameters are valid over operating temperature range unless otherwise specified. 2. Load capacitance for port 0, ALE, and PSEN = 100pF, load capacitance for all other outputs = 80pF. 3. Interfacing the microcontroller to devices with float times up to 45ns is permitted. This limited bus contention will not cause damage to Port 0 drivers. 4. Parts are tested down to 2 MHz, but are guaranteed to operate down to 0Hz. 2001 Apr 06 22 Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM EXPLANATION OF AC SYMBOLS Each timing symbol has five characters. The first character is always ‘t’ (= time). The other characters, depending on their positions, indicate the name of a signal or the logical status of that signal. The designations are: A – Address C – Clock D – Input data H – Logic level high I – Instruction (program memory contents) L – Logic level low, or ALE P – PSEN Q – Output data R – RD signal t – Time V – Valid W– WR signal X – No longer a valid logic level Z – Float Examples: tAVLL - Time for address valid to ALE low. tLLPL - Time for ALE low to PSEN low tLHLL ALE tLLPL tPLPH tLLIV PSEN tPLIV tAVLL tLLAX PORT 0 tPLAZ tPXIZ tPXIX A0-A7 INSTR IN A0-A7 tAVIV PORT 2 P2.0-P2.7 OR A8-A15 Figure 1: External Program Memory Read Cycle (Non-Extended Memory Cycle) 2001 Apr 06 23 Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM tLHLL ALE tLLPL tPLPH tLLIV PSEN tPLIV PORT 0 tPXIZ tPLAZ tAVLL tLLAX tPXIX A0-A7 INSTR IN A0-A7 tAVIV1 PORT 2 A16-A22,P2.7 A8-A15 Figure 2: External Program Memory Read Cycle (Extended Memory Cycle) ALE tWHLH PSEN tLLDV tLLWL tRLRH RD tLLAX tAVLL PORT 0 tRLAZ tRLDV tRHDZ tRHDX A0-A7 DATA in A0-A7 FROM PCL tAVWL tAVDV PORT 2 P2.0-P2.7 OR A8-A15 Figure 3: External Data Memory Read Cycle (Non-Extended Memory Cycle) 2001 Apr 06 24 INSTR IN Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM ALE tWHLH PSEN tLLDV tLLWL tRLRH RD tLLAX tAVLL PORT 0 tRLAZ tRHDZ tRLDV tRHDX A0-A7 DATA in A0-A7 FROM PCL INSTR IN tAVWL1 tAVDV1 PORT 2 A16-A22,P2.7 A8-A15 Figure 4: External Data Memory Read Cycle (Extended Memory Cycle) ALE tWHLH PSEN tLLWL tWLWH WR tLLAX tAVLL PORT 0 tQVWX tQVWH A0-A7 DATA OUT tWHQX A0-A7 FROM PCL tAVWL PORT 2 P2.0-P2.7 OR A8-A15 Figure 5: External Data Memory Write Cycle (Non-Extended Memory Cycle) 2001 Apr 06 25 INSTR IN Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM ALE tWHLH PSEN tLLWL tWLWH WR tLLAX tAVLL PORT 0 tQVWX tWHQX tQVWH A0-A7 DATA OUT A0-A7 FROM PCL INSTR IN tAVWL1 PORT 2 A16-A22,P2.7 A8-A15 Figure 6: External Data Memory Write Cycle (Extended Memory Cycle) INSTRUCTION 0 1 2 3 4 5 6 7 8 ALE tXLXL CLOCK tXHQX tQVXH OUTPUT DATA 0 1 2 3 4 5 6 7 WRITE TO SBUF tXHDX SET TI tXHDV INPUT DATA VALID VALID VALID VALID VALID VALID VALID VALID CLEAR RI SET RI Figure 7: Shift Register Mode Timing 2001 Apr 06 26 Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM SS tSPICYC tSPIF tSPICLKL tSPIR tSPICLKH SPICLK (CPOL = 0) (output) tSPIF tSPICLKL tSPIR tSPICLKH SPICLK (CPOL = 1) (output) tSPIDSU MISO (input) tSPIDH MSB/LSB in tSPIDV tSPIOH tSPIF MOSI (output) LSB/MSB in tSPIDV Master MSB/LSB out tSPIR Master LSB/MSB out Figure 8: SPI Master Timing (CPHA = 0) SS tSPIF tSPICLKL tSPICYC tSPIR tSPICLKH SPICLK (CPOL = 0) (output) tSPIF tSPICLKH tSPICLKL tSPIR SPICLK (CPOL = 1) (output) tSPIDSU MISO (input) tSPIDH MSB/LSB in tSPIDV tSPIOH tSPIF MOSI (output) LSB/MSB in Master MSB/LSB out Master LSB/MSB out Figure 9: SPI Master Timing (CPHA = 1) 2001 Apr 06 tSPIDV 27 tSPIDV tSPIR Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM SS tSPICYC tSPIR tSPILEAD tSPIF tSPICLKL tSPIR tSPIR tSPILAG tSPICLKH SPICLK (CPOL = 0) (input) tSPIF tSPICLKL tSPIR tSPICLKH SPICLK (CPOL = 1) (input) tSPIOH tSPIDV tSPIA MISO (output) tSPIOH tSPIDV Slave MSB/LSB out tSPIDSU MOSI (input) Slave LSB/MSB out tSPIDH tSPIDSU tSPIDSU MSB/LSB in tSPIDIS tSPIOH Not defined tSPIDH LSB/MSB in Figure 10: SPI Slave Timing (CPHA = 0) SS tSPIR tSPILEAD tSPICYC tSPIF tSPICLKL tSPIR tSPIR tSPILAG tSPICLKH SPICLK (CPOL = 0) (input) tSPIF tSPICLKL tSPIR tSPICLKH SPICLK (CPOL = 1) (input) tSPIOH tSPIDV tSPIA MISO (output) Not defined tSPIOH tSPIDV Slave MSB/LSB out tSPIDSU MOSI (input) Slave LSB/MSB out tSPIDH tSPIDSU MSB/LSB in tSPIDSU tSPIDH LSB/MSB in Figure 11: SPI Slave Timing (CPHA = 1) 2001 Apr 06 tSPIDIS tSPIOH tSPIDV 28 Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM VDD-0.5V 0.7VDD 0.2VDD-0.1V 0.45V tCHCL tCHCX tCLCH tCLCX tCLCL Figure 12: External Clock Drive VDD VDD ICC RST VDD VDD P0 EA (NC) XTAL2 CLOCK SIGNAL XTAL1 VSS Figure 13: ICC Test Condition, Active Mode (All other pins are disconnected) 2001 Apr 06 29 Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM VDD ICC RST VDD VDD P0 EA (NC) XTAL2 CLOCK SIGNAL XTAL1 VSS Figure 14: ICC Test Condition, Idle Mode (All other pins are disconnected) VDD-0.5V 0.45V 0.7VDD 0.2VDD-0.1V tCHCL tCHCX tCLCH tCLCX tCLCL Figure 15: Clock Signal Waveform for ICC Tests in Active and Idle Modes tCLCH = tCHCL = 5ns 2001 Apr 06 30 Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory P87C51MB2/P87C51MC2 64KB/96KB OTP with 2KB/3KB RAM VDD ICC RST VDD VDD P0 EA (NC) XTAL2 XTAL1 VSS Figure 16: ICC Test Condition, Power Down Mode (All other pins are disconnected, VDD = 2.0V to 5.5V) 2001 Apr 06 31 Philips Semiconductors Preliminary specification 80C51 8-bit microcontroller family with extended memory 64KB/96KB OTP with 2KB/3KB RAM P87C51MB2/P87C51MC2 Data sheet status Data sheet status Product status Definition [1] Objective specification Development This data sheet contains the design target or goal specifications for product development. Specification may change in any manner without notice. Preliminary specification Qualification This data sheet contains preliminary data, and supplementary data will be published at a later date. Philips Semiconductors reserves the right to make changes at any time without notice in order to improve design and supply the best possible product. Product specification Production This data sheet contains final specifications. Philips Semiconductors reserves the right to make changes at any time without notice in order to improve design and supply the best possible product. [1] Please consult the most recently issued datasheet before initiating or completing a design. Definitions Short-form specification — The data in a short-form specification is extracted from a full data sheet with the same type number and title. For detailed information see the relevant data sheet or data handbook. Limiting values definition — Limiting values given are in accordance with the Absolute Maximum Rating System (IEC 134). Stress above one or more of the limiting values may cause permanent damage to the device. These are stress ratings only and operation of the device at these or at any other conditions above those given in the Characteristics sections of the specification is not implied. Exposure to limiting values for extended periods may affect device reliability. Application information — Applications that are described herein for any of these products are for illustrative purposes only. Philips Semiconductors make no representation or warranty that such applications will be suitable for the specified use without further testing or modification. Disclaimers Life support — These products are not designed for use in life support appliances, devices or systems where malfunction of these products can reasonably be expected to result in personal injury. Philips Semiconductors customers using or selling these products for use in such applications do so at their own risk and agree to fully indemnify Philips Semiconductors for any damages resulting from such application. Right to make changes — Philips Semiconductors reserves the right to make changes, without notice, in the products, including circuits, standard cells, and/or software, described or contained herein in order to improve design and/or performance. Philips Semiconductors assumes no responsibility or liability for the use of any of these products, conveys no license or title under any patent, copyright, or mask work right to these products, and makes no representations or warranties that these products are free from patent, copyright, or mask work right infringement, unless otherwise specified. Copyright Philips Electronics North America Corporation 2001 All rights reserved. Printed in U.S.A. Philips Semiconductors 811 East Arques Avenue P.O. Box 3409 Sunnyvale, California 94088–3409 Telephone 800-234-7381 Date of release: 04-01 Document order number: yyyy mmm dd 4 9397 750 08199 Philips Semiconductors Errata P87C51MB2/P87C51MC2 Errata sheet FUNCTIONAL DEVIATIONS Deviation #1 RxD1 pin is an open drain configuration. Work-around: A resistor must be used if this pin is to be used as an output. These pins will become port 4 on the next release fixing this issue. Deviation #2 Port 4 does not exist for the RxD1 and TxD1 pins. DC parameters differ from standard port pins. Work-around: None. These pins will become port 4 on the next release. Deviation #3 RxD1, TxD1, and ALE pins will not go into once mode. Work-around: None. This will be fixed on the next release. Deviation #4 In the UART, the contents of RB8 and SBUF change when they shouldn’t if SM2=1 in modes 2 and 3. Work-around: None. Will be fixed on the next release. Deviation #5 The UART double buffering will be implemented on the next release. Work-around: None. Deviation #6 SPI block will be implemented on the next release. Work-around: None. Deviation #7 Security bits are not 100% compatible with past 80c51 products. Work-around: The security bits will be compatible on the next release. 2001 Apr 06 1 Version 1.0 Philips Semiconductors Errata P87C51MB2/P87C51MC2 Errata sheet Deviation #8 UART mode 0 receive data is sampled one clock later than standard 80C51 UARTS. Work-around: This requires an increased data hold time. This will be fixed on the next release. Deviation #9 The PCA Watchdog timer function may not function properly at 24 MHz fOSC when the PCA Count Pulse selection is set to “internal clock, fOSC/2”. Work-around: None. This will be fixed on the next release. 2001 Apr 06 2