Brain Burp Rounding??
Paul Hutchinson email (remove spam text)
You got the rounding correct, by anyone's method :-).
But, if the input value can be > 0.99804 it will overflow the 8 bits.
To make it work for any value < 1 you should multiply by 255.
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
In reply to: <3B17B80A.email@example.com>
See also: www.piclist.com/techref/index.htm?key=brain+burp+rounding
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the