Simple stepper driver using the pio #16910
Unanswered
jbodegraven
asked this question in
RP2040 / Pico
Replies: 1 comment 1 reply
-
Interesting, thanks for the example. Probably a Github repository is best. Then a link from: |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As per this thread https://github.com/orgs/micropython/discussions/16868#discussioncomment-12452613 I coded a simple stepper driver in pio to see if it's feasable.
I guess it maxes the pio out but supports linear ramp up and ramp down.
3 parameters pushed on the fifo configure the run:
Once these parameters are provided the pio executes a complete run.
Other parameters are hardwired, but together with the state machine's execution frequency allow for a lot of flexibility.
All my steppers are in machines right now ;) but I've checked the signal with my scope:

Timing isn't going to be super perfect but i guess it will be good enough.
This would need more support in uPython to set the stepper's direction and enable pins, check parameters etc.
Not sure if this is the right place to post. If there's interest I can create a github repository.
Beta Was this translation helpful? Give feedback.
All reactions