AVR512: Migration from ATmega48/88/168 to ATmega48P/88P/168P. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

Similar documents
General Porting Considerations. Memory EEPROM XRAM

AVR305: Half Duplex Compact Software UART. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR319: Using the USI module for SPI communication. 8-bit Microcontrollers. Application Note. Features. Introduction

Application Note. C51 Bootloaders. C51 General Information about Bootloader and In System Programming. Overview. Abreviations

8-bit RISC Microcontroller. Application Note. AVR182: Zero Cross Detector

AVR317: Using the Master SPI Mode of the USART module. 8-bit Microcontrollers. Application Note. Features. Introduction

8-bit Microcontroller. Application Note. AVR222: 8-point Moving Average Filter

AVR134: Real Time Clock (RTC) using the Asynchronous Timer. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR030: Getting Started with IAR Embedded Workbench for Atmel AVR. 8-bit Microcontrollers. Application Note. Features.

AVR245: Code Lock with 4x4 Keypad and I2C LCD. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

How to Calculate the Capacitor of the Reset Input of a C51 Microcontroller 80C51. Application Note. Microcontrollers. Introduction

8-bit Microcontroller. Application Note. AVR400: Low Cost A/D Converter

AT91 ARM Thumb Microcontrollers. Application Note. Interfacing a PC Card to an AT91RM9200-DK. Introduction. Hardware Interface

AVR106: C functions for reading and writing to Flash memory. 8-bit Microcontrollers. Application Note. Features. Introduction

8-bit Microcontroller. Application Note. AVR415: RC5 IR Remote Control Transmitter. Features. Introduction. Figure 1.

3-output Laser Driver for HD-DVD/ Blu-ray/DVD/ CD-ROM ATR0885. Preliminary. Summary

8-bit RISC Microcontroller. Application Note. AVR236: CRC Check of Program Memory

Tag Tuning/RFID. Application Note. Tag Tuning. Introduction. Antenna Equivalent Circuit

AT91 ARM Thumb Microcontrollers. AT91SAM CAN Bootloader. AT91SAM CAN Bootloader User Notes. 1. Description. 2. Key Features

AVR32110: Using the AVR32 Timer/Counter. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

AT89C5131A Starter Kit... Software User Guide

Quick Start Guide. CAN Microcontrollers. ATADAPCAN01 - STK501 CAN Extension. Requirements

8-bit Microcontroller. Application Note. AVR105: Power Efficient High Endurance Parameter Storage in Flash Memory

8-bit Microcontroller. Application Note. AVR314: DTMF Generator

8-bit Microcontroller. Application Note. AVR201: Using the AVR Hardware Multiplier

8-bit RISC Microcontroller. Application Note. AVR155: Accessing an I 2 C LCD Display using the AVR 2-wire Serial Interface

8-bit Microcontroller. Application. Note. AVR204: BCD Arithmetics. Features. Introduction. 16-bit Binary to 5-digit BCD Conversion bin2bcd16

AVR241: Direct driving of LCD display using general IO. 8-bit Microcontrollers. Application Note. Features. Introduction AVR

AVR442: PC Fan Control using ATtiny13. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR32701: AVR32AP7 USB Performance. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR034: Mixing C and Assembly Code with IAR Embedded Workbench for AVR. 8-bit Microcontroller. Application Note. Features.

AVR32100: Using the AVR32 USART. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR1900: Getting started with ATxmega128A1 on STK bit Microcontrollers. Application Note. 1 Introduction

AVR353: Voltage Reference Calibration and Voltage ADC Usage. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

Using CryptoMemory in Full I 2 C Compliant Mode. Using CryptoMemory in Full I 2 C Compliant Mode AT88SC0104CA AT88SC0204CA AT88SC0404CA AT88SC0808CA

AVR120: Characterization and Calibration of the ADC on an AVR. 8-bit Microcontrollers. Application Note. Features. Introduction

AVR1318: Using the XMEGA built-in AES accelerator. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR1301: Using the XMEGA DAC. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR32138: How to optimize the ADC usage on AT32UC3A0/1, AT32UC3A3 and AT32UC3B0/1 series. 32-bit Microcontrollers. Application Note.

8-bit. Application Note. Microcontrollers. AVR282: USB Firmware Upgrade for AT90USB

Application Note. Migrating from RS-232 to USB Bridge Specification USB Microcontrollers. Doc Control. References. Abbreviations

AVR033: Getting Started with the CodeVisionAVR C Compiler. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR1309: Using the XMEGA SPI. 8-bit Microcontrollers. Application Note. Features. 1 Introduction SCK MOSI MISO SS

AVR1600: Using the XMEGA Quadrature Decoder. 8-bit Microcontrollers. Application Note. Features. 1 Introduction. Sensors

