Thanks Henrik,
Is there a way to get better resolution ?
Thanks Henrik,
Is there a way to get better resolution ?
X = 4096 * 100
Percent = div32 value
Lcdout (dec2 percent)
To get .1% is easy, same aproach:Is there a way to get better resolution ?
Since you've got slightly over 4000 counts the smallest unit is around 0.025% but I don't know if you need, or even want, the display to show that?Code:Percent = Value ** 16000 ' Percent is now 0-1000 LCDOUT $FE, 1, Percent / 10, ".", Percent // 10
Or you could do it this way as there is no need to do another math operation on the variable:
Percent = Value ** 16000 ' Percent is now 0-1000
LCDOUT $FE, 1, Percent / 10, ".", Percent DIG 0
Just format the variable....
Dave Purola,
N8NTA
EN82fn
many thanks guys, I'll give it a go when I'm home from work
Bookmarks