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



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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

AVR2004: LC-Balun for AT86RF230. 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

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

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

AT91SAM ARM-based Flash MCU. Application Note

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

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

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

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

General Porting Considerations. Memory EEPROM XRAM

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

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

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

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

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

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

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

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

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

256K (32K x 8) Battery-Voltage Parallel EEPROMs AT28BV256

AVR1324: XMEGA ADC Selection Guide. 8-bit Atmel Microcontrollers. Application Note. Features. 1 Introduction

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

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

8051 Flash Microcontroller. Application Note. A Digital Thermometer Using the Atmel AT89LP2052 Microcontroller

How To Design An Ism Band Antenna For 915Mhz/2.4Ghz Ism Bands On A Pbbb (Bcm) Board

APPLICATION NOTE. Atmel AVR443: Sensor-based Control of Three Phase Brushless DC Motor. Atmel AVR 8-bit Microcontrollers. Features.

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

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

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

AVR127: Understanding ADC Parameters. Introduction. Features. Atmel 8-bit and 32-bit Microcontrollers APPLICATION NOTE

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

APPLICATION NOTE. Atmel AT01095: Joystick Game Controller Reference Design. 8-/16-bit Atmel Microcontrollers. Features.

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

APPLICATION NOTE. Atmel AVR600: STK600 Expansion, Routing and Socket Boards. Atmel Microcontrollers. Introduction

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

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

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

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

AT88CK490 Evaluation Kit

64K (8K x 8) Parallel EEPROM with Page Write and Software Data Protection AT28C64B

APPLICATION NOTE. Secure Personalization with Transport Key Authentication. ATSHA204A, ATECC108A, and ATECC508A. Introduction.

AT91SAM ARM-based Flash MCU. Application Note. Analog-to-Digital Converter in the SAM3S4. 1. Introduction

1Mb (64K x 16) One-time Programmable Read-only Memory

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

Atmel AVR4027: Tips and Tricks to Optimize Your C Code for 8-bit AVR Microcontrollers. 8-bit Atmel Microcontrollers. Application Note.

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

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

USER GUIDE EDBG. Description

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

APPLICATION NOTE. Atmel AT02985: User s Guide for USB-CAN Demo on SAM4E-EK. Atmel AVR 32-bit Microcontroller. Features. Description.

AT11805: Capacitive Touch Long Slider Design with PTC. Introduction. Features. Touch Solutions APPLICATION NOTE

AN2680 Application note

AVR131: Using the AVR s High-speed PWM. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

APPLICATION NOTE. Authentication Counting. Atmel CryptoAuthentication. Features. Introduction

AT15007: Differences between ATmega328/P and ATmega328PB. Introduction. Features. Atmel AVR 8-bit Microcontrollers APPLICATION NOTE

8-bit RISC Microcontroller. Application Note. AVR910: In-System Programming

Atmel AT32UC3A3256 microcontroller 64MBit SDRAM Analog input (to ADC) Temperature sensor RC filter

APPLICATION NOTE. AT03155: Real-Time-Clock Calibration and Compensation. SAM3 / SAM4 Series. Scope

SMARTCARD XPRO. Preface. SMART ARM-based Microcontrollers USER GUIDE

Introducing a platform to facilitate reliable and highly productive embedded developments

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

AVR223: Digital Filters with AVR. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

Software Prerequisites Linux Ubuntu LTS. Estimated completion time: 15min. The goal of this hands-on is to:

AVR ONE!... Quick-start Guide. EVK Windows 32104B AVR ONE! 02/10

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

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

Designing Feature-Rich User Interfaces for Home and Industrial Controllers

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

AT89LP Flash Data Memory. Application Note. AT89LP Flash Data Memory API. 1. Introduction. 2. Theory of Operation. 2.1 Flash Memory Operation

Application Note. USB Microcontrollers. USB PC Drivers Based on Generic HID Class. 1. Introduction

formerly Help Desk Authority Quest Free Network Tools User Manual

Capacitive Touch Technology Opens the Door to a New Generation of Automotive User Interfaces

AVR126: ADC of megaavr in Single Ended Mode. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

APPLICATION NOTE. AT07175: SAM-BA Bootloader for SAM D21. Atmel SAM D21. Introduction. Features

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

Application Note. 1. Introduction. 2. Associated Documentation. 3. Gigabit Ethernet Implementation on SAMA5D3 Series. AT91SAM ARM-based Embedded MPU

APPLICATION NOTE. Atmel AVR2033: SAM-ICE Adapter Hardware User Manual. 8-bit Atmel Microcontrollers. Features. Introduction

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

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

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

Transcription:

AVR32138: How to optimize the ADC usage on AT32UC3A0/1, AT32UC3A3 and AT32UC3B0/1 series 1 Introduction This application note outlines the steps necessary to optimize analog to digital conversions on AT32UC3A0/1, AT32UC3A3 and AT32UC3B0/1 series. The ADC is useful in measuring output voltages of i.e. analog sensors and converting them to digital values. There are however considerations during design and implementation which impacts the conversion quality. 32-bit Microcontrollers Application Note Rev.

