Hello

Trying to use some floating point.

PIC16f886

I have tried it several ways by no real luck

I have an number that need to be mulitiplied by .2235 to get corrrect result

Result can be rounded back to integer

For example

number = 250 usually a varriable but have tried it this way for testing

I have tried

number * .2235 ( won't compile)

and

number * (1000/4474) Compiles but result is zero

Answer should be somewhere around 55.8

I am not sure if the math is not working or I can not just see the number

That is; once the number is computed it is sent out RS232, it would work best if it was a whole number between 0-255 at time of sending
in this case 56 would be great.

Not sure where the problem lies.

Should the math be working ?

Is so how do I round to a whole number ?

thanks

Mark




Quote Originally Posted by mackrackit View Post
I have never used them, maybe they are OK.
http://www.awce.com/compare.htm