simple maths
Originally Posted by
DavyJones
woohoo I think I got it. Were X is my value read from the AD. I get a nice looking number. What do you think?
x = x - 24
res = x * 7812
res = div32 1000
Hi, Davy
I think you could have got it better !!!
.78125 = ... exactly 25/32 !!!
so, res = ( x * 25 ) >> 5
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks