Skip to content

Add support for 2-pin stepper driver #5683

@GrbavaCigla

Description

@GrbavaCigla

I’ve implemented a simple PIO-based driver for 2-pin (STEP/DIR) stepper motors for my own project, and I noticed that this library currently only provides a 4-pin stepper driver. Would adding support for 2-pin stepper drivers be of interest to this project? I’d be happy to open a pull request if it aligns with the project’s goals.

Additionally, I was considering adding acceleration support, but I’m not sure how feasible that is using pure PIO assembly. Any guidance or preferences on that would also be appreciated.

Also, I have a question regarding @CBJamo pull request:

let clock_divider = calculate_pio_clock_divider(freq * 136);

The target value is multiplied by 136. I assume this corresponds to the number of instructions in a loop, but I wasn’t able to reconcile that exact number when counting. Could you clarify how 136 is derived?

Metadata

Metadata

Assignees

No one assigned

    Labels

    e-rpIssues for the RP family of chips

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions