Page 1 of 1

Interrupt Driven Stepper Module

Posted: Fri Mar 21, 2008 11:44 pm
by AndyO
Interrupt-driven stepper motor module posted alongside my earlier (non-interrupt) effort:

http://www.sfcompiler.co.uk/wiki/pmwiki ... epperMotor

Seems to work fine for me but I'd be extremely grateful if one of the giant brains who frequent this forum could have a quick look and let me know if the context save in the interrupt is okay or if I need to do more. To my mind it should be okay (the interrupt only does some word additions, subtractions and comparisons and doesn't call any functions or subs) but my understanding of this stuff is less than complete.

Cheers,

Andy.

Posted: Sat Mar 22, 2008 6:59 am
by Steven
I'm not a great expert on interrupts, so I'll let someone else comment on the context saving, but just to say, thanks very much for this. The first module was great, but now the addition of an interrupt driven module is even better.

Keep up the good work.

Kind regards,

Steve

Posted: Sat Mar 22, 2008 12:41 pm
by AndyO
Cheers Steve. It seemed a shame to waste all those lovely processor cycles just sitting in DelaymS loops...

I really like the modular approach of Swordfish and it's made even better by the fact that users can so easily contribute their own libraries and routines. The modules and code snippets posted by users such as yourself have not only taught me loads but I think they really add value to what is already a top-notch product.

Andy.