In my Application, I have to measure a voltage from an analog PIN periodically. The voltage is turned dynamically. That means, the voltage is normally turned off and is 0v, it is turned on and rises to a certain value, lets say 3.26v(the rise time is quite short and is about 5µs)the ADC resolution is selected as 10 bit, so the digital value of the voltage is 1024*3.26/3.3=1011 in the theory. In the practice it is not so. If I start to measure the voltage right after the voltage is turned on, the digital value I get will be much smaller than the theoretical value 1011. but if i make a small delay after the voltage is turned on and then start the ADC, the digital value will be bigger but still smaller than the 1011. only if the delay time reaches about 80us, the digital value is near 1011. the following is an experiment I did. the voltage is 3.26v.
Delay time(µs) Digital Value
the delay time is a bit too long for my application.
Has anyone got the same problem with me? Can this problem be caused by the false setting of the ADC registers? Or it is the property of this Microcontroller?