[328] What is AREF pin?

I'm working with atmega long time now and I should know what that pin do but I always
skipped it not sure why, I'm at the point to build a circuit for scientific purposes and I'd
like to know what exactly that AREF pin does, should i live it like that or at least connect something
with the pin?

D.60

You can attach an external voltage reference to this pin to change the characteristics of the A/D converter.
You should connect a .1uf ceramic capacitor from this pin to ground in your stand alone projects.
You can find information about this in the Data Sheet.
.

What will happen if i don't connect anything to it, i just leave it like that, will be that a problem?

1 Like

Done right, it should always be attached to a de-coupling .1uf ceramic capacitor.

Done right, it should always be attached to a de-coupling .1uf ceramic capacitor.

Ok but what If i do not connect anything to it, what will happen, will that affect anything in my board?

It will probably give you intermittent errors if you are doing analogReads.

The analogRead will be a little more noisy. Using a number of samples and use the average can solve that.

Sometimes the AREF is connected to the 3.3V pin for 3.3V analog sensors.

The AREF can be used for other things as well. When the internal reference is set, the AREF can be measured with a multimeter to check what the exact internal reference is. That means it can be used (with many restrictions and pifalls) as an output.

It is even possible to use AREF as some kind of analog input (with many restrictions and pitfalls), since AREF can be measured with the internal reference as reference.

When a external voltage reference is used to AREF, the analogReference() has to be called before analogRead(), or else an internal shortcut will occur.

There is an internal resistor from the AREF pin to GND of about 32k.

You wanted to know exactly what the AREF pin does, check the figures in the datasheet. However, it is impossible to tell exactly want can be done with it, because there are probably more and even worse ways to misuse the AREF pin :o

You could easily solder a SMD .1uf 1206 capacitor between pins 22 (GND) and 21 (AREF) if an ATMEGA328 .
.

You could easily solder a SMD .1uf 1206 capacitor between pins 22 (GND) and 21 (AREF) if an ATMEGA328 .
.

There is an internal resistor from the AREF pin to GND of about 32k.

32k resistor?

I’d like to solder as Larry said a capacitor but at this moment i got only resistors, can i solder resistor?
Can i solder 22pF ceramic capacitor? i got a lot of them :D?

No, you need to buy some .1uf ceramic capacitors.

So if i don’t solder any cap to AREF-GND the Analog pins will not work as needed?

They will work but, there may be errors in your readings.

Well, thanks for the information, i already made the circuit ready for printing and im lazy to put a new component :smiley: maybe in the next version or i will solder directly between the pins the smd cap :smiley:

thanks,

D.60

i already made the circuit ready for printing

I have soldered SMD 1206 .1uf caps. between pins many times.
22 is next to 21 :wink:

I have soldered SMD 1206 .1uf caps. between pins many times.
22 is next to 21 :wink:

That's what I have in my mind :smiley: the circuit is not using any Analog pins but better to have the cap
if sometime someone will use the analog pins.

1 Like