Hi Darrel and Ioannis,
Thanks for the help. I replied earlier but it didn't seem to make it, here goes again...
Ioannis the first thing I did when trying changes was to move to Words for the variables so was surprised when the numbers didn't crunch.
Darrel your code works well but gives 360/256 = 1.4 degree accuracy/resolution and I was hoping for better than this. I'm not strong at math so your comment about binary radians probably means I'm stuck with the original limits, which is probably okay for wind direction - but what do I do if I need greater accuracy for Tilt, etc?
Any suggestions and help is appreciated, thanks guys.
Bill
If you need more resolution, you'll need to pull out the Big Guns ...
Cordic trig assembly code for PIC18f (scalerobotics)
http://www.picbasic.co.uk/forum/showthread.php?t=10528
<br>
DT
Bookmarks