Doc2537 PDF
Doc2537 PDF
ATmega16
8-bit
Introduction
Microcontroller
This application note is a guide to help current ATmega8535 users convert existing
designs to ATmega16. The information given will also help users migrating from
ATmega16 to ATmega8535. AT90S8535 users should also read the application note
AVR086: Replacing A90S8535 by ATmega8535.
Application
In addition to the differences described in this document, the following features are Note
available on ATmega16:
JTAG Interface (enabled by default)
The electrical characteristics of the two devices are also different. Check the data
sheets for detailed information.
Memory Sizes
Some memories are bigger in the ATmega16. Table 1 is a comparision of the individ-
ual memories.
The Boot Loader area is also changed. The following must be considered:
Flash page size is 64 words instead of 32 words.
The No-Read-While-Write section starts at word address 0x1C00 instead of
0xC00.
Rev. 2537CAVR01/04
Interrupt Vectors and The ATmega8535 uses 1-word Interrupt Vectors while the ATmega16 uses 2-word
Interrupt Vectors. 1-word Vectors can only contain RJMP instructions, which can not
Relative Jumps/Calls
reach the entire 8k word memory range of ATmega16.
Since RJMP/RCALL can only jump 2k words in any direction, it wraps around the start
or end of the 4k word Flash of the ATmega8535 to reach the entire memory span. Wrap-
ping RJMP/RCALLs must be changed to JMP/CALLs when using the 8k word
ATmega16.
The compiler or assembler will take care of most of these differences. It will either use
the correct instruction or issue an error message.
The Interrupt tables are equal.
Fuse Bits Two of the Fuse bits are different. Table 2 shows the Fuse bits.
7 S8535C OCDEN
6 WDTON JTAGEN
5 SPIEN SPIEN
Fuse High Byte
4 CKOPT CKOPT
3 EESAVE EESAVE
2 BOOTSZ1 BOOTSZ1
1 BOOTSZ0 BOOTSZ0
0 BOOTRST BOOTRST
7 BODLEVEL BODLEVEL
6 BODEN BODEN
5 SUT1 SUT1
Fuse Low Byte
4 SUT0 SUT0
3 CKSEL3 CKSEL3
2 CKSEL2 CKSEL2
1 CKSEL1 CKSEL1
0 CKSEL0 CKSEL0
2 AVR088
2537CAVR01/04
Atmel Corporation Atmel Operations
2325 Orchard Parkway Memory RF/Automotive
San Jose, CA 95131, USA 2325 Orchard Parkway Theresienstrasse 2
Tel: 1(408) 441-0311 San Jose, CA 95131, USA Postfach 3535
Fax: 1(408) 487-2600 Tel: 1(408) 441-0311 74025 Heilbronn, Germany
Fax: 1(408) 436-4314 Tel: (49) 71-31-67-0
Fax: (49) 71-31-67-2340
Regional Headquarters Microcontrollers
Europe 2325 Orchard Parkway 1150 East Cheyenne Mtn. Blvd.
Atmel Sarl San Jose, CA 95131, USA Colorado Springs, CO 80906, USA
Route des Arsenaux 41 Tel: 1(408) 441-0311 Tel: 1(719) 576-3300
Case Postale 80 Fax: 1(408) 436-4314 Fax: 1(719) 540-1759
CH-1705 Fribourg
Switzerland La Chantrerie Biometrics/Imaging/Hi-Rel MPU/
Tel: (41) 26-426-5555 BP 70602 High Speed Converters/RF Datacom
Fax: (41) 26-426-5500 44306 Nantes Cedex 3, France Avenue de Rochepleine
Tel: (33) 2-40-18-18-18 BP 123
Asia Fax: (33) 2-40-18-19-60 38521 Saint-Egreve Cedex, France
Room 1219 Tel: (33) 4-76-58-30-00
Chinachem Golden Plaza ASIC/ASSP/Smart Cards Fax: (33) 4-76-58-34-80
77 Mody Road Tsimshatsui Zone Industrielle
East Kowloon 13106 Rousset Cedex, France
Hong Kong Tel: (33) 4-42-53-60-00
Tel: (852) 2721-9778 Fax: (33) 4-42-53-60-01
Fax: (852) 2722-1369
1150 East Cheyenne Mtn. Blvd.
Japan Colorado Springs, CO 80906, USA
9F, Tonetsu Shinkawa Bldg. Tel: 1(719) 576-3300
1-24-8 Shinkawa Fax: 1(719) 540-1759
Chuo-ku, Tokyo 104-0033
Japan Scottish Enterprise Technology Park
Tel: (81) 3-3523-3551 Maxwell Building
Fax: (81) 3-3523-7581 East Kilbride G75 0QR, Scotland
Tel: (44) 1355-803-000
Fax: (44) 1355-242-743
Literature Requests
www.atmel.com/literature
Disclaimer: 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 and combinations thereof, AVR , and AVR Studio are the registered trademarks of
Atmel Corporation or its subsidiaries. Microsoft, Windows , Windows NT , and Windows XP are the registered trademarks of Microsoft Corpo-
ration. Other terms and product names may be the trademarks of others
2537CAVR01/04