Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🩹 Fix MKS Gen-L V1 pins, allow more RAMPS overrides #26974

Open
wants to merge 9 commits into
base: bugfix-2.1.x
Choose a base branch
from
2 changes: 1 addition & 1 deletion Marlin/src/pins/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
#elif MB(MKS_GEN_13)
#include "ramps/pins_MKS_GEN_13.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
#elif MB(MKS_GEN_L)
#include "ramps/pins_MKS_GEN_L.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
#include "ramps/pins_MKS_GEN_L.h" // ATmega2560 env:mega2560
#elif MB(KFB_2)
#include "ramps/pins_BIQU_KFB_2.h" // ATmega2560 env:mega2560
#elif MB(ZRIB_V20)
Expand Down
19 changes: 14 additions & 5 deletions Marlin/src/pins/ramps/pins_MKS_GEN_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
/**
* MKS GEN L – Arduino Mega2560 with RAMPS v1.4 pin assignments
* Schematic: https://github.com/makerbase-mks/MKS-GEN_L/blob/master/hardware/MKS%20Gen_L%20V1.0_008/MKS%20Gen_L%20V1.0_008%20SCH.pdf
thisiskeithb marked this conversation as resolved.
Show resolved Hide resolved
* ATmega2560, ATmega1280
* Pin Diagram: https://github.com/makerbase-mks/MKS-GEN_L/blob/master/hardware/MKS%20Gen_L%20V1.0_008/MKS%20Gen_L%20V1.0_008%20PIN.pdf
* Note: Schematic contains pin & connector errors, correct pin mappings are found on the pin diagram
* ATmega2560
*/

#if HOTENDS > 2 || E_STEPPERS > 2
Expand All @@ -37,10 +39,17 @@
// Heaters / Fans
//

#define MOSFET_A_PIN 10 // HE0
#define MOSFET_B_PIN 7 // HE1 or FAN Hotend Cooling
#define MOSFET_C_PIN 8 // HBED
#define FAN0_PIN 9 // FAN Part Cooling
// The following are included for documentation purposes only. They are actually defined in pins_RAMPS.h.
//#define HEATER_BED_PIN 8 // H-BED / "MOSFET_C_PIN"
sjasonsmith marked this conversation as resolved.
Show resolved Hide resolved
//#define HEATER_0_PIN 10 // HE0 / "MOSFET_A_PIN"
sjasonsmith marked this conversation as resolved.
Show resolved Hide resolved
thisiskeithb marked this conversation as resolved.
Show resolved Hide resolved
#if ANY(HAS_MULTI_HOTEND, HEATERS_PARALLEL)
#define HEATER_1_PIN 7 // HE1
#else
#define FAN1_PIN 7 // HE1
#endif

// The following is included for documentation purposes only. Is is actually defined in pins_RAMPS.h.
//#define FAN0_PIN 9 // FAN / "MOSFET_B_PIN"
sjasonsmith marked this conversation as resolved.
Show resolved Hide resolved
thisiskeithb marked this conversation as resolved.
Show resolved Hide resolved

//
// CS Pins wired to avoid conflict with the LCD
Expand Down
20 changes: 15 additions & 5 deletions Marlin/src/pins/ramps/pins_RAMPS.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,16 +231,22 @@
#define MOSFET_D_PIN -1
#endif

#define HEATER_0_PIN MOSFET_A_PIN
#ifndef HEATER_0_PIN
#define HEATER_0_PIN MOSFET_A_PIN
#endif

#if FET_ORDER_EFB // Hotend, Fan, Bed
#ifndef HEATER_BED_PIN
#define HEATER_BED_PIN MOSFET_C_PIN
#endif
#elif FET_ORDER_EEF // Hotend, Hotend, Fan
#define HEATER_1_PIN MOSFET_B_PIN
#ifndef HEATER_1_PIN
#define HEATER_1_PIN MOSFET_B_PIN
#endif
#elif FET_ORDER_EEB // Hotend, Hotend, Bed
#define HEATER_1_PIN MOSFET_B_PIN
#ifndef HEATER_1_PIN
#define HEATER_1_PIN MOSFET_B_PIN
#endif
#ifndef HEATER_BED_PIN
#define HEATER_BED_PIN MOSFET_C_PIN
#endif
Expand All @@ -253,9 +259,13 @@
#define HEATER_BED_PIN MOSFET_C_PIN
#endif
#if ANY(HAS_MULTI_HOTEND, HEATERS_PARALLEL)
#define HEATER_1_PIN MOSFET_D_PIN
#ifndef HEATER_1_PIN
#define HEATER_1_PIN MOSFET_D_PIN
#endif
#else
#define FAN1_PIN MOSFET_D_PIN
#ifndef FAN1_PIN
#define FAN1_PIN MOSFET_D_PIN
#endif
#endif
#endif

Expand Down