AREF pin 21

I found a dozen circuits for ATMega328. Half show pin 21 AREF floating and half have AREF to VCC. Which would be correct.

It can be used with the ADC, see the data sheet. Otherwise, it can be left floating.

How low can you go with AREF? I looked at the datasheet and couldn’t find a minimum value. I’ve got an application where I’ll have an analog input that varies between zero and about 5mV. I was looking at externally amplifying it to 0-5V before handing it to the microcontroller; but can I set AREF at 5mV and tie my signal directly in?

I suspect the answer is “no,” but I don’t know why.

The data sheet table headed “ADC characteristics” states that the minimum value of AREF (Vref) is 1.0 V

I just ran across this thread and I realize it’s stale, but DONT let AREF float.

If an AVR device has an AREF pin, then it needs a bypass cap on that pin, even if you are not using the analog functions.

Without the cap, you’ll have events that look like code bugs, but you’ll never be able to find them.

This is not theory, this is experience speaking.

dbvanhorn:
I just ran across this thread and I realize it’s stale, but DONT let AREF float.

If an AVR device has an AREF pin, then it needs a bypass cap on that pin, even if you are not using the analog functions.

Without the cap, you’ll have events that look like code bugs, but you’ll never be able to find them.

This is not theory, this is experience speaking.

Thanks db for the info. Even stale news is good news