0

enter image description here This is from the Atmega328p datasheet. But I see no mention of it in practical examples. So when I'm setting up the timer for ADC with:

ADMUX = _BV(REFS0);

Should I add the cap? Or might it be already there on the arduino's hardware? Also what value is advised? 100nF? Thanks in advance!

1 Answer 1

1

According to the datasheet:

The voltage reference may be externally decoupled at the AREF pin by a capacitor for better noise performance.

So you can but you don't have to. It all depends on how good you want your ADC results to be. 99% of the time it's pointless since what you're reading isn't that accurate, but if you want to add a capacitor anyway then sure, go right ahead.

What value capacitor? Well that very much depends on what kind of noise you want to achieve more immunity from. The lower the value the higher the frequency it will help protect you from. You may want to combine multiple capacitors in parallel if you're in a very noisy environment, such as 1nF and 100nF.

1
  • Thanks for clearing that up! I'll test it out and see if it improves anything or not.
    – Gaai
    Sep 28 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.