We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06058c6 commit 928b796Copy full SHA for 928b796
cores/arduino/wiring.c
@@ -109,9 +109,9 @@ void init( void )
109
110
ADC->INPUTCTRL.reg = ADC_INPUTCTRL_MUXNEG_GND; // No Negative input (Internal Ground)
111
112
- // Averaging (see table 31-2 p.816 datasheet)
113
- ADC->AVGCTRL.reg = ADC_AVGCTRL_SAMPLENUM_64 | // 64 samples
114
- 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
115
116
analogReference( AR_DEFAULT ) ; // Analog Reference is AREF pin (3.3v)
117
0 commit comments