asm in 2 cogs. got it workin.
agfa
Posts: 295
having trouble getting 2 asm routines to run in separate cogs.· i created a short program as a test which works, so i'm using it as a model for another program but i get erratic unpredictable results.· i'm sure i have something wrong that is creating a conflict.
i've attached my model program.· is this the correct way to start 2 cogs·running asm?· could someone point me in the right direction for more info on this?
Post Edited (agfa) : 11/5/2008 2:38:07 AM GMT
i've attached my model program.· is this the correct way to start 2 cogs·running asm?· could someone point me in the right direction for more info on this?
Post Edited (agfa) : 11/5/2008 2:38:07 AM GMT
Comments
the program i posted actually works correctly.· the symptoms i get are things like outputs going high that haven't had dirs set, or all cogs apparently shutting down.· weird stuff.· i thought i was going about it all wrong in the dat section or something.
I'll simplify·the program, with the problem, as much as i can and still get the symptoms and post it tommorrow.
- place an ORG after TST2, you want the second part of the DAT section to be assembled starting from·location 0 again.···
my goal is to become more familiar with asm.· i wrote this to·read pulse widths from a RC receiver, process it,·and generate servo outs.· the first asm cog generates servo outputs, the second measures input pulse widths.· as a test i want to measure it's own output pulses.· i was able to·do this with spin, but wanted to do it in asm.
the first problem i had was with the waitpeq, my attempts to troubleshoot it created other unusual operation.
when i add the org·as nutson suggested i don't get any·PWM output and i get a return (pulsout) value of 666, as expected.· without the org i get PWM but the return value is 33947910 instead of 666.
i have I/O 0·toggle an LED along with the debug statement.· in both cases the LED will eventually quit·toggling but the debug continues to·occur.
any insight?
agfa
Post Edited (agfa) : 6/14/2009 1:20:07 PM GMT