Tag: adc

  • Give it time

    Give it time

    In hindsight, it’s obvious. Switching the ADC reference voltage takes a bit of time, the voltage on the AREF pin cannot change instantaneously. The Atmega48/88/168/328 datasheet recommends to discard the first sample after changing the reference voltage (in paragraph 24.5.2). So I did. But still I got false readings (or rather: my Atmega48A did). I’m…