Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing step motor driving pins #18

Open
vshamsiv opened this issue Jun 5, 2021 · 0 comments
Open

Changing step motor driving pins #18

vshamsiv opened this issue Jun 5, 2021 · 0 comments

Comments

@vshamsiv
Copy link

vshamsiv commented Jun 5, 2021

Hi, thank you for your perfect project. As making the PCB is hard and in the meantime CNC shied available; is it possible to modify your code as below the we can use that shield :
(I copied this from grbl library in cpu_map.h).
// Define step pulse output pins. NOTE: All step bit pins must be on the same port.
#define STEP_DDR DDRD
#define STEP_PORT PORTD
#define X_STEP_BIT 3 // Uno Digital Pin 2
#define Y_STEP_BIT 5 // Uno Digital Pin 3
#define Z_STEP_BIT 7 // Uno Digital Pin 4
#define STEP_MASK ((1<<X_STEP_BIT)|(1<<Y_STEP_BIT)|(1<<Z_STEP_BIT)) // All step bits

// Define step direction output pins. NOTE: All direction pins must be on the same port.
#define DIRECTION_DDR DDRD
#define DIRECTION_PORT PORTD
#define X_DIRECTION_BIT 2 // Uno Digital Pin 5
#define Y_DIRECTION_BIT 4 // Uno Digital Pin 6
#define Z_DIRECTION_BIT 6 // Uno Digital Pin 7
#define DIRECTION_MASK ((1<<X_DIRECTION_BIT)|(1<<Y_DIRECTION_BIT)|(1<<Z_DIRECTION_BIT)) // All direction bits

// Define stepper driver enable/disable output pin.
#define STEPPERS_DISABLE_DDR DDRB
#define STEPPERS_DISABLE_PORT PORTB
#define STEPPERS_DISABLE_BIT 8 // no Digital Pin 8
#define STEPPERS_DISABLE_MASK (1<<STEPPERS_DISABLE_BIT)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant