Here's a different way to do it that should be a little more accurate.
https://www.picbasic.co.uk/forum/showthread.php?p=2010
Just change the Res1 and Res2 variables to match your voltage divider.
<br>
Here's a different way to do it that should be a little more accurate.
https://www.picbasic.co.uk/forum/showthread.php?p=2010
Just change the Res1 and Res2 variables to match your voltage divider.
<br>
DT
Thank you for the help,
I tested his/her program but it presents the same problems of mine. With the increase of the tension of the source, 0-25V, the mistake is going increasing, that it begins with 1mV for 10V of the source and it arrives to 8mV with 24V of the source.
Thank you,
LLEEDD
Hmmm, I don't see how you can be more accurate since:
1. For 8bit ADC, each step is 25/255=0.098 Volts
2. For 10bit ADC, each step is 25/1023=0.0244 Volts.
May be you have to use an external ADC with more resolution.
Ioannis
Bookmarks