Electronics > Electronics

AVR AREF pin and AVCC pin


whats the worst that could happen if i ignore the AREF and AVCC pins on an AVR microcontroller?

its occured to me that many people dont use them, and im not entirely sure what these pins do . . .

From the Data Sheet:

AVCC is the supply voltage pin for the A/D Converter, PC3:0, and ADC7:6. It should be externally connected to VCC, even if the ADC is not used. If the ADC is used, it should be connected to VCC through a low-pass filter. Note that PC6..4 use digital supply voltage, VCC.

AREF is the analog reference pin for the A/D Converter.

If you're not using the A/D, you don't need to connect AREF.

- Jon

yea, I plan to use ADC.

so a low-pass filter . . . ive seen inductors used in series between VCC and AVCC, but i dont have any on me. anyway i can use a capacitor? suggested value? my guess is that a ~10uF cap between AVCC and GND would work, right?

so what does AREF do, exactly? where does it connect? what does it actually reference? :P

(blaaaaaah im still a noob to AVR, obviously)

You and me both, Admin. I just got my first AVR programmed last night.

A low pass filter in this case is basically a 0.1 uF cap between AVcc and ground, as close to the pins as you can make it.

It doesn't hurt to put a 0.1 uF cap in between AREF and ground as well. In my design I tied AREF to Vcc, although I don't think that is strictly necessary, because I suspect you can use AVcc internally.

The point behind having something like AREF is so you can feed it an input from a super-stable voltage source, and it will scale the A/D inputs from ground up to AREF with the full 10 bits of precision. Of course, you need to make sure none of your analog inputs go over AREF if you are using it like that.

- Jon

I will paraphrase you on this for the next tutorial :P

I suspect that the low pass filter isnt necessary if I just want to measure photoresistors on the ADC, but I can see it as necessary for other more sensitive sensors like IR detectors.

Ive always added a low pass filter cap between power and ground on all my microcontrollers before, knowing that it is good practice but not entirely understanding why. Interesting how AVR specifically requires it . . .


[0] Message Index

Go to full version