Actively manipulating a Teensys clock to Control a stepper motor.

Status
Not open for further replies.

gustavothebear

New member
Hey everyone!

I am trying to use a Teensy 3.2 to control a 5 phase stepper motor for a senior design project. The motor control circuit uses a clock signal and a high or low to determine speed and direction.

Is it possible to actively change the frequency on the teensy to control the motor? I've been looking at the analogFrequencyWrite() function from the FrequencyTimer2 library. But I can't quite get it to work.

Thanks!
 
You should study the processor reference manual (free pdf on the PJRC website). All Teensys have extremely flexible and powerful hardware inside, like for your needs the FTM and the PIT timers, which can never be fully explored with the simplified Arduino C/C++ dialect. Direct writing to the status, control, and channel registers is required after studying and understanding how these work.
 
Status
Not open for further replies.
Back
Top