Permalink
Browse files

Update Marlin/stepper.cpp

  • Loading branch information...
1 parent 1080110 commit 2edb38332c495f2edba84a53505117d47887fcee @JTrantow committed May 4, 2012
Showing with 13 additions and 3 deletions.
  1. +13 −3 Marlin/stepper.cpp
View
@@ -453,23 +453,20 @@ ISR(TIMER1_COMPA_vect)
if (counter_x > 0) {
WRITE(X_STEP_PIN, HIGH);
counter_x -= current_block->step_event_count;
- WRITE(X_STEP_PIN, LOW);
count_position[X_AXIS]+=count_direction[X_AXIS];
}
counter_y += current_block->steps_y;
if (counter_y > 0) {
WRITE(Y_STEP_PIN, HIGH);
counter_y -= current_block->step_event_count;
- WRITE(Y_STEP_PIN, LOW);
count_position[Y_AXIS]+=count_direction[Y_AXIS];
}
counter_z += current_block->steps_z;
if (counter_z > 0) {
WRITE(Z_STEP_PIN, HIGH);
counter_z -= current_block->step_event_count;
- WRITE(Z_STEP_PIN, LOW);
count_position[Z_AXIS]+=count_direction[Z_AXIS];
}
@@ -483,6 +480,19 @@ ISR(TIMER1_COMPA_vect)
}
#endif //!ADVANCE
step_events_completed += 1;
+
+ /*
+ Turn off all steps (even if only one is active).
+ This will lengthen out the step pulse width.
+ Additional delay can be compiled in using EXTEND_STEP_PULSE_USEC.
+ */
+ #if defined(EXTEND_STEP_PULSE_USEC)
+ delayMicroseconds(EXTEND_STEP_PULSE_USEC);
+ #endif
+ WRITE(X_STEP_PIN, LOW);
+ WRITE(Y_STEP_PIN, LOW);
+ WRITE(Z_STEP_PIN, LOW);
+
if(step_events_completed >= current_block->step_event_count) break;
}
// Calculare new timer value

0 comments on commit 2edb383

Please sign in to comment.