3-output Laser Driver for HD-DVD/ Blu-ray/DVD/ CD-ROM ATR0885. Preliminary. Summary. Features. Applications. 1. Description

Application Note. 8-bit Microcontrollers. AVR091: Replacing AT90S2313 by ATtiny2313. Features. Introduction

8-bit Microcontroller. Application Note. AVR461: Quick Start Guide for the Embedded Internet Toolkit. Introduction. System Requirements

Application Note. USB Mass Storage Device Implementation. USB Microcontrollers. References. Abbreviations. Supported Controllers

USB 2.0 Full-Speed Host/Function Processor AT43USB370. Summary. Features. Overview

Application Note. 8-bit Microcontrollers. AVR270: USB Mouse Demonstration

AVR2006: Design and characterization of the Radio Controller Board's 2.4GHz PCB Antenna. Application Note. Features.

AVR1922: Xplain Board Controller Firmware. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

APPLICATION NOTE. Atmel AVR134: Real Time Clock (RTC) Using the Asynchronous Timer. Atmel AVR 8-bit Microcontroller. Introduction.

AVR055: Using a 32kHz XTAL for run-time calibration of the internal RC. 8-bit Microcontrollers. Application Note. Features.

Application Note. 8-bit Microcontrollers. AVR280: USB Host CDC Demonstration. 1. Introduction

Application Note. 8-bit Microcontrollers. AVR307: Half Duplex UART Using the USI Module

8-bit Microcontroller. Application Note. AVR134: Real-Time Clock (RTC) using the Asynchronous Timer. Features. Theory of Operation.

Two-wire Automotive Serial EEPROM AT24C01A AT24C02 AT24C04 AT24C08 (1) AT24C16 (2)

AVR444: Sensorless control of 3-phase brushless DC motors. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

Two-wire Serial EEPROM AT24C1024 (1)

Atmel AVR4921: ASF - USB Device Stack Differences between ASF V1 and V2. 8-bit Atmel Microcontrollers. Application Note. Features.

Application Note. 8-bit Microcontrollers. AVR272: USB CDC Demonstration UART to USB Bridge

AVR1510: Xplain training - XMEGA USART. 8-bit Microcontrollers. Application Note. Prerequisites. 1 Introduction

8-bit Microcontroller. Application Note. AVR410: RC5 IR Remote Control Receiver

AVR32788: AVR 32 How to use the SSC in I2S mode. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

How To Prevent Power Supply Corruption On An 8Bit Microcontroller From Overheating

AVR115: Data Logging with Atmel File System on ATmega32U4. Microcontrollers. Application Note. 1 Introduction. Atmel

2-wire Serial EEPROM AT24C1024. Advance Information

Atmel AVR4903: ASF - USB Device HID Mouse Application. Atmel Microcontrollers. Application Note. Features. 1 Introduction

AVR2004: LC-Balun for AT86RF230. Application Note. Features. 1 Introduction

USB Test Environment ATUSBTEST- SS7400. Summary

AVR287: USB Host HID and Mass Storage Demonstration. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

32-bit AVR UC3 Microcontrollers. 32-bit AtmelAVR Application Note. AVR32769: How to Compile the standalone AVR32 Software Framework in AVR32 Studio V2

Atmel AVR4920: ASF - USB Device Stack - Compliance and Performance Figures. Atmel Microcontrollers. Application Note. Features.

2-Wire Serial EEPROM AT24C32 AT24C64. 2-Wire, 32K Serial E 2 PROM. Features. Description. Pin Configurations. 32K (4096 x 8) 64K (8192 x 8)

Application Note. 8-bit Microcontrollers. AVR293: USB Composite Device

AT86RF230 (2450 MHz band) Radio Transceiver... User Guide

How To Use An Atmel Atmel Avr32848 Demo For Android (32Bit) With A Microcontroller (32B) And An Android Accessory (32D) On A Microcontroller (32Gb) On An Android Phone Or

DIP Top View VCC A16 A15 A12 A7 A6 A5 A4 A3 A2 A1 A0 I/O0 I/O1 I/O2 GND A17 A14 A13 A8 A9 A11 A10 I/O7 I/O6 I/O5 I/O4 I/O3. PLCC Top View VCC A17

APPLICATION NOTE. Atmel AT04389: Connecting SAMD20E to the AT86RF233 Transceiver. Atmel SAMD20. Description. Features

ATF15xx Product Family Conversion. Application Note. ATF15xx Product Family Conversion. Introduction

STK 500, AVRISP, AVRISP

Application Note. Atmel ATSHA204 Authentication Modes. Prerequisites. Overview. Introduction

Atmel AVR1017: XMEGA - USB Hardware Design Recommendations. 8-bit Atmel Microcontrollers. Application Note. Features.

