fixed a problem with the direction-pins

pull/1/head
Simen Svale Skogsrud 2010-02-27 21:01:35 +01:00
rodzic a42c03601d
commit 551b4ed274
2 zmienionych plików z 8 dodań i 6 usunięć

Wyświetl plik

@ -23,9 +23,9 @@
#define VERSION "0.0"
#define X_STEPS_PER_MM 94.488188976378
#define Y_STEPS_PER_MM 94.488188976378
#define Z_STEPS_PER_MM 94.488188976378
#define X_STEPS_PER_MM (94.488188976378*16)
#define Y_STEPS_PER_MM (94.488188976378*16)
#define Z_STEPS_PER_MM (94.488188976378*16)
#define STEP_PULSE_MICROSECONDS 30
@ -76,6 +76,8 @@
#define STEPPING_INVERT_MASK 0
// Uncomment this line for inverted stepping (step-pulses low, rest high)
// #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:
// #define STEPPING_INVERT_MASK (STEP_MASK | (1<<Z_DIRECTION_BIT))

Wyświetl plik

@ -77,7 +77,7 @@ SIGNAL(SIG_OUTPUT_COMPARE1A)
SIGNAL(SIG_OVERFLOW2)
{
// 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
@ -85,7 +85,7 @@ void st_init()
{
// Configure directions of interface pins
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);
STEPPERS_ENABLE_DDR |= 1<<STEPPERS_ENABLE_BIT;