That's from the ADFM bit. For 10-bit A/D, use ADCON0.7 = 1 ; right justify
The math depends on what you're reading, but this might help ..
http://www.picbasic.co.uk/forum/showthread.php?p=2010
<br>
That's from the ADFM bit. For 10-bit A/D, use ADCON0.7 = 1 ; right justify
The math depends on what you're reading, but this might help ..
http://www.picbasic.co.uk/forum/showthread.php?p=2010
<br>
DT
Thanks Darrel!
I changed the; ADCON0 = %00000001 to ADCON0 = %10000001, and it works!
And yes, the link helped me do some math too, only; how can I get two decimals?
Thanks again!
For 2 decimals, multiply by 500 instead of 50.
Then this will display the value with 2 decimal places ...Code:LCDout $FE,2,"V= ",DEC Volts/100,".",DEC2 Volts//100," Vdc"
DT
Bookmarks