Skip to content

Commit

Permalink
🩹 Fix MKS Gen-L V1 pins, allow more RAMPS overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
thisiskeithb committed Apr 16, 2024
1 parent 1f84f50 commit 385ef24
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Marlin/src/pins/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,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
16 changes: 11 additions & 5 deletions Marlin/src/pins/ramps/pins_MKS_GEN_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
* MKS GEN L – Arduino Mega2560 with RAMPS v1.4 pin assignments
* Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/MKS%20GEN%20L%20v1.0/MKS%20Gen_L%20V1.0_008%20SCH.pdf
* Origin: 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
* ATmega2560, ATmega1280
* Note: Schematic contains pin & connector errors
* ATmega2560
*/

#if HOTENDS > 2 || E_STEPPERS > 2
Expand All @@ -38,10 +39,15 @@
// 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
#define HEATER_BED_PIN 8 // H-BED
#define HEATER_0_PIN 10 // HE0
#if ANY(HAS_MULTI_HOTEND, HEATERS_PARALLEL)
#define HEATER_1_PIN 7 // HE1
#else
#define FAN1_PIN 7 // HE1
#endif

#define FAN0_PIN 9 // FAN

//
// 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

0 comments on commit 385ef24

Please sign in to comment.