Document
Features
• 80C52 Compatible – 8051 Instruction Compatible
– Four 8-bit I/O Ports (44 Pins Version)
– Three 16-bit Timer/Counters – 256 bytes Scratch Pad RAM
– 11 Interrupt Sources With 4 Priority Levels • ISP (In-System Programming) Using Standard VCC Power Supply • Integrated Power Monitor (POR/PFD) to Supervise Internal Power Supply • Boot ROM Contains Serial Loader for In-System Programming • High-speed Architecture
– In Standard Mode:
40 MHz (Vcc 2.7V to 5.5V, Both Internal and External Code Execution)
60 MHz (Vcc 4.5V to 5.5V and Internal Code Execution Only) – In X2 Mode (6 Clocks/Machine Cycle)
20 MHz (Vcc 2.7V to 5.5V, Both Internal and External Code Execution)
30 MHz (Vcc 4.5V to 5.5V and Internal Code Execution Only) • 128K bytes On-chip Flash Program/Data Memory
– 128 bytes Page Write with auto-erase
– 100k Write Cycles • On-chip 8192 bytes Expanded RAM (XRAM)
– Software Selectable Size (0, 256, 512, 768, 1024, 1792, 2048, 4096, 8192 bytes) • Dual Data Pointer • Extended stack pointer to 512 bytes • Variable Length MOVX for Slow RAM/Peripherals • Improved X2 Mode with Independant Selection for CPU and Each Peripheral • Keyboard Interrupt Interface on Port 1 • SPI Interface (Master/Slave Mode) • 8-bit Clock Prescaler • Programmable Counter Array with:
– High Speed Output
– Compare/Capture – Pulse Width Modulator
– Watchdog Timer Capabilities • Asynchronous Port Reset • Two Full Duplex Enhanced UART with Dedicated Internal Baud Rate Generator • Low EMI (inhibit ALE) • Hardware Watchdog Timer (One-time Enabled with Reset-Out), Power-Off Flag • Power Control Modes: Idle Mode, Power-down Mode • Power Supply: 2.7V to 5.5V • Temperature Ranges: Industrial (-40 to +85°C) • Packages: PLCC44, VQFP44
8-bit Flash Microcontroller
AT89C51RE2
Description
AT89C51RE2 is a high performance CMOS Flash version of the 80C51 CMOS single chip 8-bit microcontroller. It contains a 128 Kbytes Flash memory block for program.
The 128 Kbytes Flash memory can be programmed either in parallel mode or in serial mode with the ISP capability or with software. The programming voltage is internally generated from the standard VCC pin.
The AT89C51RE2 retains all features of the Atmel 80C52 with 256 bytes of internal RAM, a 10source 4-level interrupt controller and three timer/counters.
In addition, the AT89C51RE2 has a Programmable Counter Array, an XRAM of 8192 bytes, a Hardware Watchdog Timer, SPI and Keyboard, two serial channels that facilitates multiprocessor communication (EUART), a speed improvement mechanism (X2 mode) and an extended stack mode that allows the stack to be extended in the lower 256 bytes of XRAM.
The fully static design of the AT89C51RE2 allows to reduce system power consumption by bringing the clock frequency down to any value, even DC, without loss of data.
The AT89C51RE2 has 2 software-selectable modes of reduced activity and 8-bit clock prescaler for further reduction in power consumption. In the Idle mode the CPU is frozen while the peripherals and the interrupt system are still operating. In the power-down mode the RAM is saved and all other functions are inoperative.
The added features of the AT89C51RE2 make it more powerful for applications that need pulse width modulation, high speed I/O and counting capabilities such as alarms, motor control, corded phones, smart card readers.
Table 1. Memory Size and I/O pins
AT89C51RE2
PLCC44 VQFP44
Flash (bytes) 128K
XRAM (bytes) TOTAL RAM (bytes)
8192
8192 + 256
I/O 34
2 AT89C51RE2
7663E–8051–10/08
Block Diagram
Figure 1. Block Diagram
AT89C51RE2
RxD_0 TxD_0 VCC Vss ECI PCA T2EX T2 Keyboard RxD_1 TxD_1
XTALA1 XTALA2
XTALB1(1) XTALB2
ALE/ PROG PSEN EA RD
WR
(2) (2)
(2) (2)
EUART
RAM 256x8
Flash 128Kx8
CPU
C51 CORE
IB-bus
(1) (1) (1) (1)
(1)
XRAM 8192 x 8
PCA
Timer2
Watch Dog
Keyboard POR
PFD
(3) (3) EUART_1
Timer 0 Timer 1
INT Ctrl
Parallel I/O Ports & External Bus
TWI
Port 0 Port 1Port 2 Port 3 Port4 Port 5
BOOT Regulator SPI 4K x8 POR / PFD
ROM
(2) (2) (2) (2)
(1) (1) (1)(1)
RESET T0 T1
INT0 INT1
P0 P1 P2 P3 P4 P5 SDA SCL MISO MOSI SCK SS
(1): Alternate function of Port 1 (2): Alternate function of Port 3 (3): Alternate function of Port 6
7663E–8051–10/08
3
Pin Configurations
P1.4/CEX1 P1.3/CEX0 P1.2/ECI P1.1/T2EX/SS P1.0/T2 Rx_OCD VCC P0.0/AD0 P0.1/AD1 P0.2/AD2 P0.3/AD3
P1.5/CEX2/MISO P1.6/CEX3/SCK P1.7/CEx4/MOSI
RST P3.0/RxD_0 P6.0/RxD_1/SDA P3.1/TxD_0
P3.2/INT0 P3.3/INT1
P3.4/T0 P3.5/T1
6 5 4 3 2 1 44 43 42 41 40
7 39 8 38
9 37
10 36
11 AT89C51RE2 35
12 PLCC44
34
13 33
14 32 15 31 16 30 17 29
18 19 20 21 22 23 24 25 26 27 28
P0.4/AD4 P0.5/AD5 P0.6/AD6 P0.7/AD7 EA P6.1/TxD_1/SCL ALE PSEN P2.7/A15 P2.6/A14 P2.5/A13
P3.6/WR P3.7/RD
XTAL2 XTAL1
VSS Tx_OCD
P2.0/A8 P2.1/A9 P2.2/A10 P2.3/A11 P2.4/A12 P1.4/CEX1 P1.3/CEX0 P1.2/ECI P1.1/T2EX/SS P1.0/T2/XTALB1 Rx_OCD VCC P0.0/AD0 P0.1/AD1 P0.2/AD2 P0.3/AD3
P1.5/CEX2/MISO P1.6/CEX3/SCK P1.7/CEX4/MOSI
RST P3.0/RxD_0 P6.0/RxD_1/SDA P3.1/TxD_0
P3.2/INT0 P3.3/INT1
.