So for a project I'm working on I need to control 2 high-speed motors, and due to the high speed, we had to switch from the Arduino UNO to the DUE to have a fast enough processing speed. Unfortunately, when I did this the libraries I used no longer worked. I do not have a lot of experience with c++ but I am trying to convert the libraries I used, however, I have no idea where to start with this. Is it as simple as changing PIN numbers (and if so what are the pin numbers), or is this something way over my head?
For context, these are the libraries that I am using:
There are hardware dependencies in this file:
It is using a timer interrupt to execute steps at 2 kHz. It also assumes all of the Step pins are on PORTB (Pins 8-13).
It shouldn't be hard to get a 2 kHz timer interrupt on a DUE but I don't know how to do Direct Register Access on the DUE. You may need to find a different library to do 3-axis linear interpolation. Or you could change it from Direct Register Access to regular digitalWrite() at the expense of interrupt execution time.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.