Robot Dude wrote:
Not sure why the discrepancy in values though. If the program is supposed to generate a 1100uS pulse, why is there a 40uS-ish discrepancy?
I did some testing and worked with Nathan... I know what the cause is. The overhead to get into the pauseus command after exiting the pusleout command is the culprit. The more complex the arguments for the command the longer it takes to get into the command. Takes less time to load a constant argument than a variable one, and it takes less time to load a variable than to calculate an expression.

Here is how I implemented the build PPM function.
Code:
makepulses:
pulsout 15,800
pauseus ((cha1*2)-800)
pulsout 15,800
pauseus ((cha2*2)-800)
pulsout 15,800
pauseus ((cha3*2)-800)
pulsout 15,800
pauseus ((cha4*2)-800)
pulsout 15,800
pauseus ((cha5*2)-800)
pulsout 15,800
pauseus ((cha6*2)-800)
pulsout 15,800
pauseus ((cha7*2)-800)
pulsout 15,800
So I broke some rules there. I need to do the math and send the results to variables, then do the above routine. There will be some overhead but once it's calculated it should be constant in all the values, therefore making it possible to subtract it out. Yehaa! Mystery solved.

_________________
Jim Frye, the Robot Guy
http://www.lynxmotion.comI've always tried to do my best...