diff --git a/Marlin/pins_AZTEEG_X3.h b/Marlin/pins_AZTEEG_X3.h index f16eee310..ed8f4a5eb 100644 --- a/Marlin/pins_AZTEEG_X3.h +++ b/Marlin/pins_AZTEEG_X3.h @@ -24,9 +24,13 @@ * AZTEEG_X3 Arduino Mega with RAMPS v1.4 pin assignments */ +#if HOTENDS > 2 + #error "Azteeg X3 supports up to 2 hotends. Comment this line to keep going." +#endif + #define BOARD_NAME "Azteeg X3" -#include "pins_RAMPS_14_EFB.h" +#include "pins_RAMPS_14.h" #if ENABLED(VIKI2) || ENABLED(miniVIKI) diff --git a/Marlin/pins_BAM_DICE_DUE.h b/Marlin/pins_BAM_DICE_DUE.h index a8e76a7ef..f75a6c442 100644 --- a/Marlin/pins_BAM_DICE_DUE.h +++ b/Marlin/pins_BAM_DICE_DUE.h @@ -24,9 +24,13 @@ * BAM&DICE Due (Arduino Mega) pin assignments */ +#if HOTENDS > 2 + #error "2PrintBeta Due supports up to 2 hotends. Comment this line to keep going." +#endif + #define BOARD_NAME "2PrintBeta Due" -#include "pins_RAMPS_14_EFB.h" +#include "pins_RAMPS_14.h" #undef TEMP_0_PIN #undef TEMP_1_PIN diff --git a/Marlin/pins_FELIX2.h b/Marlin/pins_FELIX2.h index 7bb724bf5..16ad9f4f7 100644 --- a/Marlin/pins_FELIX2.h +++ b/Marlin/pins_FELIX2.h @@ -24,12 +24,15 @@ * FELIXprinters v2.0/3.0 (RAMPS v1.4) pin assignments */ +#if HOTENDS > 2 + #error "Felix 2.0+ supports up to 2 hotends. Comment this line to keep going." +#endif + #define BOARD_NAME "Felix 2.0+" -#include "pins_RAMPS_14_EFB.h" +#define HI_VOLT_PIN_D 7 -#undef HEATER_1_PIN -#define HEATER_1_PIN 7 // EXTRUDER 2 +#include "pins_RAMPS_14_EFB.h" #undef SDPOWER #define SDPOWER 1 diff --git a/Marlin/pins_MKS_13.h b/Marlin/pins_MKS_13.h index 00da20644..e536d870b 100644 --- a/Marlin/pins_MKS_13.h +++ b/Marlin/pins_MKS_13.h @@ -29,12 +29,15 @@ * MKS v1.4 (Extruder, Extruder, Fan, Bed) */ +#if HOTENDS > 2 + #error "MKS 1.3/1.4 supports up to 2 hotends. Comment this line to keep going." +#endif + #define BOARD_NAME "MKS > v1.3" -#include "pins_RAMPS_14_EFB.h" +#define HI_VOLT_PIN_D 7 -#undef HEATER_1_PIN -#define HEATER_1_PIN 7 // EXTRUDER 2 (-1 on RAMPS 1.4) +#include "pins_RAMPS_14_EFB.h" #if ENABLED(VIKI2) || ENABLED(miniVIKI) /** diff --git a/Marlin/pins_MKS_BASE.h b/Marlin/pins_MKS_BASE.h index 3c721f5ff..583f82b1d 100644 --- a/Marlin/pins_MKS_BASE.h +++ b/Marlin/pins_MKS_BASE.h @@ -24,9 +24,12 @@ * MKS BASE 1.0 – Arduino Mega2560 with RAMPS v1.4 pin assignments */ +#if HOTENDS > 2 + #error "MKS BASE 1.0 supports up to 2 hotends. Comment this line to keep going." +#endif + #define BOARD_NAME "MKS BASE 1.0" -#include "pins_RAMPS_14_EFB.h" +#define HI_VOLT_PIN_D 7 -#undef HEATER_1_PIN -#define HEATER_1_PIN 7 +#include "pins_RAMPS_14_EFB.h" \ No newline at end of file diff --git a/Marlin/pins_RAMPS_14.h b/Marlin/pins_RAMPS_14.h index 9f10dd65c..a8c9d3eb7 100644 --- a/Marlin/pins_RAMPS_14.h +++ b/Marlin/pins_RAMPS_14.h @@ -105,32 +105,7 @@ // define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector #define FIL_RUNOUT_PIN 4 -#if MB(RAMPS_14_EFF) || MB(RAMPS_13_EFF) || ENABLED(IS_RAMPS_EFB) - #define FAN_PIN 9 // (Sprinter config) - #if MB(RAMPS_14_EFF) || MB(RAMPS_13_EFF) - #define CONTROLLERFAN_PIN -1 // Pin used for the fan to cool controller - #endif -#elif MB(RAMPS_14_EEF) || MB(RAMPS_14_SF) || MB(RAMPS_13_EEF) || MB(RAMPS_13_SF) - #define FAN_PIN 8 -#else - #define FAN_PIN 4 // IO pin. Buffer needed -#endif - #define PS_ON_PIN 12 - -#if MB(RAMPS_14_EFF) || MB(RAMPS_13_EFF) - #define HEATER_0_PIN 8 -#else - #define HEATER_0_PIN 10 // EXTRUDER 1 - #if !MB(RAMPS_14_EEF) && !MB(RAMPS_13_EEF) && !MB(RAMPS_14_SF) && !MB(RAMPS_13_SF) - #define HEATER_BED_PIN 8 // BED - #endif -#endif - -#if !MB(RAMPS_14_SF) && !MB(RAMPS_13_SF) && !ENABLED(IS_RAMPS_EFB) - #define HEATER_1_PIN 9 // EXTRUDER 2 (FAN On Sprinter) -#endif - #define TEMP_0_PIN 13 // ANALOG NUMBERING #define TEMP_1_PIN 15 // ANALOG NUMBERING #define TEMP_BED_PIN 14 // ANALOG NUMBERING @@ -139,6 +114,56 @@ #define SLED_PIN -1 #endif + +/** + * Hi Voltage PWM Pin Assignments + */ + +#ifndef HI_VOLT_PIN_D + #define HI_VOLT_PIN_D -1 +#endif +#ifndef HI_VOLT_PIN_C + #define HI_VOLT_PIN_C 8 +#endif +#ifndef HI_VOLT_PIN_B + #define HI_VOLT_PIN_B 9 +#endif +#ifndef HI_VOLT_PIN_A + #define HI_VOLT_PIN_A 10 +#endif + +#if ENABLED(IS_RAMPS_EFB) // Hotend, Fan, Bed + #define HEATER_0_PIN HI_VOLT_PIN_A + #define FAN_PIN HI_VOLT_PIN_B + #define HEATER_BED_PIN HI_VOLT_PIN_C + #if EXTRUDERS == 1 + #define FAN1_PIN HI_VOLT_PIN_D + #else + #define HEATER_1_PIN HI_VOLT_PIN_D + #endif +#elif MB(RAMPS_13_EEF) || MB(RAMPS_14_EEF) // Hotend, Hotend, Fan + #define HEATER_0_PIN HI_VOLT_PIN_A + #define HEATER_1_PIN HI_VOLT_PIN_B + #define FAN_PIN HI_VOLT_PIN_C +#elif MB(RAMPS_13_EEB) || MB(RAMPS_14_EEB) // Hotend, Hotend, Bed + #define HEATER_0_PIN HI_VOLT_PIN_A + #define HEATER_1_PIN HI_VOLT_PIN_B + #define HEATER_BED_PIN HI_VOLT_PIN_C + #define FAN_PIN 4 // IO pin. Buffer needed +#elif MB(RAMPS_13_EFF) || MB(RAMPS_14_EFF) // Hotend, Fan, Fan (EFF is reversed?) + #define HEATER_0_PIN HI_VOLT_PIN_C + #define FAN_PIN HI_VOLT_PIN_B + #define FAN1_PIN HI_VOLT_PIN_A + #define CONTROLLERFAN_PIN -1 +#elif MB(RAMPS_13_SF) || MB(RAMPS_14_SF) // Spindle, Fan + #define FAN_PIN HI_VOLT_PIN_C +#endif + + +/** + * LCD Controller Pin Assignments + */ + #if ENABLED(ULTRA_LCD) #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) @@ -301,4 +326,3 @@ #else #define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present #endif - diff --git a/Marlin/pins_SAINSMART_2IN1.h b/Marlin/pins_SAINSMART_2IN1.h index 3664fbd3a..cc74c910a 100644 --- a/Marlin/pins_SAINSMART_2IN1.h +++ b/Marlin/pins_SAINSMART_2IN1.h @@ -24,16 +24,14 @@ * Sainsmart 2-in-1 pin assignments */ -#include "pins_RAMPS_14_EFB.h" - -#undef BOARD_NAME -#define BOARD_NAME "Sainsmart" +#if HOTENDS > 2 + #error "Sainsmart 2-in-1 supports up to 2 hotends. Comment this line to keep going." +#endif -#undef FAN_PIN -#define FAN_PIN 7 // PART FAN in front of board next to Extruder heat +#define BOARD_NAME "Sainsmart" -#undef HEATER_0_PIN -#define HEATER_0_PIN 9 // EXTRUDER 1 +#define HI_VOLT_PIN_A 9 +#define HI_VOLT_PIN_B 7 // PART FAN in front of board next to Extruder heat +#define HI_VOLT_PIN_D 10 -#undef HEATER_1_PIN -#define HEATER_1_PIN 10 // EXTRUDER 2 +#include "pins_RAMPS_14_EFB.h"