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!

asked Sep 28, 2022 at 13:56

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.

answered Sep 28, 2022 at 14:50
1
  • Thanks for clearing that up! I'll test it out and see if it improves anything or not. Commented Sep 28, 2022 at 15:47

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.