diff --git a/cores/arduino/wiring.c b/cores/arduino/wiring.c index e8dc0e9ead9bd60482ab09ca62ee2b4357224f81..1a2feafa74a5c086684bbddfee21e01ed98b0bca 100644 --- a/cores/arduino/wiring.c +++ b/cores/arduino/wiring.c @@ -109,9 +109,9 @@ void init( void ) ADC->INPUTCTRL.reg = ADC_INPUTCTRL_MUXNEG_GND; // No Negative input (Internal Ground) - // Averaging (see table 31-2 p.816 datasheet) - ADC->AVGCTRL.reg = ADC_AVGCTRL_SAMPLENUM_64 | // 64 samples - ADC_AVGCTRL_ADJRES(0x04ul); // Adjusting result by 4 + // Averaging (see datasheet table in AVGCTRL register description) + ADC->AVGCTRL.reg = ADC_AVGCTRL_SAMPLENUM_1 | // 1 sample only (no oversampling nor averaging) + ADC_AVGCTRL_ADJRES(0x0ul); // Adjusting result by 0 analogReference( AR_DEFAULT ) ; // Analog Reference is AREF pin (3.3v)