From 110809fa5d5896a5f7ae46e69f2fc28f2ff0556f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferm=C3=ADn=20Olaiz?= Date: Tue, 23 Feb 2021 14:09:46 -0300 Subject: [PATCH] Unipolar motor tests --- grbl/config.h | 2 +- grbl/cpu_map.h | 22 +++++++++++----------- grbl/main.c | 4 ++++ grbl/stepper.c | 19 ++++++++++++++++--- 4 files changed, 32 insertions(+), 15 deletions(-) diff --git a/grbl/config.h b/grbl/config.h index f48d958..ed4d240 100644 --- a/grbl/config.h +++ b/grbl/config.h @@ -336,7 +336,7 @@ // enable pin will output 5V for maximum RPM with 256 intermediate levels and 0V when disabled. // NOTE: IMPORTANT for Arduino Unos! When enabled, the Z-limit pin D11 and spindle enable pin D12 switch! // The hardware PWM output on pin D11 is required for variable spindle output voltages. -#define VARIABLE_SPINDLE // Default enabled. Comment to disable. +//#define VARIABLE_SPINDLE // Default enabled. Comment to disable. // Used by variable spindle output only. This forces the PWM output to a minimum duty cycle when enabled. // The PWM pin will still read 0V when the spindle is disabled. Most users will not need this option, but diff --git a/grbl/cpu_map.h b/grbl/cpu_map.h index 9f43a3f..637c5f6 100644 --- a/grbl/cpu_map.h +++ b/grbl/cpu_map.h @@ -36,23 +36,23 @@ // 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 2 // Uno Digital Pin 2 - #define Y_STEP_BIT 3 // Uno Digital Pin 3 - #define Z_STEP_BIT 4 // Uno Digital Pin 4 + #define X_STEP_BIT 0//2 // Uno Digital Pin 2 + #define Y_STEP_BIT 0//3 // Uno Digital Pin 3 + #define Z_STEP_BIT 0//4 // Uno Digital Pin 4 #define STEP_MASK ((1<step_event_count; if (st.exec_block->direction_bits & (1<step_event_count; if (st.exec_block->direction_bits & (1<steps[Z_AXIS]; @@ -450,7 +463,7 @@ ISR(TIMER1_COMPA_vect) st.counter_z -= st.exec_block->step_event_count; if (st.exec_block->direction_bits & (1<