Help with assembler (Resolved, thanks)
Onni
Posts: 7
I simply don't get it.
I am trying to write a servo pulse width reader in assembler. So I can send steering·commands to the propeller from my RC-controller.
This little piece of code works:
And then I output (Data1 - Data0) in Spin in another COG to a terminal and se the values change from 1.2 - 1.7mS·when I move the stick.
Great!
But I really want a time out in the waitpeq. If the·transmitter is turned off the signal goes flatline and I want to do other things in this COG.
So I try to break the waitpeq in to pieces so I can insert time out code:
But this code doesn't work! Why?
/Onni
Post Edited (Onni) : 4/28/2008 9:15:23 PM GMT
I am trying to write a servo pulse width reader in assembler. So I can send steering·commands to the propeller from my RC-controller.
This little piece of code works:
waitpeq Mask, Mask mov Data0, cnt waitpne Mask, Mask mov Data1, cnt
And then I output (Data1 - Data0) in Spin in another COG to a terminal and se the values change from 1.2 - 1.7mS·when I move the stick.
Great!
But I really want a time out in the waitpeq. If the·transmitter is turned off the signal goes flatline and I want to do other things in this COG.
So I try to break the waitpeq in to pieces so I can insert time out code:
ch0 test Mask, ina wz if_z jmp ch0 mov Data0, cnt ch1 test Mask, ina wz if_nz jmp ch1 mov Data1, cnt
But this code doesn't work! Why?
/Onni
Post Edited (Onni) : 4/28/2008 9:15:23 PM GMT
Comments
And the sad part is that I knew that [noparse]:)[/noparse]
Thanks!