Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Avr A/d

Status
Not open for further replies.

lord loh.

Member
I am new to AVR and would like to use the AVR's ADc fecility. I am using the ATmega8535.

I do not follow the AVcc and AREF concepts.

The AVcc seems to be just as a feature to provide a seperate supply for the ADC. Altough, the ADC also requires 5V. The same as the AVR. So it is alright if I connect the AVcc to the Vcc and decouple it to the GND?

The Aref seems the ADC reference voltage. The datasheet mentions that there is an internal reference voltage of 2.56v. So If I do not bother with the Vref, is it okay? Should I decouple it to the ground?

I need to measure the temperature using an LM35 sensor. I am supplying the LM35 with 5v as well... So my output voltage can be around from -1v to 5v according to the datasheet of LM35. So I guess my Aref should be +5v and I cannot simply decouple it to the ground and forget all about it.
Am I correct?


I was also wondering what values shall I obtain the ADC registers if
  • Analog voltage is below GND?
  • Analog voltage is above Aref?
 
lord loh. said:
I was also wondering what values shall I obtain the ADC registers if
  • Analog voltage is below GND?
  • Analog voltage is above Aref?

I've never used an AVR, but it's generally HIGHLY recommended that you design your circuit so neither of those two can ever happen!.
 
AVCC is internally isolated from the VCC terminal, and needs to be within a diode drop of it. The idea is to isolate it from the main logic power supply, and decouple it to the local analog ground. The usual point is to make sure the analog ground plane is tied to the logic ground plane to prevent current loops from the logic. But if you want to connect it directly, go right ahead.

AREF needs to be decoupled to ground - one of the ADC settings is to enable the 2.5V "reference" and put it on the AREF pin, but it still needs some capacitance. (BTW, check the specs of the "reference" and make sure it is tight enough - many people laugh when they see its "specs").

Nigel's right - If you have a negative power supply, then you'll need to figure out how to push it above ground - just put a (biased) diode in series with the LM35's ground pin. This will let you see "-.6V" worth of signal, at the expense of the upper side of the rail.
 
There is no dedicated analog ground connection on the AVR. Just make sure all the analog circuit is grounded to a single point near the AVR, and give the AVR a nice solid ground plane.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top