Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Using the atmel atmega 16 ADC

Status
Not open for further replies.

phele

Newbie level 4
Joined
Jul 24, 2013
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
78
Hi everyone

Some how after reading the data sheet countless times and after doing some tasks using the atmega16 ADC, i somehow find it difficult to understand some concepts
as follows

1) The difference in reference voltage i.e AVCC (5V), internal ref (2.56V) and AREF (ext)
what significance does the internal vRef have over other ref voltages?
To my knowlegde the Aref pin has a min voltage of 2V on its pin
and the resolution of AVCC is between 0-1023 as well as Internal Ref 0-512.
but what other properties are associated with internal ref when using feedback voltage on the adc0 pin?
2) I need to receive 2 ADC input voltages, to my understanding this cannot happen simultaneously. Conversion after conversion
but all the forums i have been to use C as the programming language, any assistance on the assembler coding...specific emphasis on the ADCH/ADCL value and how to save these results before starting a new conversion on another< pin i.e form ADC0 to ADC1 back and forth.


my project is to build a DC- DC converter in <the Buck operation and i need to keep a constant voltage on the output regardless of which load is used, apparently this is associated with feedback and an ADC is to be used.
All i need is some in depth explanations on the two points raised.

Many thanks in advance
 

Hi

1) the reading on the ADC is Vinput / Vreference * 1024. If Vreference changes, then you obtain different readings with the same Vinput, and this in most cases unacceptable. You then have various choices:
- use a good quality AVCC
- use a reference voltage source connected to AREF
- use the internal ref that is independent from AVCC within a given VCC range

Of course the maximum value you can read is equal to Vreference, so if you use internal ref you are limited to 2.56V

2) why using assembler? Believe me, even at -O1 the GCC compiler will give you a quite efficient code. If you want a real boost in ADC performance, I strongly recommend moving to ATXMega.
 

Thanx for the response, never thought i would get it this soon time is really not on ma side.

we had an assignment earlier in the year and a Pulse Width Module was given to us on some sort of dev board and we couldnt alter its contents (hardware + assembly code)
The interesting thing was the reference voltage used was internal 2.56V and no reason was given for this.
The other thing was that from building a DC-DC circuit a feedback voltage was needed to keep Output voltage constant when a RL(load) was changed.
all that was said was keep ADC0 input below 5V considering the Boost Converter voltages could be well beyong 5V!!
what i couldnt understand was why the internal 2.56V was used and not the AVCC ref instead ...
The lecturer has completed the course with us and is not available for questions as such.

And to point out that as the curricula is imposed, we are constraind to using the ATmega 16 and Atmega 32... (Atmega 32 > C and Atmega16 > Assembler)
Thank you kalbun
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top