An ADC turns a continuously varying input voltage into an integer, a count. We’ll start with what that count means: how to get from a voltage to a count, and back again. Subsection 6.1.2 works that relationship out in full, and we’ll use it all day. Commit to an answer before we discuss it.
If it does not come back to you straight away, look back at Subsection 6.1.2, and if you would rather sort it out properly after class, that is fine too: the next part starts from the STM32C031C6 datasheet and does not depend on this.
The ADC is 12-bit with \(V_\text{ref} = 3.3\text{ V}\text{.}\) A voltage of exactly 1.65 V is applied to the pin. What count do you expect? Note the number.
Now the other direction: the ADC reports 3072. What voltage is on the pin? Give your answer in volts to two decimal places, and state what one count is worth in millivolts.
The count is a bin number: the range is chopped into 4096 equal bins, so we divide by \(4096\) and not by 4095. The top bin is number 4095, and it covers the voltages just below \(V_\text{ref}\text{,}\) which is why full scale reads 3.299 V.