Bill,
After more testing, I can say that the problem I was seeing was due to my averaging the circular buffer after each sample.
By taking 16 samples (at high speed) then averaging, the vane can never go more than 128 unless it's crossing zero and everything works fine. If the samples are slow enough that the vane can go more than 128, the problem shows up again.
I'm sticking with SIN/COS/ATN.<hr>
The program I'm using is DT_InstruMental. Something I've been working on for awhile that makes it easy to display info from the PIC graphically.
It's still in it's infancy, but the only way to figure out what I need to do with it, is to use it. ... So I'm using it.
Here's one of my favorites so far ...
<object id='stUkhdQ01IR11XRl9VWV1aVF5T' width='345' height='308' type='application/x-shockwave-flash' data='http://www.screentoaster.com/swf/STPlayer.swf' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0'><param name='movie' value='http://www.screentoaster.com/swf/STPlayer.swf'/><param name='allowFullScreen' value='true'/><param name='allowScriptAccess' value='always'/><param name='flashvars' value='video=stUkhdQ01IR11XRl9VWV1aVF5T'/></object>
Bookmarks