Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: Actively manipulating a Teensys clock to Control a stepper motor.

  1. #1

    Actively manipulating a Teensys clock to Control a stepper motor.

    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!

  2. #2
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,385
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •