fixed a problem with the direction-pins

This commit is contained in:
Simen Svale Skogsrud
2010-02-27 21:01:35 +01:00
parent a42c03601d
commit 551b4ed274
2 changed files with 8 additions and 6 deletions

View File

@ -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;