Display one digit after the decimal point
Archiver
Posts: 46,084
What would be the best way to divide 377 then display a result of
xxx.x on LCD? I am trying to use the / then // operators, but can't
figure out how to get the correct result on display.
Hai
xxx.x on LCD? I am trying to use the / then // operators, but can't
figure out how to get the correct result on display.
Hai
Comments
Whole = x/10
Frac = x//10
Writenumarg=Whole
Gosub writenum
Char="."
Gosub writechar
Writenumarg=frac
Gosub writenum
You can also use the DIG operator....
Al Williams
AWC
* Floating point A/D
http://www.al-williams.com/awce/pak9.htm
>
Original Message
> From: hai_m_2000 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=mKnByzykWZxYQz6iM_Xt94_6cgIwF_0MwM68VX5qOJgaedFe6okB4ObgfHcgozmq4tPE1djzd0gFJA]hai_m_2000@y...[/url
> Sent: Monday, June 16, 2003 9:14 PM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] Display one digit after the decimal point
>
>
> What would be the best way to divide 377 then display a result of
> xxx.x on LCD? I am trying to use the / then // operators, but can't
> figure out how to get the correct result on display.
>
> Hai
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the
> Subject and Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
>