AtXmega128A3U access ADC Chnls 8 - 15

Gast #3655098
Hello there,

i´m wondering how to Access the ADC channels 8 to 15 on an AtXmega128A3 
device. I´m not even sure, if they realy exist, since i found 
conflicting documentation (from my Point of "understanding")

The application note AVR1324 on page 12 looks like there are only 
channels from 0 to 7 in A devices.
http://www.atmel.com/Images/doc8378.pdf
Also the iox128a3.h file doesn´t give defines for more than 8 channels 
(see ADC section "ADC - Analog/Digital Converter").
But on the other hand the document "ATxmega64A3U/128A3U/192A3U/256A3U 
Complete" on page 55 mentions, there are alternate functions e.g. ADC 
channels 8 to 15 on PORTB.
http://www.atmel.com/Images/Atmel-8386-8-and-16-bit-AVR-Microcontroller-ATxmega64A3U-128A3U-192A3U-256A3U_datasheet.pdf

Am i mixing the Information from the different documents to a bad 
tasting recipe?
Gast #3655136
The only relevant document is the specific datasheet. Of course, if the 
header file does not implement all functionality of a device, that's a 
problem of the header.

Oliver
Gast #3655326
The ATxmega has 2 ADC. 1 on port A and 1 on port B. Each of them has 8 
channels. So if you're currently working with ADCA (ADC on port A) you 
can access the other 8 channels by working with ADCB (ADC on port B).

See http://www.atmel.com/Images/doc8077.pdf for reference:
The input pins are used for single-ended and differential input, while 
the internal inputs are directly available inside the device. In devices 
with two ADCs, PORTA pins can be input to ADCA and PORTB pins can be 
input to ADCB. For AVR XMEGA devices with only one ADC, input pins may 
be available for ADCA on both PORTA and PORTB.
Gast #3656356
Still confused...

Looks like i made an incorrect Statement right at the beginning without 
knowing it. The devices type defines are corresponding to
ATXMEAGA128A3U->>AU<<  and not
ATXMEGA128>>A<<3U...

Thats why i left the last two letters at the first post and i found the 
difference (see attached Picture)

Plus my Compiler only offers an iox128a3.h file which only contains 
defines from 0 to 7. So i guess currently i´m using the wrong Header.
I coulnd´t find something like iox128a3au.h via Google or on my local 
machine.
Angehängte Dateien:

Antwort schreiben

Eine eigene Frage? Dieser Thread ist über 12 Jahre alt. Stell sie in einem eigenen Thread – dort lesen mehr Leute mit, und sie wird öfter und schneller beantwortet.

Neuen Thread starten

Eine Lösung, Ergänzung oder Rückmeldung zu diesem Thread? Dann antworte hier.

Formatierung
  • [c]C-Code[/c]
  • [code]Code in anderen Sprachen, ASCII-Zeichnungen[/code]
  • [math]Formel in LaTeX-Syntax[/math]
  • [[Titel]] – Link zu einem Artikel
  • Verweis auf einen anderen Beitrag: Rechtsklick auf dessen Beitrags-ID (#8078628), „Adresse kopieren“, in den Text einfügen

Mehr zur Formatierung

Längeren Sourcecode als Anhang, nicht in den Text. JPG nur für Fotos und Scans; Zeichnungen und Screenshots als PNG oder GIF. Siehe Bildformate.

Schon registriert? Anmelden

Wird nicht angezeigt. Wir schicken dir einen Link; sobald du damit bestätigst, erscheint dein Beitrag.

Mit dem Abschicken legst du einen kostenlosen Account an und erkennst die Nutzungsbedingungen und die Datenschutzerklärung an.