ATMEL AVR1505 User Manual

http://www.BDTIC.com/ATMEL
AVR1505: XMEGA training - ADC
Prerequisites
Required knowledge
Atmel® AVR® XMEGA™ - Basics Hands-On Atmel XMEGA - EventSystem Hands-On (recommended)
Software prerequisites
Atmel AVR Studio WinAVR/GCC 20100110 or later
Hardware prerequisites
Flat-headed isolated screwdriver Xplain evaluation board JTAGICE mkII
Estimated completion time:
2 hours
®
4.18 SP2 or later
8-bit Microcontrollers
Application Note
Rev. 8320A-AVR-08/10

1 Introduction

http://www.BDTIC.com/ATMEL
The ADC in the Atmel XMEGA A series has 12-bit resolution. It is capable of converting up to 2 million samples per second (MSPS), and has a conversion time of 7 ADC clock cycles (add 1 cycle if gain is enabled) for 12-bit results. The input selection is flexible, and both single-ended and differential measurements can be done. The ADC can provide both signed and unsigned results, and an optional gain stage is available to increase the dynamic range.
This training is based on the Atmel AVR Xplain evaluation kit which features the ATxmega128A1 microcontroller. Different from most Atmel AVR ADCs, the ADC in the XMEGA A has a pipelined architecture. This means that a new analog voltage can be sampled each ADC clock cycle. Thus, a new ADC measurement can be started while other ADC measurements are ongoing. The result is that the conversion rate is much higher than the conversion time.
ADC measurements can either be done continuously, or be started by application software or events from other peripherals in the device. Up to four different virtual channels are provided. These have individual result and input selection (MUX) registers to make it easier for the application to keep track of the data. It is also possible to use DMA to move ADC results directly to memory or peripherals.
Figure 1-1. ADC Overview
2
AVR1505
8320A-AVR-08/10

2 Overview

http://www.BDTIC.com/ATMEL
Here is a short overview of the tasks in this training:
Task 1: Single Ended Conversion
The most common use of the ADC feature is for single-ended conversions. Here you will learn how this can be done with the Atmel XMEGA.
Task 2: Compare Function
The ADC has a compare function; this task shows how it works and why it is useful.
Task 3: Virtual Channels
This task shows a basic example on how virtual channels can simplify software and ease the implementation when several ADC inputs are used in one application.
Task 4: Event Triggered Conversion
AVR1505
Events can be used to trigger one or several ADC conversions. It can also be used to trigger two ADC’s at the same time for parts with dual ADC.
Good Luck!
8320A-AVR-08/10
3
Loading...
+ 7 hidden pages