View detail for Migrating from T89C51CC01 to AT89C51CC03

Migrating from T89C51CC01 to AT89C51CC03
This application note is a guide to assist T89C51CC01 users in converting existing
designs to the AT89C51CC03 devices. In addition to the functional changes, the electrical characteristics of the AT89C51CC03 are different including an increase in
operating power supply range. Check the datasheet for detailed information.
To ease the product migration, this application note compares the memory organization/accesses, the new features and electrical parameters.
CAN
Microcontrollers
Application Note
Feature Comparison
Description
Program Memory
T89C51CC01
AT89C51CC03
32K Bytes
64K Bytes
2K Bytes Flash UART or CAN
bootloader.
2K Bytes Flash UART or
CAN bootloader.
RAM
256 Bytes
256 Bytes
XRAM
1024 Bytes
2048 Bytes
In-System Programming (ISP)
2048 Bytes
2048 Bytes
128 Bytes page write
128 Bytes page write
Yes (3)
Yes (3)
CPU & Programmable separately by
peripherals
CPU & Programmable
separately by peripherals
SPI Interface
No
Yes (PLCC52 or QFP64)
POR/PFD
No
Yes
40 MHz X1 mode
40 MHz X1 mode
20 MHz X2 mode
20 MHz X2 mode
3V to 5.5V
3V to 5.5V
On-Chip EEPROM data
16-bit Timers
X2 Mode
Maximum Frequency @ 5V
Power Supply
Pinout
T89C51CC01 and AT89C51CC03 are pinout compatible in PLCC44
and QFP44 version.
Rev. 4321B–CAN–06/05
1
Memory Organization
Code Memory
Organization
The AT89C51CC03 implements 64K Bytes (instead of 32K Bytes for the T89C51CC01)
of on-chip program/code memory and a 2K Bytes Flash dedicated for bootloader (CAN
or UART). By default the microcontroller addresses the 64K Bytes of on-chip Flash program/code memory. To address the upper 2K Bytes Flash bootloader, the ENBOOT bit
in AUXR1 register must be set (to access Flash API from user space for example).
Figure 1. Code Memory Organization
FFFFh
2K Bytes
FLASH
Bootloader
2K Bytes
FLASH
Bootloader
F800h
64K Bytes
Flash Memory
User Space
7FFFh
32K Bytes
Flash Memory
User Space
0000h
0000h
T89C51CC01
AT89C51CC03
The ENBOOT bit operates has a chip select between the on-chip Flash memory and the
bootloader memory in the logical upper 2 K Bytes code memory space of the microcontroller (see Figure 2).
Figure 2. Logical Addressable Code Memory for AT89C51CC03
FFFFh
FFFFh
F800h
2K Bytes
FLASH
Bootloader
64K Bytes
Flash Memory
User Space
62K Bytes
Flash Memory
User Space
0000h
ENBOOT=1
2
0000h
ENBOOT=0
Migrating from T89C51CC01 to AT89C51CC03
4321B–CAN–06/05
Migrating from T89C51CC01 to AT89C51CC03
Consequence:
Applications that embed “Custom bootloader” and that use on-chip Atmel API calls
should take care of the following point:
A custom bootloader can be located anywhere in the 64K Bytes of the on-chip Flash
memory, even in the 2K Bytes in overlap with the bootloader memory (between 0F800h
and FFFFh), the only restriction is that the API call to the Atmel bootloader must be
located outside the overlapped range address (see Figure 1).
As the access to the “Atmel bootloader” API requires the ENBOOT to be set, it is impossible to call an API from the 2K Bytes of the overlapped memory.
Figure 1. Custom Bootloader Memory Mapping
FFFFh
Atmel API
Custom
Bootloader
F800h
API call area
“Atmel bootloader”
User application
0000h
3
4321B–CAN–06/05
On-chip RAM/XRAM
Memory
Both T89C51CC01 and AT89C51CC03 have 256 Bytes of scratch pad RAM. The
AT89C51CC03 has 2048 Bytes of internal XRAM, whereas the T89C51CC01 has 1024
Bytes.
Figure 2. XRAM Logical Addressable Memory Space
FFFFh
FFFFh
63K Bytes
External
RAM or
Peripheral
62K Bytes
External
RAM or
Peripheral
07FFh
03FFh
1024 Bytes
0000h
0000h
T89C51CC01
Consequence:
2048 Bytes
of internal RAM
AT89C51CC03
T89C51CC01 applications using the 1K byte of external memory space between 03FFh
and 07FFh to address external components should:
•
Change this external memory space area outside the internal
•
Or limit the internal RAM space to 1K byte by setting the XRS2:0 bits of AUXR
register to “011” (See Table 1.)
.
Table 1. AUXR Register
AUXR Register (SFR:8Eh)
AUXR
7
6
5
4
3
2
1
0
T89C51CC01
-
-
M0
-
XRS1
XRS0
EXTRAM
A0
AT89C51CC03
Note(1)
-
M0
XRS2
XRS1
XRS0
EXTRAM
A0
Note:
1. This bit is initialized at 0 at reset and should never be set (= 1).
Thanks to the new XRS2 bit the AT89C51CC03 provides different internal XRAM size
compatible with the T89C51CC01 (See AT89C51CC03 data sheet for details).
Table 2. XRAM Size configuration
4
XRS2
XRS1
XRS0
Internal XRAM Size Configuration
0
0
0
256
0
0
1
512
0
1
0
768
0
1
1
1024
1
0
0
1792
0
0
1
2048 (Default Configuration)
0
0
0
Reserved
0
0
1
Reserved
Migrating from T89C51CC01 to AT89C51CC03
4321B–CAN–06/05
Migrating from T89C51CC01 to AT89C51CC03
Improvements
The AT89C51CC03 implements a set of improvements.
Product Robustness
Integrated POR/PFD
The AT89C51CC03 provides a Power Fail Detector that monitors the internal power
supply of the CPU core and memories and maintains a reset state if the power supply
fails bellow a safety level.
This new feature allows to save the implementation of an external reset circuit as recommended in the T89C51CC01.
Flash controller
This section involved only the applications where the user wants to develop it own bootloader located in the 2K Bytes Flash boot area (FM1) instead of the “Atmel bootloader”.
The Flash controller of the AT89C51CC03 implements a set of new functionnalities and
security improvements accessible through the FSTA register (see AT89C51CC03
datasheet):
•
Sequence error in the Flash write sequence
•
Columns latch loaded
The user involved with these special manipulations of the Flash controller should also
take care regarding the new behavior of the FBUSY flag described in the
AT89C51CC03 datasheet (see AT89C51CC03 datasheet, section “Program/Code
Memory”).
New Features
SPI Module
To improve interconnection with other devices, the AT89C51CC03 provides a new
Serial Port Interface module. As this modules is available only on PLCC52 and VQFP64
packages, and accessible only with T89C51CC01 unused registers, this new feature will
not interferes with previous T89C51CC01 designs.
DC Parameters
T89C51CC01
Symbol
RRST
Parameters
RST Pulldown Resistor
AT89C51CC03
Unit
Min
Typ
Max
Min
Typ
Max
15
40
200
50
100
200
kΩ
For applications generating their reset pulse from an external Capacitor tied to Vcc, the
new Pulldown Reset value of the AT89C51CC03 will double the reset pulse length and
delayed the microcontroller start.
References
T89C51CC01 datasheet (doc4129)
AT89C51CC03 datasheet (doc4182)
5
4321B–CAN–06/05
Atmel Corporation
2325 Orchard Parkway
San Jose, CA 95131
Tel: 1(408) 441-0311
Fax: 1(408) 487-2600
Regional Headquarters
Europe
Atmel Sarl
Route des Arsenaux 41
Case Postale 80
CH-1705 Fribourg
Switzerland
Tel: (41) 26-426-5555
Fax: (41) 26-426-5500
Asia
Room 1219
Chinachem Golden Plaza
77 Mody Road Tsimshatsui
East Kowloon
Hong Kong
Tel: (852) 2721-9778
Fax: (852) 2722-1369
Japan
9F, Tonetsu Shinkawa Bldg.
1-24-8 Shinkawa
Chuo-ku, Tokyo 104-0033
Japan
Tel: (81) 3-3523-3551
Fax: (81) 3-3523-7581
Atmel Operations
Memory
2325 Orchard Parkway
San Jose, CA 95131
Tel: 1(408) 441-0311
Fax: 1(408) 436-4314
Microcontrollers
2325 Orchard Parkway
San Jose, CA 95131
Tel: 1(408) 441-0311
Fax: 1(408) 436-4314
La Chantrerie
BP 70602
44306 Nantes Cedex 3, France
Tel: (33) 2-40-18-18-18
Fax: (33) 2-40-18-19-60
ASIC/ASSP/Smart Cards
Zone Industrielle
13106 Rousset Cedex, France
Tel: (33) 4-42-53-60-00
Fax: (33) 4-42-53-60-01
RF/Automotive
Theresienstrasse 2
Postfach 3535
74025 Heilbronn, Germany
Tel: (49) 71-31-67-0
Fax: (49) 71-31-67-2340
1150 East Cheyenne Mtn. Blvd.
Colorado Springs, CO 80906
Tel: 1(719) 576-3300
Fax: 1(719) 540-1759
Biometrics/Imaging/Hi-Rel MPU/
High Speed Converters/RF Datacom
Avenue de Rochepleine
BP 123
38521 Saint-Egreve Cedex, France
Tel: (33) 4-76-58-30-00
Fax: (33) 4-76-58-34-80
1150 East Cheyenne Mtn. Blvd.
Colorado Springs, CO 80906
Tel: 1(719) 576-3300
Fax: 1(719) 540-1759
Scottish Enterprise Technology Park
Maxwell Building
East Kilbride G75 0QR, Scotland
Tel: (44) 1355-803-000
Fax: (44) 1355-242-743
e-mail
[email protected]
Web Site
http://www.atmel.com
Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any
intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN ATMEL’S TERMS AND CONDITIONS OF SALE LOCATED ON ATMEL’S WEB SITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY
WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT
OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no
representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications
and product descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Atmel’s products are not
intended, authorized, or warranted for use as components in applications intended to support or sustain life.
© Atmel Corporation 2005. All rights reserved. Atmel®, logo and combinations thereof, are registered trademarks, and Everywhere You AreSM
are the trademarks of Atmel Corporation or its subsidiaries. Other terms and product names may be trademarks of others.
Printed on recycled paper.
4321B–CAN–06/05
/xM