Beruflich Dokumente
Kultur Dokumente
This application note details the differences between AT89C51SND1C and AT83C51SDN1C products, and gives some tips and tricks to the user when migrating from Flash to ROM product from a hardware and firmware point of view.
MP3 Microcontrollers
Application Note
Rev. 4244AMP305/03
Memory Architecture
AT83C51SDN1C Memory Architecture
The AT83C51SND1C product provides the internal program/code memory in ROM memory while the AT89C51SND1C product provides it in Flash memory. Figure 1. ROM Memory Architecture
FFFFh
0000h
As shown in Figure 1 the AT83C51SDN1C ROM memory is composed of only one user space detailed as follows. User Space This space is composed of a 64K Bytes ROM memory programmed during the manufacturing process. It contains the users application code. Figure 2. Flash Memory Architecture
Hardware Security Extra Row
FFFFh FFFFh F000h
Boot
0000h
As shown in Figure 2 the AT89C51SND1C Flash memory is composed of four spaces detailed as follows. User Space This space is composed of a 64K Bytes Flash memory organized in 512 pages of 128 Bytes. It contains the users application code. This space can be read or written by both software and hardware modes. Boot Space This space is composed of a 4K Bytes Flash memory. It contains the bootloader for InSystem Programming and the routines for In Application Programming. This space can only be read or written by hardware mode using a parallel programming tool. Hardware Security Space This space is composed of one Byte: the Hardware Security Byte (HSB) divided in 2 separate nibbles. The MSN contains the X2 mode configuration bit and the Bootloader
User Constraints
Due to its ROM technology, the AT83C51SND1C product does not allow In-System and In-Application Programming and therefore, does not implement any boot space, hardware security space and extra row space. Attempting to enable the boot memory through software or hardware boot condition will result in no effect. Then, jumping to the boot entry address (F000h) will jump in internal user ROM. Software boot condition ENBOOT bit in AUXR1 register (see Table 1) is not implemented in AT83C51SDN1C product.
User must take care not to write to ENBOOT bit. User must take care to leave this pin unconnected.
Note:
Note:
Since the HSB register (see Table 3) is not implemented, the AT83C51SND1C product does not provide any programmable hardware security system. Internal ROM content is always secured because there is no way to read it externally. Moreover the AT83C51SND1C product does not implement X2B bit in HSB disallowing to start automatically in X2 mode.
Note: User must take care to always set the X2 bit in CKCON register by firmware in the application start-up routine if needed.
Version Register
The AT83C51SND1C product NVERS register (see Table 2) is set to 0XXX XXXXb (ROM product) while it is set to 1XXX XXXXb in the AT89C51SND1C product.
Note: User must take care of NVERS register usage in its code to avoid any infinite loop that may have been implemented to secure firmware from old product versions usage.
3
4244AMP305/03
Pinout
60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41
P4.5 P4.4 P2.2/A10 P2.3/A11 P2.4/A12 P2.5/A13 P2.6/A14 P2.7/A15 VSS VDD MCLK MDAT MCMD RST SCLK DSEL DCLK DOUT VSS VDD
Note:
1. ISP for AT89C51SND1C, NC for AT83C51SDN1C. Do not connect this pin when using AT83C51SDN1C.
D+ DVDD VSS P3.0/RXD P3.1/TXD P3.2/INT0 P3.3/INT1 P3.4/T0 P3.5/T1 P3.6/WR P3.7/RD AVDD AVSS AREFP AREFN AIN0 AIN1 P5.2 P5.3
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
Description Reserved The value read from these bits are indeterminate. Do not set these bits. Enable Boot Flash Set this bit to map the boot Flash in the code space between at addresses F000h to FFFFh. Clear this bit to disable boot Flash. Reserved The value read from this bit is indeterminate. Do not set this bit. General Flag This bit is a general-purpose user flag. Always Zero This bit is stuck to logic 0 to allow INC AUXR1 instruction without affecting GF3 flag. Reserved for Data Pointer Extension. Data Pointer Select Bit Set to select second data pointer: DPTR1. Clear to select first data pointer: DPTR0.
ENBOOT
(1)
GF3
DPS
Bit Mnemonic Description V0:7 Value of these bits depends on hardware version.
5
4244AMP305/03
Bit Mnemonic Description X2B(1) X2 Bit Program this bit to start in X2 mode. Unprogram (erase) this bit to start in standard mode. Bootloader Jump Bit Program this bit to execute the bootloader at address F000h on next reset. Unprogram (erase) this bit to execute users application at address 0000h on next reset. Reserved The value read from these bits is always unprogrammed. Do not program these bits. Reserved The value read from this bit is always unprogrammed. Do not program this bit. LB2:0 Hardware Lock Bits Refer to for bits description.
BLJB
5-4
2-0
Reset Value = XXUU UXXX, UUUU UUUU after an hardware full chip erase.
Notes: 1. On AT89C51SND1C X2B initializes the X2 bit in CKCON during the reset phase. 2. Bits 0 to 3 (MSN) can only be programmed by hardware mode.
Atmel Headquarters
Corporate Headquarters
2325 Orchard Parkway San Jose, CA 95131 TEL 1(408) 441-0311 FAX 1(408) 487-2600
Atmel Operations
Memory
2325 Orchard Parkway San Jose, CA 95131 TEL 1(408) 441-0311 FAX 1(408) 436-4314
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
Europe
Atmel Sarl Route des Arsenaux 41 Case Postale 80 CH-1705 Fribourg Switzerland TEL (41) 26-426-5555 FAX (41) 26-426-5500
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
Asia
Room 1219 Chinachem Golden Plaza 77 Mody Road Tsimhatsui East Kowloon Hong Kong TEL (852) 2721-9778 FAX (852) 2722-1369
ASIC/ASSP/Smart Cards
Zone Industrielle 13106 Rousset Cedex, France TEL (33) 4-42-53-60-00 FAX (33) 4-42-53-60-01 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
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
e-mail
literature@atmel.com
Web Site
http://www.atmel.com
Atmel Corporation 2003. Atmel Corporation makes no warranty for the use of its products, other than those expressly contained in the Companys standard warranty which is detailed in Atmels Terms and Conditions located on the Companys web site. The Company assumes no responsibility for any errors which may appear in this document, reserves the right to change devices or specifications detailed herein at any time without notice, and does not make any commitment to update the information contained herein. No licenses to patents or other intellectual property of Atmel are granted by the Company in connection with the sale of Atmel products, expressly or by implication. Atmels products are not authorized for use as critical components in life support devices or systems. Atmel Corporation 2003. All rights reserved. Atmel, the Atmel logo, and combinations thereof are registered trademarks of Atmel Corporation or its subsidiaries. Other terms and product names in this document may be the trademarks of others. Printed on recycled paper.
4244AMP305/03 /xM