SPINDLE/LASER pins changes

This commit is contained in:
Scott Lahteine
2017-04-07 13:52:21 -05:00
committed by Scott Lahteine
parent 99c4900a98
commit ffe0e2d19a
41 changed files with 1247 additions and 110 deletions

View File

@@ -24,6 +24,33 @@
* Sanguinololu board pin assignments
*/
/**
* Rev B 26 DEC 2016
*
* 1) added pointer to a current Arduino IDE extension
* 2) added support for M3, M4 & M5 spindle control commands
* 3) added case light pin definition
*
*/
/**
* A useable Arduino IDE extension (board manager) can be found at
* https://github.com/Lauszus/Sanguino
*
* This extension has been tested on Arduino 1.6.12 & 1.8.0
*
* Here's the JSON path:
* https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
*
* When installing select 1.0.2
*
* Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
* Just use the above JSON URL instead of Sparkfun's JSON.
*
* Once installed select the Sanguino board and then select the CPU.
*
*/
#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
#error "Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu."
#endif
@@ -96,19 +123,26 @@
//
// Misc. Functions
//
/**
* On some broken versions of the Sanguino libraries the pin definitions are wrong,
* which then needs SDSS as pin 24. But you should upgrade your Sanguino libraries! See #368.
* In some versions of the Sanguino libraries the pin
* definitions are wrong, with SDSS = 24 and LED_PIN = 28 (Melzi).
* If you encounter issues with these pins, upgrade your
* Sanguino libraries! See #368.
*/
//#define SDSS 24
#define SDSS 31
#if IS_MELZI
#define LED_PIN 27 // On some broken versions of the Sanguino libraries the pin definitions are wrong, so LED_PIN needs to be 28. But you should upgrade your Sanguino libraries! See #368.
#define LED_PIN 27
#elif MB(STB_11)
#define LCD_BACKLIGHT_PIN 17 // LCD backlight LED
#endif
#if DISABLED(SPINDLE_LASER_ENABLE) && ENABLED(SANGUINOLOLU_V_1_2) && !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)) // try to use IO Header
#define CASE_LIGHT_PIN 4 // MUST BE HARDWARE PWM - see if IO Header is available
#endif
//
// LCD / Controller
//
@@ -181,14 +215,62 @@
#else
#define BTN_ENC 30
#endif
#elif ENABLED(OLED_PANEL_TINYBOY2)
#define BTN_ENC 28
#define LCD_SDSS -1
#else // !Panelolu2, !TinyBoy2
#else // !Panelolu2
#define BTN_ENC 16
#define LCD_SDSS 28 // Smart Controller SD card reader rather than the Melzi
#endif // !Panelolu2, !TinyBoy2
#endif // !Panelolu2
#define SD_DETECT_PIN -1
#endif // ULTRA_LCD && NEWPANEL
//
// M3/M4/M5 - Spindle/Laser Control
//
#if ENABLED(SPINDLE_LASER_ENABLE)
#if !MB(AZTEEG_X1) && ENABLED(SANGUINOLOLU_V_1_2) && !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)) // try to use IO Header
#define SPINDLE_LASER_ENABLE_PIN 10 // Pin should have a pullup/pulldown!
#define SPINDLE_LASER_PWM_PIN 4 // MUST BE HARDWARE PWM
#define SPINDLE_DIR_PIN 11
#elif !MB(MELZI) // use X stepper motor socket
/**
* To control the spindle speed and have an LCD you must sacrifice
* the Extruder and pull some signals off the X stepper driver socket.
*
* The following assumes:
* - The X stepper driver socket is empty
* - The extruder driver socket has a driver board plugged into it
* - The X stepper wires are attached the the extruder connector
*/
/**
* Where to get the spindle signals
*
* spindle signal socket name socket name
* -------
* /ENABLE O| |O VMOT
* MS1 O| |O GND
* MS2 O| |O 2B
* MS3 O| |O 2A
* /RESET O| |O 1A
* /SLEEP O| |O 1B
* SPINDLE_LASER_PWM_PIN STEP O| |O VDD
* SPINDLE_LASER_ENABLE_PIN DIR O| |O GND
* -------
*
* Note: Socket names vary from vendor to vendor.
*/
#undef X_DIR_PIN
#undef X_ENABLE_PIN
#undef X_STEP_PIN
#define X_DIR_PIN 0
#define X_ENABLE_PIN 14
#define X_STEP_PIN 1
#define SPINDLE_LASER_PWM_PIN 15 // MUST BE HARDWARE PWM
#define SPINDLE_LASER_ENABLE_PIN 21 // Pin should have a pullup!
#define SPINDLE_DIR_PIN -1 // No pin available on the socket for the direction pin
#endif
#endif // SPINDLE_LASER_ENABLE