Commit c8f7fbce authored by Martin Vítek's avatar Martin Vítek

ADC averaging is not working...

parent 7bdc3d04
......@@ -124,6 +124,9 @@ class adc_class
ADC->CTRLB.reg = ADC_CTRLB_PRESCALER_DIV4 | ADC_CTRLB_RESSEL_12BIT;
while (ADC->STATUS.bit.SYNCBUSY) ;;
//Averaging of 4 samples
//ADC->AVGCTRL.reg = ADC_AVGCTRL_SAMPLENUM_4 | ADC_AVGCTRL_ADJRES(0x02);
//Select negative input as GND, positive as AIN0
set_input(input[CURRENT_180V]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment