fixed a problem with the direction-pins
This commit is contained in:
parent
a42c03601d
commit
551b4ed274
10
config.h
10
config.h
@ -23,9 +23,9 @@
|
|||||||
|
|
||||||
#define VERSION "0.0"
|
#define VERSION "0.0"
|
||||||
|
|
||||||
#define X_STEPS_PER_MM 94.488188976378
|
#define X_STEPS_PER_MM (94.488188976378*16)
|
||||||
#define Y_STEPS_PER_MM 94.488188976378
|
#define Y_STEPS_PER_MM (94.488188976378*16)
|
||||||
#define Z_STEPS_PER_MM 94.488188976378
|
#define Z_STEPS_PER_MM (94.488188976378*16)
|
||||||
|
|
||||||
#define STEP_PULSE_MICROSECONDS 30
|
#define STEP_PULSE_MICROSECONDS 30
|
||||||
|
|
||||||
@ -73,9 +73,11 @@
|
|||||||
#define LIMIT_MASK ((1<<X_LIMIT_BIT)|(1<<Y_LIMIT_BIT)|(1<<Z_LIMIT_BIT))
|
#define LIMIT_MASK ((1<<X_LIMIT_BIT)|(1<<Y_LIMIT_BIT)|(1<<Z_LIMIT_BIT))
|
||||||
|
|
||||||
// Use this line for default operation (step-pulses high)
|
// Use this line for default operation (step-pulses high)
|
||||||
#define STEPPING_INVERT_MASK 0
|
#define STEPPING_INVERT_MASK 0
|
||||||
// Uncomment this line for inverted stepping (step-pulses low, rest high)
|
// Uncomment this line for inverted stepping (step-pulses low, rest high)
|
||||||
// #define STEPPING_INVERT_MASK (STEP_MASK)
|
// #define STEPPING_INVERT_MASK (STEP_MASK)
|
||||||
|
// Uncomment this line to invert all step- and direction bits
|
||||||
|
// #define STEPPING_INVERT_MASK (STEPPING_MASK)
|
||||||
// Or bake your own like this adding any step-bits or directions you want to invert:
|
// Or bake your own like this adding any step-bits or directions you want to invert:
|
||||||
// #define STEPPING_INVERT_MASK (STEP_MASK | (1<<Z_DIRECTION_BIT))
|
// #define STEPPING_INVERT_MASK (STEP_MASK | (1<<Z_DIRECTION_BIT))
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ SIGNAL(SIG_OUTPUT_COMPARE1A)
|
|||||||
SIGNAL(SIG_OVERFLOW2)
|
SIGNAL(SIG_OVERFLOW2)
|
||||||
{
|
{
|
||||||
// reset stepping pins (leave the direction pins)
|
// reset stepping pins (leave the direction pins)
|
||||||
STEPPING_PORT = (STEPPING_PORT & ~STEPPING_MASK) | (STEPPING_INVERT_MASK & STEPPING_MASK);
|
STEPPING_PORT = (STEPPING_PORT & ~STEP_MASK) | (STEPPING_INVERT_MASK & STEP_MASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize and start the stepper motor subsystem
|
// Initialize and start the stepper motor subsystem
|
||||||
@ -85,7 +85,7 @@ void st_init()
|
|||||||
{
|
{
|
||||||
// Configure directions of interface pins
|
// Configure directions of interface pins
|
||||||
STEPPING_DDR |= STEPPING_MASK;
|
STEPPING_DDR |= STEPPING_MASK;
|
||||||
STEPPING_PORT = (STEPPING_PORT & ~STEPPING_MASK) | STEPPING_INVERT_MASK;
|
STEPPING_PORT = (STEPPING_PORT & ~STEPPING_MASK); //| STEPPING_INVERT_MASK;
|
||||||
LIMIT_DDR &= ~(LIMIT_MASK);
|
LIMIT_DDR &= ~(LIMIT_MASK);
|
||||||
STEPPERS_ENABLE_DDR |= 1<<STEPPERS_ENABLE_BIT;
|
STEPPERS_ENABLE_DDR |= 1<<STEPPERS_ENABLE_BIT;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user