Table of Contents. Section 1 Introduction Section 2 Getting Started Section 3 Hardware Description

AT91SAM ARM-based Flash MCU. Application Note

Application Note. Atmel CryptoAuthentication Product Uses. Atmel ATSHA204. Abstract. Overview

AVR125: ADC of tinyavr in Single Ended Mode. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AT88CK490 Evaluation Kit

APPLICATION NOTE Atmel AT02509: In House Unit with Bluetooth Low Energy Module Hardware User Guide 8-bit Atmel Microcontroller Features Description

All-band AM/FM Receiver and Audio Amplifier IC U2510B

APPLICATION NOTE. Atmel LF-RFID Kits Overview. Atmel LF-RFID Kit. LF-RFID Kit Introduction

AVR151: Setup and Use of the SPI. Introduction. Features. Atmel AVR 8-bit Microcontroller APPLICATION NOTE

AVR040: EMC Design Considerations. 8-bit Microcontrollers. Application Note PRELIMINARY. Scope. 1 Introduction

AVR1321: Using the Atmel AVR XMEGA 32-bit Real Time Counter and Battery Backup System. 8-bit Microcontrollers. Application Note.

AT91 ARM Thumb Microcontrollers. Application Note. GNU-Based Software Development on AT91SAM Microcontrollers. 1. Introduction. 2.

AVR1003: Using the XMEGA Clock System. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

Application Note. 8-bit Microcontrollers. AVR435: BLDC/BLAC Motor Control Using a Sinus Modulated PWM Algorithm. 1. Features. 2.

8-bit RISC Microcontroller. Application Note. AVR335: Digital Sound Recorder with AVR and DataFlash

Application Note Microcontrollers. Guidelines to Keep ADC Resolution within Specification. Introduction. ADC Resolution

Transcription:

AVR512: Migration from ATmega48/88/168 to ATmega48P/88P/168P Features General Porting Considerations Register and bit names Low-frequency Crystal / Timer/Counter Oscillator 1 Introduction This application note summarizes the relevant differences when migrating from ATmega48/88/168 to ATmega48P/88P/168P. For detailed information on the devices please see the respective datasheets. The ATmega48P/88P/168P is designed to be pin and functionality compatible with ATmega48/88/168, but because of improvements mentioned in this application note there may be a need for minor modifications in the application when migrating from ATmega48/88/168 to ATmega48P/88P/168P. For details on migrating between ATmega48P/88P/168P refer to the migration note AVR 095: Migrating between ATmega48, ATmega88 and ATmega168. 8-bit Microcontrollers Application Note Rev.

2 General Porting Considerations 3 Register and bit names To make the porting process as easy as possible, we recommend to always refer to registers and bit positions using their defined names, as absolute addresses and values may change from device to device. When porting a design it is then often just necessary to include the correct definition file. Some examples are shown below. PORTE = (1<<PORTE5); // Set pin 5 on port E high DDR &= ~(1<<PORTE5); // Set pin 5 on port E as input // Configure USI USICR = (1<<USISIE) (0<<USIOIE) (1<<USIWM1) (0<<USIWM0) (1<<USICS1) (0<<USICS0) (0<<USICLK) (0<<USITC); To avoid conflicts with added features and register functionality, never access registers that are marked as reserved. Reserved bits should always be written to zero if accessed. This ensures forward compatibility, and added features will stay in their default states when unused. Between ATmega48/88/168 and ATmega48P/88P/168P some register bits has been added, but none of the existing bits has been removed, nor moved to different locations. 4 Low-frequency Crystal / Timer/Counter Oscillator The low frequency crystal oscillator of the ATmega48P/88P/168P is optimized for very low power consumption thus the crystal driver strength is reduced compared to the ATmega48/88/168. This means that when selecting a crystal, its load capacitance and Equivalent Series Resistance (ESR) must be taken into consideration. Both values are specified by the crystal vendor. The internal capacitance of ATmega164P/324P/644P low-frequency oscillator is typically 6pF, but the tracks to the crystal will add some additional capacitance. Table 4-1 shows the ESR recommendations for ATmega48P/88P/168P. Table 4-1. ESR recommendation for 32.768 khz crystals for ATmega48P/88P/168P. Crystal CL [pf] Max ESR 1 [kω] 6.5 75 9 65 12.5 30 Note: 1. The values stated are for an oscillator allowance safety margin of 5. Since the oscillator s transconductance is temperature compensated one can use a safety margin of 4, thus giving a max ESR of 90, 80 and 40 kω respectively. For examples of crystals that comply with the requirements see Appendix A. 2 AVR512

