I'm setting up a small project where I need to read a voltage (between 0 and 1.56V) and display it on a small OLED screen.
Everything's fine if I want to measure the STM32F103C8T6 3.3V power supply. The ADC (PA0 pin) is perfectly working. The PA0 pin is connected to a 47k resistor which itself is connected to GND.
But what I want is to measure an external voltage. So I took a small AAA battery to test its voltage and see if it would be properly displayed on the OLED screen.
The Battery positive side is connected to PA0 (and The PA0 pin is connected to a 47k resistor which itself is connected to GND) and the Battery negative side is connected to GND.
But the ADC does not detect any voltage in this case....
Any idea what is wrong ? I must be missing something which is very obvious but I don't see what exactly ...