Addressed to whoever was getting those strange values like 2244, 2238, etc. Whatever was calculating the ServoPos was doing interger truncation. So, I tried a test to see if it happened with the PIC18 IDE, and that truncation did not happen. However, I see later that using "i" as a Word instead of byte does fix the problem regardless.Hi S,
Who is this addressed to?
C
It was just a FYI that in many cases, the initial servoPos calculation is correct, so those errant values may have been caused by something else, or a buggy compiler.