The startup times are increased as shown in Table 4-2. Table 4-2. Startup times with 32.768 khz crystals. Crystal CL [pf] Note: Startup time 2 [ms] Atmega48/88/168 AVR512 Startup time 2 [ms] Atmega48P/88P/168P 6.5-600 9 300 700 12.5 400 1700 2. Crystals usually need ~3000ms before they are completely stable with any oscillator design. The time stated is before the crystal is running with a sufficient amplitude and frequency stability. 5 Appendix A Table 5-1 is a selection of crystals that meet the ESR requirements of the ATmega48P/88P/168P. The crystals are listed based on datasheet information and are not tested with the actual device. Any other crystal that complies with the ESR requirements can also be used. Availability and RoHS compliance has not been investigated. Table 5-1. Examples of crystals compliant with ATmega48P/88P/168P low-frequency Crystal Oscillator. Vendor Type Mounting (SMD/HOLE) Frequency Tolerance [±ppm] Load Capacitance [pf] Equivalent Series Resistance (ESR) [kω] C-MAC WATCH CRYSTALS HOLE 20 6 50 C-MAC 85SMX SMD 20 6 55 C-MAC 90SMX SMD 20 6 60 ECLIPTEK E4WC HOLE 20 6 50 ENDRICH 90SMX SMD 5 6 50 EPSON C-001R HOLE 20 6 -> 12.5 (specify) 35 EPSON C-002RX HOLE 20 6 -> 10 (specify) 50 EPSON C-004R HOLE 20 6 -> 10 (specify) 50 EPSON C-005R HOLE 20 6 -> 10 (specify) 50 EPSON MC-30A SMD 20 6 -> 10 (specify) 50 EPSON MC-306 SMD 20 6 -> 10 (specify) 50 EPSON MC-405 SMD 20 6 -> 10 (specify) 50 EPSON MC-406 SMD 20 6 -> 10 (specify) 50 GOLLEDGE GWX HOLE 5 6, 8 or 12.5 35 GOLLEDGE GSWX-26 SMD 10 6, 8 or 12.5 35 GOLLEDGE GDX1 HOLE 10 6 42 GOLLEDGE GSX-200 SMD 5 6 50 IQD WATCH CRYSTALS HOLE 20 6 50 IQD 90SMX HOLE 10 6 60 IQD 91SMX HOLE 10 6 60 3

Vendor Type Mounting (SMD/HOLE) Frequency Tolerance [±ppm] Load Capacitance [pf] Equivalent Series Resistance (ESR) [kω] MICROCRYSTAL MS3V-T1R HOLE 20 7 or 9 65 MICROCRYSTAL MS2V-T1R HOLE 20 7 or 9 65 MICROCRYSTAL CC4V-T1A SMD 30 9 65 MICROCRYSTAL CC1V-T1A SMD 30 9 60 MICROCRYSTAL CC7V-T1A SMD 30 9 70 MMD WC26 HOLE 8 8 35 MMD WC38 HOLE 8 8 35 MMD WC155 HOLE 8 8 40 MMD WCSMC SMD 20 6 50 OSCILENT SERIES 111 HOLE 10 6 or 12.5 30 OSCILENT SERIES 112 HOLE 10 6 or 12.5 40 OSCILENT SERIES 113 HOLE 10 8 40 OSCILENT SERIES 223 SMD 20 6 50 RALTRON SERIES R38 HOLE 5 6 or 12.5 35 RALTRON SERIES R26 HOLE 5 6 or 12.5 35 RALTRON SERIES R145 HOLE 5 8 40 RALTRON SERIES RSE A, B, C, D SMD 20 6 50 SBTRON SBX-13 SMD 20 6 50 SBTRON SBX-20 SMD 20 6 50 SBTRON SBX-21 SMD 20 6 50 SBTRON SBX-24 SMD 20 6 50 SBTRON SBX-23 SMD 20 6 50 SBTRON SBX-22 SMD 20 6 50 SBTRON SBX-14 HOLE 20 6 50 SUNTSU SCT1 HOLE 20 6, 8, 10 or 12.5 40 SUNTSU SCT2 HOLE 20 6, 8, 10 50 SUNTSU SCT3 HOLE 20 6, 8, 10 50 SUNTSU SCP1 SMD 20 6 50 SUNTSU SCT2G SMD 20 6 or 10 50 4 AVR512

Disclaimer Atmel Corporation 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 Fax: 1(408) 436-4314 Microcontrollers 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 1150 East Cheyenne Mtn. Blvd. Colorado Springs, CO 80906, USA 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 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, USA 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 Literature Requests www.atmel.com/literature 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. Unless specifically provided otherwise, Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel s products are not intended, authorized, or warranted for use as components in applications intended to support or sustain life. 2006 Atmel Corporation. All rights reserved. Atmel, logo and combinations thereof, Everywhere You Are and AVR, are the registered trademarks of Atmel Corporation or its subsidiaries. Other terms and product names may be trademarks of others.