Features
•
80C52 Compatible
– 8051 Pin and Instruction Compatible
– Four 8-bit I/O Ports
– Three 16-bit timer/counters
– 256 Bytes Scratch Pad RAM
– 10 Interrupt Sources with 4 Priority Levels
– Dual Data Pointer
Variable Length MOVX for slow RAM/Peripherals
ISP (In-System Programming) using Standard V
CC
Power Supply
Boot ROM Contains Low Level FLASH Programming Routines and a Default Serial
Loader
High-Speed Architecture
– 40 MHz in Standard Mode
– 20 MHz in X2 Mode (6 clocks/machine cycle)
16K/32K Bytes on-chip FLASH Program/Data Memory
– Byte and Page (128 Bytes) Erase and Write
– 10k Write Cycles
On-chip 1024 Bytes Expanded RAM (XRAM)
– Software Selectable Size (0, 256, 512, 768, 1024 bytes)
– 256 Bytes Selected at Reset for TS87C51RB2/RC2 Compatibility
Keyboard Interrupt Interface on port P1
SPI Interface (Master / Slave Mode)
8-bit Clock Prescaler
Improved X2 Mode with Independent Selection for CPU and each Peripheral
Programmable Counter Array 5 Channels with:
– High Speed Output
– Compare / Capture
– Pulse Width Modulator
– Watchdog Timer Capabilities
Asynchronous Port Reset
Full Duplex Enhanced UART
Dedicated Baud Rate Generator for UART
Low EMI (Inhibit ALE)
Hardware Watchdog Timer (One-time enabled with Reset-Out)
Power Control Modes:
– Idle Mode
– Power-down mode
– Power-off Flag
Power supply: 4.5 to 5.5V or 2.7 to 3.6V
Temperature ranges: Commercial (0 to +70°C) and Industrial (-40°C to +85°C)
Packages: PDIL40, PLCC44, VQFP44
•
•
•
•
•
•
•
•
•
•
•
8-bit
Microcontroller
with 16K/
32K byte Flash
T89C51RB2
T89C51RC2
Preliminary
•
•
•
•
•
•
•
•
•
Description
T89C51RB2/RC2 is a high-performance FLASH version of the 80C51 8-bit microcon-
trollers. It contains a 16K or 32K byte Flash memory block for program and data.
The 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 V
CC
pin.
The T89C51RB2/RC2 retains all features of the 80C52 with 256 bytes of internal
RAM, a 7-source 4-level interrupt controller and three timer/counters.
In addition, the T89C51RB2/RC2 has a Programmable Counter Array, an XRAM of
1024 bytes, a Hardware Watchdog Timer, a Keyboard Interface, an SPI Interface,
Rev. 4105D–8051–10/06
1
a more versatile serial channel that facilitates multiprocessor communication (EUART)
and a speed improvement mechanism (X2 mode).
Pinout is the standard 40/44 pins of the C52.
The fully static design reduces system power consumption of the T89C51RB2/RC2 by
allowing it to bring the clock frequency down to any value, even DC, without loss of data.
The T89C51RB2/RC2 has 2 software-selectable modes of reduced activity and 8-bit
clock prescaler for further reduction in power consumption. In Idle mode, the CPU is fro-
zen while the peripherals and the interrupt system are still operating. In power-down
mode, the RAM is saved and all other functions are inoperative.
The added features of the T89C51RB2/RC2 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, and smart card readers.
Table 1.
Memory Size
Part Number
T89C51RB2
T89C51RC2
Flash (bytes)
16K
32K
XRAM (bytes)
1024
1024
TOTAL RAM
(bytes)
1280
1280
I/O
32
32
Block Diagram
Figure 1.
Block Diagram
T2EX
PCA
RxD
TxD
Vss
V
CC
ECI
T2
(1)
SPI
(1) (1) (1) (1)
MISO
P1
P2
P3
MOSI
SCK
P0
(2) (2)
XTAL1
XTAL2
(1)
Boot
ROM
2Kx8
(1) (1)
EUART
+
BRG
RAM
256x8
Flash
32Kx8 or
16Kx8
XRAM
1Kx8
PCA
Timer2
ALE/ PROG
PSEN
CPU
EA
RD
WR
(2)
(2)
C51
CORE
IB-bus
Timer 0
Timer 1
INT
Ctrl
Parallel I/O Ports & Ext. Bus
Port 0 Port 1 Port 2 Port 3
Watch Key
Dog Board
(2) (2)
RESET
T0
T1
(2) (2)
INT0
INT1
Note:
1. Alternate function of Port 1
2. Alternate function of Port 3
2
T89C51RB2/RC2
4105D–8051–10/06
SS
T89C51RB2/RC2
SFR Mapping
The Special Function Registers (SFRs) of the T89C51RB2/RC2 fall into the following
categories:
•
•
•
•
•
•
•
•
•
•
•
•
•
•
C51 core registers: ACC, B, DPH, DPL, PSW, SP
I/O port registers: P0, P1, P2, P3
Timer registers: T2CON, T2MOD, TCON, TH0, TH1, TH2, TMOD, TL0, TL1, TL2,
RCAP2L, RCAP2H
Serial I/O port registers: SADDR, SADEN, SBUF, SCON
PCA (Programmable Counter Array) registers: CCON, CCAPMx, CL, CH, CCAPxH,
CCAPxL (x: 0 to 4)
Power and clock control registers: PCON
Hardware Watchdog Timer registers: WDTRST, WDTPRG
Interrupt system registers: IE0, IPL0, IPH0, IE1, IPL1, IPH1
Keyboard Interface registers: KBE, KBF, KBLS
SPI registers: SPCON, SPSTR, SPDAT
BRG (Baud Rate Generator) registers: BRL, BDRCON
Flash register: FCON
Clock Prescaler register: CKRL
Others: AUXR, AUXR1, CKCON0, CKCON1
3
4105D–8051–10/06
The table below shows all SFRs with their address and their reset value.
Table 2.
SFR Mapping
Bit
addressable
0/8
F8h
B
0000 0000
CL
0000 0000
ACC
0000 0000
CCON
00X0 0000
PSW
0000 0000
T2CON
0000 0000
CMOD
00XX X000
FCON
(a)
XXXX 0000
T2MOD
XXXX XX00
RCAP2L
0000 0000
RCAP2H
0000 0000
SPCON
0001 0100
IPL0
X000 000
P3
1111 1111
IE0
0000 0000
P2
1111 1111
SCON
0000 0000
P1
1111 1111
TCON
0000 0000
P0
1111 1111
0/8
TMOD
0000 0000
SP
0000 0111
1/9
TL0
0000 0000
DPL
0000 0000
2/A
TL1
0000 0000
DPH
0000 0000
3/B
4/C
5/D
6/E
TH0
0000 0000
TH1
0000 0000
AUXR
XX0X 0000
SBUF
XXXX XXXX
SADEN
0000 0000
IE1
XXXXX 000
SADDR
0000 0000
AUXR1
XXXXX0X0
BRL
0000 0000
BDRCON
XXX0 0000
KBLS
0000 0000
KBE
0000 0000
WDTRST
XXXX XXXX
KBF
0000 0000
CKRL
1111 1111
CKCON0
0000 0000
PCON
00X1 0000
7/F
IPL1
XXXXX000
IPH1
XXXX X111
IPH0
X000 0000
CKCON1
XXXX XXX0
WDTPRG
XXXX X000
TL2
0000 0000
SPSTA
0000 0000
TH2
0000 0000
SPDAT
XXXX XXXX
CCAPM0
X000 0000
CCAPM1
X000 0000
CCAPM2
X000 0000
CCAPM3
X000 0000
CCAPM4
X000 0000
CCAP0L
XXXX XXXX
CCAP1L
XXXX XXXX
CCAPL2L
XXXX XXXX
CCAPL3L
XXXX XXXX
CCAPL4L
XXXX XXXX
1/9
CH
0000 0000
2/A
CCAP0H
XXXX
3/B
CCAP1H
XXXX
Non Bit addressable
4/C
CCAPL2H
XXXX
5/D
CCAPL3H
XXXX
6/E
CCAPL4H
XXXX
7/F
FFh
F0h
F7h
E8h
EFh
E0h
E7h
D8h
D0h
C8h
C0h
DFh
D7h
CFh
C7h
B8h
BFh
B0h
B7h
A8h
AFh
A0h
A7h
98h
9Fh
90h
97h
88h
8Fh
80h
87h
a.
Note:
FCON access is reserved for the FLASH API and ISP software
Reserved
4
T89C51RB2/RC2
4105D–8051–10/06
T89C51RB2/RC2
Pin Configurations
Figure 2.
Pin Configurations
P0.2/AD2
P0.3/AD3
39
38
37
36
35
34
33
32
31
30
29
P0.0/AD0
P0.1/AD1
P1.2/ECI
P1.0/T2
P1.1/T2EX/SS
P1.2/ECI
P1.3CEX0
P1.4/CEX1
P1.5/CEX2/MISO
P1.6/CEX3/SCK
P1.7CEX4/MOSI
RST
P3.0/RxD
P3.1/TxD
P3.2/INT0
P3.3/INT1
P3.4/T0
P3.5/T1
P3.6/WR
P3.7/RD
XTAL2
XTAL1
VSS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
VCC
P0.0/AD0
P0.1/AD1
P0.2/AD2
P0.3/AD3
P0.4/AD4
P0.5/AD5
P0.6/AD6
P0.7/AD7
EA
ALE/PROG
PSEN
P2.7/A15
P2.6/A14
P2.5/A13
P2.4/A12
P2.3/A11
P2.2/A10
P2.1/A9
P2.0/A8
P1.5/CEX2/MISO
P1.6/CEX3/SCK
P1.7/CEx4/MOSI
RST
P3.0/RxD
NIC*
P3.1/TxD
P3.2/INT0
P3.3/INT1
P3.4/T0
P3.5/T1
7
8
9
10
11
12
13
14
15
16
17
P1.1/T2EX/SS
P1.4/CEX1
P1.3/CEX0
P1.0/T2
NIC*
6 5 4 3 2 1 44 43 42 41 40
P0.4/AD4
P0.5/AD5
P0.6/AD6
P0.7/AD7
EA
NIC*
ALE/PROG
PSEN
P2.7/A15
P2.6/A14
P2.5/A13
PDIL40
PLCC44
18 19 20 21 22 23 24 25 26 27 28
P3.6/WR
P2.2/A10
P2.3/A11
P2.4/A12
P3.7/RD
NIC*
P2.0/A8
P2.1/A9
XTAL2
XTAL1
VSS
P1.1/T2EX/SS
P1.4/CEX1
P1.3/CEX0
P0.0/AD0
P0.1/AD1
P0.2/AD2
44 43 42 41 40 39 38 37 36 35 34
P1.5/CEX2/MISO
P1.6/CEX3/SCK
P1.7/CEX4/MOSI
RST
P3.0/RxD
NIC*
P3.1/TxD
P3.2/INT0
P3.3/INT1
P3.4/T0
P3.5/T1
1
2
3
4
5
6
7
8
9
10
11
33
32
31
30
29
28
27
26
25
24
23
P0.4/AD4
P0.5/AD5
P0.6/AD6
P0.7/AD7
EA
NIC*
ALE/PROG
PSEN
P2.7/A15
P2.6/A14
P2.5/A13
VQFP44 1.4
12 13 14 15 16 17 18 19 20 21 22
P3.6/WR
P2.2/A10
P2.3/A11
XTAL1
P2.0/A8
P3.7/RD
P2.1/A9
XTAL2
P2.4/A12
NIC*
VSS
*NIC: No Internal Connection
P0.3/AD3
P1.2/ECI
P1.0/T2
NIC*
VCC
VCC
5
4105D–8051–10/06