My ADC outputs values from 970 and above
I 'm making a voltmeter - amp meter, this one...
I 'm using an STM32F030K6T6.
But when nothing is connected to the input, instead of outputing 0, the ADC gives me a value around 980.
VDDA is tied to VDD.
Boot0 is tied to GND.
These are the ADC 's settings:
ClockPrescaler = ADC_CLOCK_ASYNC_DIV1;
Resolution = ADC_RESOLUTION_12B;
DataAlign = ADC_DATAALIGN_RIGHT;
ScanConvMode = ADC_SCAN_DIRECTION_FORWARD;
EOCSelection = ADC_EOC_SINGLE_CONV;
LowPowerAutoWait = DISABLE;
LowPowerAutoPowerOff = DISABLE;
ContinuousConvMode = DISABLE;
DiscontinuousConvMode = DISABLE;
ExternalTrigConv = ADC_SOFTWARE_START;
ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;
DMAContinuousRequests = DISABLE;
Overrun = ADC_OVR_DATA_PRESERVED;What have I done wrong?
Any help is welcome.