11/27/2023 0 Comments Arduino timer interrupt stepper motor![]() Just not sure if the output pulse will be long enough to step the motor driver which is on a remote board and connected through a ribbon cable. Looks like I can use a GPT output and have it pulse the output pin when the timer reaches a compare register value, and will also generate an interrupt which I can change the compare value to the next value in the accell/decell table. Thanks for the tip and links but none of that will help generating a simple step clock. ![]() The links to the specific pages don't work from this link, but you might be able to find something useful on : Here's the equivalent page from 2011 when the Motor Control section details Coldfire. Here's all the Motor Control stuff, but nothing remaining there for Coldfire: Not much use - it uses a separate SPI-connected motor controller chip: Here's information on the Motor Control units in the Tower System, and how to use them with Kintetis CPUs. Here's an old set of Fact Sheets that mentions Stepper Motors, but only for the ETPU in the MCF523x: ![]() Here's a Video telling you how to use NXP/Freescale products that might have some references: There might be some useful code associated with this: Here's a Robot with four stepper motors, but since that might be more than the MCF5225x can drive, it might be using external motor controller chips. There's nothing specific to driving stepper motors in this, but there might be some useful low level driver code in here: Pretty sure this has been done at least a few hundred times before and just want to leverage some knowledge, possibly some code Thought PWM would be the best but now thinking about using a timer output and interrupting on falling edge to have ample time to load a new value for the next leading edge but it's not double buffered and I'd have to subtract the current value from the target value to avoid clock jitter caused by ISR latency, sounds like a mess. This is just a simple stepper clock and not phase control but don't want to hack something in when there's a simple way to do it.Īccell and decell profiles are fixed so ideally I'd generate a table of timer values, interrupt on each clock output to track position, then output the next timer value to accell or decell or just let the output run to maintain cruise, kinda stepper motor control 101. It's a simple thing I've done on other processor families but seems there are are many ways to generate a simple stepper motor clock to control accell/cruise and decell on the 52259.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |