You could simplify your math to make it easier for the Picbasic commands.
Since you have:
Temp = ADC10 * ((ADC10 * .00034) + .2235)
Why don't we get rid of that ugly .00034
1/.00034 = 2941
So we multiply both sides by 2941 ...
Temp * 2941 = ADC10 * (ADC10 + 657)
Then lets divide both sides by 2941 ...
Temp = (ADC * (ADC10 + 657)) / 2941
Then you can use div32
Code:
dummy = ADC10 * (ADC10 + 657)
Temp = div32 2941
And I think the result is close enough...
Last edited by ScaleRobotics; - 25th November 2010 at 17:49.
http://www.scalerobotics.com
Bookmarks