Forum: Mikrocontroller und Digitale Elektronik AtXmega128A3U access ADC Chnls 8 - 15


von Jasson (Gast)


Lesenswert?

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?

von Oliver (Gast)


Lesenswert?

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

von Marcel (Gast)


Lesenswert?

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.

von Jasson (Gast)


Lesenswert?

Ahhh, thanks for specific hint and the document link. Now things are 
clearing up!

von Jasson (Gast)


Angehängte Dateien:

Lesenswert?

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.

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.