Thanks for the help Skimask, it helped a lot. I used your method with a couple of modifications and it seems to work very well.
First, I added to your method was to define minimums and maximums. I was having problems bumps/shakes of the accelerometer making the min and max values go well outside of the range which I wanted to capture (which is neutral to 90 degrees on either axis). The MIN and MAX statements solved that.
I also added a line to subtract the minimum value from the capture adc value. This ensured that the final output was actually 0-127. Without it, my output would never go all the way down to 0.
In the long run (as I am sure many of you will notice) I will probably just define range since I know what the adc values are at +90 and -90 degrees. I haven't done that yet, because I want to be sure that environmental variables don't affect the accelerometer output.
Here is the routine that I ended up using....
modcheck:
ADCIN 1,modval ' Read channel 1 to modval
modval=modval min 166
modval=modval max 91
if modval<minval then minval=modval
if modval>maxval then maxval=modval
range=maxval-minval
modval=modval-minval
scalefactor=65535/range
modvalnew=modval*scalefactor
modvalnew=modvalnew>>9





Bookmarks