New compile options and inverse time bug fix.
- Apparently inverse time motion were not working for quite some time. Goes to show how many people actually use it. The calculation was bad and is now fixed in this update. It should now work correctly. - `;` comment type is now supported. This is standard on LinuxCNC and common on 3d printers. It was previously not supported due to not existing in the NIST standard, which is out-dated. - New compile-option to ECHO the line received. This should help users experiencing very weird problems and help diagnose if there is something amiss in the communication to Grbl. - New compile-option to use the spindle direction pin D13 as a spindle enable pin with PWM spindle speed on D11. This feature has been requested often from the laser cutter community. Since spindle direction isn’t really of much use, it seemed like good good trade. Note that M4 spindle enable counter-clock-wise support is removed for obvious reasons, while M3 and M5 still work.
This commit is contained in:
@ -79,15 +79,23 @@
|
||||
// Define spindle enable and spindle direction output pins.
|
||||
#define SPINDLE_ENABLE_DDR DDRB
|
||||
#define SPINDLE_ENABLE_PORT PORTB
|
||||
#ifdef VARIABLE_SPINDLE // Z Limit pin and spindle enabled swapped to access hardware PWM on Pin 11.
|
||||
#define SPINDLE_ENABLE_BIT 3 // Uno Digital Pin 11
|
||||
// Z Limit pin and spindle PWM/enable pin swapped to access hardware PWM on Pin 11.
|
||||
#ifdef VARIABLE_SPINDLE
|
||||
#ifdef USE_SPINDLE_DIR_AS_ENABLE_PIN
|
||||
// If enabled, spindle direction pin now used as spindle enable, while PWM remains on D11.
|
||||
#define SPINDLE_ENABLE_BIT 5 // Uno Digital Pin 13 (NOTE: D13 can't be pulled-high input due to LED.)
|
||||
#else
|
||||
#define SPINDLE_ENABLE_BIT 3 // Uno Digital Pin 11
|
||||
#endif
|
||||
#else
|
||||
#define SPINDLE_ENABLE_BIT 4 // Uno Digital Pin 12
|
||||
#endif
|
||||
#define SPINDLE_DIRECTION_DDR DDRB
|
||||
#define SPINDLE_DIRECTION_PORT PORTB
|
||||
#define SPINDLE_DIRECTION_BIT 5 // Uno Digital Pin 13 (NOTE: D13 can't be pulled-high input due to LED.)
|
||||
|
||||
#endif
|
||||
#ifndef USE_SPINDLE_DIR_AS_ENABLE_PIN
|
||||
#define SPINDLE_DIRECTION_DDR DDRB
|
||||
#define SPINDLE_DIRECTION_PORT PORTB
|
||||
#define SPINDLE_DIRECTION_BIT 5 // Uno Digital Pin 13 (NOTE: D13 can't be pulled-high input due to LED.)
|
||||
#endif
|
||||
|
||||
// Define flood and mist coolant enable output pins.
|
||||
// NOTE: Uno analog pins 4 and 5 are reserved for an i2c interface, and may be installed at
|
||||
// a later date if flash and memory space allows.
|
||||
@ -134,11 +142,11 @@
|
||||
#define WAVE1_REGISTER WGM21
|
||||
#define WAVE2_REGISTER WGM22
|
||||
#define WAVE3_REGISTER WGM23
|
||||
|
||||
|
||||
// NOTE: On the 328p, these must be the same as the SPINDLE_ENABLE settings.
|
||||
#define SPINDLE_PWM_DDR SPINDLE_ENABLE_DDR
|
||||
#define SPINDLE_PWM_PORT SPINDLE_ENABLE_PORT
|
||||
#define SPINDLE_PWM_BIT SPINDLE_ENABLE_BIT // Shared with SPINDLE_ENABLE.
|
||||
#define SPINDLE_PWM_DDR DDRB
|
||||
#define SPINDLE_PWM_PORT PORTB
|
||||
#define SPINDLE_PWM_BIT 3 // Uno Digital Pin 11
|
||||
#endif // End of VARIABLE_SPINDLE
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user