2 System Model Figure 2-1. ADC controller Schematic 3 Acquisition Time (Sample and Hold) A number of steps are required during an analog-to-digital conversion. When an analog-to-digital conversion begins, one channel select switch is closed (MUX), allowing the sample and hold capacitor to charge. The channel select switch is then opened. The charge applied to the sample and hold capacitor is then converted into a digital representation by the successive approximation register. The acquisition time is related to the sample and hold time which is configurable with a dedicated SHTIM bit field in the Mode Register MR. SHTIM can be set from 0x0 to 0xF and consequently change the sample and hold time from the following equation: Sample & Hold Time = (SHTIM+3) / ADCClock The ADC Clock frequency is selected in the PRESCAL field of the MR register. For example: given SHTIM = 0x0 ADCClock = 5 MHz (Max Freq for 10 bits resolution) Then the sampling time is: Ts (Sample & Hold Time) = (0+3) / 5 000 0000 = 600 ns Note that SHTIM will directly impact the conversion rate of the ADC as it comes in addition to the conversion time itself. 2 AVR32138

AVR32138 4 How to select the Source Impedance Figure 4-1. Equivalent schematic The external resistance of the source (Rs) feeding the sample and hold capacitor will determine the charging value. The goal to achieve is to have the sample and hold capacitance charged to a voltage value Vin ± (Vin/Resolution) at the end of the sampling period. The Worst case appears when Cin is completely discharged and Vin is maximum ADC input voltage. To account for these two worst-case, it is important that the source impedance does not exceed a maximum value. The capacitor charging time is related to the RC value and the input voltage. VCin = Vin x (1 - exp( -t / ((Rs+Rin) x Cin))) Ts = (SHTIM+3) / ADCClock We want : VCin > Vin - (Vin / 2 10 ) Vin x (1 - exp( -t / ((Rs+Rin) x Cin))) > Vin - (Vin / 2 10 ) Vin x (1 - exp( -t / ((Rs+Rin) x Cin))) > Vin x (1- (1 / 2 10 ) 1 - exp( -t / ((Rs+Rin) x Cin)) > 1- (1 / 2 10 ) 1 / 2 10 > exp(-ts / ((Rs+Rin) x Cin)) ln (1 / 2 10 ) > -Ts / ((Rs+Rin) x Cin) Ts / C > (Rs+Rin) x ln (2 10 ) Rs+Rin < Ts / (C x ln (2 10 )) Considering the Rin value as negligible (see electrical characteristics section of the datasheet), we see that Rs is directly impacted by the S/H time and vary from ~ 7kΩ (SHTIM= 0) to 43kΩ (SHTIM= 15). 3

Figure 4-2. Charging Time vs. Rs when ADC clock @5MHz 4 Vin: 3.6V 3,5 3 2,5 2 1,5 1 6.25 kω : 384kSPs 12.5 kω : 294kSPs 25 kω : 208kSPS 50 kω : 135kSPs 0,5 0 0 clock 1 Clock 2 clocks SHTIM: 0x0 = 3 Clocks SHTIM: 0x1 = 4 Clocks SHTIM: 0x2 = 5 Clocks SHTIM: 0x3 = 6 Clocks SHTIM: 0x4 = 7 Clocks SHTIM: 0x5 = 8 Clocks SHTIM: 0x6 = 9 Clocks SHTIM: 0x7 = 10 Clocks SHTIM: 0x8 = 11 Clocks SHTIM: 0x9 = 12 Clocks SHTIM: 0xA = 10 Clocks SHTIM: 0xB = 14 Clocks SHTIM: 0xC = 15 Clocks SHTIM: 0xD = 16 Clocks SHTIM: 0xE = 17 Clocks SHTIM: 0xF = 18 Clocks 5 Solutions To remain compliant with the sampling time constraint, the solutions are: 1. Minimize the total source impedance seen by the analog input channels: The maximum value of the total source impedance should be around 43kOhms in order to reach the Vin-1LSB (given SHTIM set to the maximum 0xF). Nevertheless, the smaller the total source impedance, the faster the acquisition time. Therefore the sensor should be chosen with the lowest output impedance. The figure 4-2 can be used as reference. Adding an impedance adapter interface (operational amplifier ) between the Analog source and the ADC input can be another alternative to lower the total source impedance. 2. Slow down the ADC clock frequency : The period time is increased, therefore the sample and hold time is consequently raised, allowing for a more complete charge of the capacitor. Nevertheless in this case the quantity of sample per second is decreased. 4 AVR32138

1 Disclaimer Headquarters International Atmel Corporation 2325 Orchard Parkway San Jose, CA 95131 USA Tel: 1(408) 441-0311 Fax: 1(408) 487-2600 Atmel Asia Unit 1-5 & 16, 19/F BEA Tower, Millennium City 5 418 Kwun Tong Road Kwun Tong, Kowloon Hong Kong Tel: (852) 2245-6100 Fax: (852) 2722-1369 Atmel Europe Le Krebs 8, Rue Jean-Pierre Timbaud BP 309 78054 Saint-Quentin-en- Yvelines Cedex France Tel: (33) 1-30-60-70-00 Fax: (33) 1-30-60-71-11 Atmel 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 Product Contact Web Site 0www.atmel.com Technical Support 1avr32@atmel.com Sales Contact 2www.atmel.com/contacts Literature Request 3www.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. 2009 Atmel Corporation. All rights reserved. Atmel, Atmel logo and combinations thereof, AVR, AVR logo and others, are the registered trademarks or trademarks of Atmel Corporation or its subsidiaries. Other terms and product names may be trademarks of others.