From e8701195e66f2d27ffe17fb514eae8173795aaf7 Mon Sep 17 00:00:00 2001
From: Georgiy Bondarenko <69736697+nehilo@users.noreply.github.com>
Date: Thu, 4 Mar 2021 22:54:23 +0500
Subject: Initial commit
---
Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h | 160 ++++++++
Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h | 182 +++++++++
Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h | 155 ++++++++
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h | 236 ++++++++++++
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h | 390 +++++++++++++++++++
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 524 ++++++++++++++++++++++++++
Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h | 188 +++++++++
Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h | 168 +++++++++
Marlin/src/pins/lpc1768/pins_MKS_SBASE.h | 388 +++++++++++++++++++
Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h | 395 +++++++++++++++++++
Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h | 518 +++++++++++++++++++++++++
Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h | 118 ++++++
12 files changed, 3422 insertions(+)
create mode 100644 Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h
create mode 100644 Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h
create mode 100644 Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h
create mode 100644 Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h
create mode 100644 Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h
create mode 100644 Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h
create mode 100644 Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h
create mode 100644 Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h
create mode 100644 Marlin/src/pins/lpc1768/pins_MKS_SBASE.h
create mode 100644 Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h
create mode 100644 Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h
create mode 100644 Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h
(limited to 'Marlin/src/pins/lpc1768')
diff --git a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h
new file mode 100644
index 0000000..70682ad
--- /dev/null
+++ b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h
@@ -0,0 +1,160 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+/**
+ * AZSMZ MINI pin assignments
+ */
+
+#if NOT_TARGET(MCU_LPC1768)
+ #error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
+#endif
+
+#define BOARD_INFO_NAME "AZSMZ MINI"
+
+//
+// Servos
+//
+#define SERVO0_PIN P1_23
+
+//
+// Limit Switches
+//
+#define X_MIN_PIN P1_24
+#define Y_MIN_PIN P1_26
+#define Z_MIN_PIN P1_28
+#define Z_MAX_PIN P1_29
+
+//
+// Steppers
+//
+#define X_STEP_PIN P2_00
+#define X_DIR_PIN P0_05
+#define X_ENABLE_PIN P0_04
+
+#define Y_STEP_PIN P2_01
+#define Y_DIR_PIN P0_11
+#define Y_ENABLE_PIN P0_10
+
+#define Z_STEP_PIN P2_02
+#define Z_DIR_PIN P0_20
+#define Z_ENABLE_PIN P0_19
+
+#define E0_STEP_PIN P2_03
+#define E0_DIR_PIN P0_22
+#define E0_ENABLE_PIN P0_21
+
+#define E1_STEP_PIN P2_08
+#define E1_DIR_PIN P2_13
+#define E1_ENABLE_PIN P4_29
+
+//
+// Temperature Sensors
+// 3.3V max when defined as an analog input
+//
+#define TEMP_0_PIN P0_23_A0 // A0 (TH1)
+#define TEMP_BED_PIN P0_24_A1 // A1 (TH2)
+#define TEMP_1_PIN P0_25_A2 // A2 (TH3)
+
+//
+// Heaters / Fans
+//
+// EFB
+#define HEATER_0_PIN P2_04
+#define HEATER_BED_PIN P2_05
+#ifndef FAN_PIN
+ #define FAN_PIN P2_07
+#endif
+#define FAN1_PIN P0_26
+
+#define LCD_SDSS P0_16 // LCD SD chip select
+#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
+
+#if ENABLED(AZSMZ_12864)
+ #define BEEPER_PIN P1_30
+ #define DOGLCD_A0 P2_06
+ #define DOGLCD_CS P1_22
+ #define BTN_EN1 P4_28
+ #define BTN_EN2 P1_27
+ #define BTN_ENC P3_26
+ #ifndef SDCARD_CONNECTION
+ #define SDCARD_CONNECTION LCD
+ #endif
+#endif
+
+#if SD_CONNECTION_IS(LCD)
+ #define SD_SCK_PIN P0_15
+ #define SD_MISO_PIN P0_17
+ #define SD_MOSI_PIN P0_18
+ #define SD_SS_PIN LCD_SDSS
+ #define SD_DETECT_PIN P3_25
+#elif SD_CONNECTION_IS(ONBOARD)
+ #define SD_SCK_PIN P0_07
+ #define SD_MISO_PIN P0_08
+ #define SD_MOSI_PIN P0_09
+ #define SD_SS_PIN ONBOARD_SD_CS_PIN
+#elif SD_CONNECTION_IS(CUSTOM_CABLE)
+ #error "No custom SD drive cable defined for this board."
+#endif
+
+//
+// Ethernet pins
+//
+#define ENET_MDIO P1_17
+#define ENET_RX_ER P1_14
+#define ENET_RXD1 P1_10
+#define ENET_MOC P1_16
+#define REF_CLK P1_15
+#define ENET_RXD0 P1_09
+#define ENET_CRS P1_08
+#define ENET_TX_EN P1_04
+#define ENET_TXD0 P1_00
+#define ENET_TXD1 P1_01
+
+/**
+ * PWMs
+ *
+ * There are 6 PWMs. Each PWM can be assigned to one of two pins.
+ *
+ * SERVO2 does NOT have a PWM assigned to it.
+ *
+ * PWM1.1 DIO4 SERVO3_PIN FIL_RUNOUT_PIN 5V output, PWM
+ * PWM1.1 DIO26 E0_STEP_PIN
+ * PWM1.2 DIO11 SERVO0_PIN
+ * PWM1.2 DIO54 X_STEP_PIN
+ * PWM1.3 DIO6 SERVO1_PIN J5-1
+ * PWM1.3 DIO60 Y_STEP_PIN
+ * PWM1.4 DIO53 SDSS(SSEL0) J3-5 AUX-3
+ * PWM1.4 DIO46 Z_STEP_PIN
+ * PWM1.5 DIO3 X_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES
+ * PWM1.5 DIO9 RAMPS_D9_PIN
+ * PWM1.6 DIO14 Y_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES
+ * PWM1.6 DIO10 RAMPS_D10_PIN
+ */
+
+ /**
+ * Special pins
+ * D37 - not 5V tolerant
+ * D49 - not 5V tolerant
+ * D57 - open collector
+ * D58 - open collector
+ */
diff --git a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h
new file mode 100644
index 0000000..5ac119f
--- /dev/null
+++ b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h
@@ -0,0 +1,182 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+/**
+ * BIQU BQ111-A4
+ *
+ * Applies to the following boards:
+ *
+ * BOARD_BIQU_BQ111_A4 (Hotend, Fan, Bed)
+ */
+
+#if NOT_TARGET(MCU_LPC1768)
+ #error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
+#endif
+
+#ifndef BOARD_INFO_NAME
+ #define BOARD_INFO_NAME "BIQU Thunder B300 V1.0"
+#endif
+
+//
+// Limit Switches
+//
+#define X_MIN_PIN P1_24 // 10k pullup to 3.3V, 1K series
+#define X_MAX_PIN P1_25 // 10k pullup to 3.3V, 1K series
+#define Y_MIN_PIN P1_26 // 10k pullup to 3.3V, 1K series
+#define Y_MAX_PIN P1_27 // 10k pullup to 3.3V, 1K series
+#define Z_MIN_PIN P1_28 // 10k pullup to 3.3V, 1K series
+#define Z_MAX_PIN P1_29 // 10k pullup to 3.3V, 1K series
+
+//
+// Steppers
+//
+#define X_STEP_PIN P2_00
+#define X_DIR_PIN P0_05
+#define X_ENABLE_PIN P0_04
+#ifndef X_CS_PIN
+ #define X_CS_PIN P1_15 // ETH
+#endif
+
+#define Y_STEP_PIN P2_01
+#define Y_DIR_PIN P0_11
+#define Y_ENABLE_PIN P0_10
+#ifndef Y_CS_PIN
+ #define Y_CS_PIN P1_14 // ETH
+#endif
+
+#define Z_STEP_PIN P2_02
+#define Z_DIR_PIN P0_20
+#define Z_ENABLE_PIN P0_19
+#ifndef Z_CS_PIN
+ #define Z_CS_PIN P1_16 // ETH
+#endif
+
+#define E0_STEP_PIN P2_03
+#define E0_DIR_PIN P0_22
+#define E0_ENABLE_PIN P0_21
+#ifndef E0_CS_PIN
+ #define E0_CS_PIN P1_17 // ETH
+#endif
+
+//
+// Software SPI pins for TMC2130 stepper drivers
+//
+#if ENABLED(TMC_USE_SW_SPI)
+ #ifndef TMC_SW_MOSI
+ #define TMC_SW_MOSI P0_18 // ETH
+ #endif
+ #ifndef TMC_SW_MISO
+ #define TMC_SW_MISO P0_17 // ETH
+ #endif
+ #ifndef TMC_SW_SCK
+ #define TMC_SW_SCK P0_15 // ETH
+ #endif
+#endif
+
+//
+// Temperature Sensors
+// 3.3V max when defined as an analog input
+//
+#define TEMP_0_PIN P0_24_A1 // A0 (T0)
+#define TEMP_BED_PIN P0_23_A0 // A1 (T1)
+
+//
+// Heaters / Fans
+//
+#define HEATER_0_PIN P2_07
+#define HEATER_BED_PIN P2_05
+#ifndef FAN_PIN
+ #define FAN_PIN P2_04
+#endif
+
+//
+// Unused
+//
+//#define PIN_P2_10 P2_10 // IBOOT-1
+//#define PIN_P0_27 P0_27 // Onboard SD Detect
+
+/**
+ * LCD / Controller
+ *
+ * REPRAP_DISCOUNT_SMART_CONTROLLER is not supported due to the lack of LCD_PINS_D5,
+ * LCD_PINS_D6 or LCD_PINS_D7 in the EXP1 connector.
+ *
+ * A remote SD card is not supported as the pins routed to EXP2 are the same as used
+ * for the onboard SD card, and a chip select signal is not provided for the remote
+ * SD card.
+ */
+#if HAS_WIRED_LCD
+
+ #define BEEPER_PIN P1_31 // EXP1-1
+
+ #define BTN_EN1 P3_26 // EXP2-3
+ #define BTN_EN2 P3_25 // EXP2-5
+ #define BTN_ENC P1_30 // EXP1-2
+
+ #define SD_DETECT_PIN P0_27 // EXP2-7
+ #define LCD_PINS_RS P0_16 // EXP1-4
+ #define LCD_PINS_ENABLE P0_18 // (MOSI) EXP1-3
+ #define LCD_PINS_D4 P0_15 // (SCK) EXP1-5
+
+ #if BOTH(HAS_MARLINUI_HD44780, IS_RRD_SC)
+ #error "REPRAP_DISCOUNT_SMART_CONTROLLER displays aren't supported by the BIQU B300 v1.0"
+ #endif
+
+ #if ENABLED(SDSUPPORT)
+ #error "SDSUPPORT is not supported by the BIQU B300 v1.0 when an LCD controller is used"
+ #endif
+
+#endif // HAS_WIRED_LCD
+
+/**
+ * SD Card Reader
+ *
+ * Software SPI is used to interface with a stand-alone SD card reader connected to EXP1.
+ * Hardware SPI can't be used because P0_17 (MISO) is not brought out on this board.
+ */
+#if ENABLED(SDSUPPORT)
+ #define SD_SCK_PIN P0_15 // EXP1-5
+ #define SD_MISO_PIN P0_16 // EXP1-4
+ #define SD_MOSI_PIN P0_18 // EXP1-3
+ #define SD_SS_PIN P1_30 // EXP1-2
+ #define SDSS SD_SS_PIN
+#endif
+
+/**
+ * PWMS
+ *
+ * There are 6 PWMS. Each PWM can be assigned to one of two pins.
+ *
+ * PWM1.1 P0_18 LCD_PINS_ENABLE
+ * PWM1.1 P2_0 X_STEP_PIN
+ * PWM1.2 P1_20
+ * PWM1.2 P2_1 Y_STEP_PIN
+ * PWM1.3 P1_21
+ * PWM1.3 P2_2 Z_STEP_PIN
+ * PWM1.4 P1_23
+ * PWM1.4 P2_3 E0_STEP_PIN
+ * PWM1.5 P1_24 X_MIN_PIN
+ * PWM1.5 P2_4 FAN_PIN
+ * PWM1.6 P1_26 Y_MIN_PIN
+ * PWM1.6 P2_5 HEATER_BED_PIN
+ */
diff --git a/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h b/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h
new file mode 100644
index 0000000..3b2137b
--- /dev/null
+++ b/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h
@@ -0,0 +1,155 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+/**
+ * BIQU BQ111-A4
+ *
+ * Applies to the following boards:
+ *
+ * BOARD_BIQU_BQ111_A4 (Hotend, Fan, Bed)
+ */
+
+#if NOT_TARGET(MCU_LPC1768)
+ #error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
+#endif
+
+#define BOARD_INFO_NAME "BIQU BQ111-A4"
+
+//
+// Limit Switches
+//
+#define X_MIN_PIN P1_24 // 10k pullup to 3.3V, 1K series
+#define X_MAX_PIN P1_25 // 10k pullup to 3.3V, 1K series
+#define Y_MIN_PIN P1_26 // 10k pullup to 3.3V, 1K series
+#define Y_MAX_PIN P1_27 // 10k pullup to 3.3V, 1K series
+#define Z_MIN_PIN P1_28 // 10k pullup to 3.3V, 1K series
+#define Z_MAX_PIN P1_29 // 10k pullup to 3.3V, 1K series
+
+//
+// Steppers
+//
+#define X_STEP_PIN P2_00
+#define X_DIR_PIN P0_05
+#define X_ENABLE_PIN P0_04
+
+#define Y_STEP_PIN P2_01
+#define Y_DIR_PIN P0_11
+#define Y_ENABLE_PIN P0_10
+
+#define Z_STEP_PIN P2_02
+#define Z_DIR_PIN P0_20
+#define Z_ENABLE_PIN P0_19
+
+#define E0_STEP_PIN P2_03
+#define E0_DIR_PIN P0_22
+#define E0_ENABLE_PIN P0_21
+
+//
+// Temperature Sensors
+// 3.3V max when defined as an analog input
+//
+#define TEMP_0_PIN P0_23_A0 // A0 (T0)
+#define TEMP_BED_PIN P0_24_A1 // A1 (T1)
+
+//
+// Heaters / Fans
+//
+#define HEATER_0_PIN P2_07
+#define HEATER_BED_PIN P2_05
+#ifndef FAN_PIN
+ #define FAN_PIN P2_04
+#endif
+
+//
+// Unused
+//
+//#define PIN_P2_10 P2_10 // IBOOT-1
+//#define PIN_P0_27 P0_27 // Onboard SD Detect
+
+/**
+ * LCD / Controller
+ *
+ * REPRAP_DISCOUNT_SMART_CONTROLLER is not supported due to the lack of LCD_PINS_D5,
+ * LCD_PINS_D6 or LCD_PINS_D7 in the EXP1 connector.
+ *
+ * A remote SD card is not supported as the pins routed to EXP2 are the same as used
+ * for the onboard SD card, and a chip select signal is not provided for the remote
+ * SD card.
+ */
+#if HAS_WIRED_LCD
+
+ #define BEEPER_PIN P1_31 // EXP1-1
+
+ #define BTN_EN1 P3_26 // EXP2-3
+ #define BTN_EN2 P3_25 // EXP2-5
+ #define BTN_ENC P1_30 // EXP1-2
+
+ #define SD_DETECT_PIN P0_27 // EXP2-7
+ #define LCD_PINS_RS P0_16 // EXP1-4
+ #define LCD_PINS_ENABLE P0_18 // (MOSI) EXP1-3
+ #define LCD_PINS_D4 P0_15 // (SCK) EXP1-5
+
+ #if BOTH(HAS_MARLINUI_HD44780, IS_RRD_SC)
+ #error "REPRAP_DISCOUNT_SMART_CONTROLLER displays aren't supported by the BIQU BQ111-A4"
+ #endif
+
+ #if ENABLED(SDSUPPORT)
+ #error "SDSUPPORT is not supported by the BIQU BQ111-A4 when an LCD controller is used"
+ #endif
+
+#endif // HAS_WIRED_LCD
+
+/**
+ * SD Card Reader
+ *
+ * Software SPI is used to interface with a stand-alone SD card reader connected to EXP1.
+ * Hardware SPI can't be used because P0_17 (MISO) is not brought out on this board.
+ */
+#if ENABLED(SDSUPPORT)
+
+ #define SD_SCK_PIN P0_15 // EXP1-5
+ #define SD_MISO_PIN P0_16 // EXP1-4
+ #define SD_MOSI_PIN P0_18 // EXP1-3
+ #define SD_SS_PIN P1_30 // EXP1-2
+ #define SDSS SD_SS_PIN
+
+#endif // SDSUPPORT
+
+/**
+ * PWMS
+ *
+ * There are 6 PWMS. Each PWM can be assigned to one of two pins.
+ *
+ * PWM1.1 P0_18 LCD_PINS_ENABLE
+ * PWM1.1 P2_0 X_STEP_PIN
+ * PWM1.2 P1_20
+ * PWM1.2 P2_1 Y_STEP_PIN
+ * PWM1.3 P1_21
+ * PWM1.3 P2_2 Z_STEP_PIN
+ * PWM1.4 P1_23
+ * PWM1.4 P2_3 E0_STEP_PIN
+ * PWM1.5 P1_24 X_MIN_PIN
+ * PWM1.5 P2_4 FAN_PIN
+ * PWM1.6 P1_26 Y_MIN_PIN
+ * PWM1.6 P2_5 HEATER_BED_PIN
+ */
diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h
new file mode 100644
index 0000000..8c1396d
--- /dev/null
+++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h
@@ -0,0 +1,236 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+#define BOARD_INFO_NAME "BTT SKR V1.1"
+
+//
+// Limit Switches
+//
+#define X_MIN_PIN P1_29
+#define X_MAX_PIN P1_28
+#define Y_MIN_PIN P1_27
+#define Y_MAX_PIN P1_26
+#define Z_MIN_PIN P1_25
+#define Z_MAX_PIN P1_24
+
+//
+// Steppers
+//
+#define X_STEP_PIN P0_04
+#define X_DIR_PIN P0_05
+#define X_ENABLE_PIN P4_28
+
+#define Y_STEP_PIN P2_01
+#define Y_DIR_PIN P2_02
+#define Y_ENABLE_PIN P2_00
+
+#define Z_STEP_PIN P0_20
+#define Z_DIR_PIN P0_21
+#define Z_ENABLE_PIN P0_19
+
+#define E0_STEP_PIN P0_11
+#define E0_DIR_PIN P2_13
+#define E0_ENABLE_PIN P2_12
+
+/**
+ * LCD / Controller
+ *
+ * As of 20 JAN 2019 only the REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER display has
+ * been tested with these settings. It can be connected to the SKR using standard cables
+ * via the EXP1 and EXP2 ports. Other displays may need a custom cable and/or changes to
+ * the pins defined below.
+ *
+ * The SD card on the LCD controller uses the same SPI signals as the LCD, resulting in
+ * garbage/lines on the LCD display during SD card access. The LCD code mitigates this
+ * by redrawing the screen after SD card accesses.
+ */
+
+#if IS_TFTGLCD_PANEL
+
+ #if ENABLED(TFTGLCD_PANEL_SPI)
+ #define TFTGLCD_CS P3_26
+ #endif
+
+ #define SD_DETECT_PIN P1_31
+
+#elif HAS_WIRED_LCD
+
+ #define BTN_EN1 P3_26
+ #define BTN_EN2 P3_25
+ #define BTN_ENC P2_11
+
+ #define SD_DETECT_PIN P1_31
+ #define LCD_SDSS P1_23
+ #define LCD_PINS_RS P0_16
+ #define LCD_PINS_ENABLE P0_18
+ #define LCD_PINS_D4 P0_15
+
+ #if ENABLED(MKS_MINI_12864)
+ #define DOGLCD_CS P2_06
+ #define DOGLCD_A0 P0_16
+ #endif
+
+#endif // HAS_WIRED_LCD
+
+//
+// SD Support
+//
+// MKS_MINI_12864 strongly prefers the SD card on the display and
+// requires jumpers on the SKR V1.1 board as documented here:
+// https://www.facebook.com/groups/505736576548648/permalink/630639874058317/
+#ifndef SDCARD_CONNECTION
+ #if ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY, IS_TFTGLCD_PANEL)
+ #define SDCARD_CONNECTION LCD
+ #else
+ #define SDCARD_CONNECTION ONBOARD
+ #endif
+#endif
+
+#if SD_CONNECTION_IS(LCD)
+ #define SD_SS_PIN P1_23
+#endif
+
+// Trinamic driver support
+
+#if HAS_TRINAMIC_CONFIG
+ // Using TMC devices in intelligent mode requires extra connections to each device. Unfortunately
+ // the SKR does not have many free pins (especially if a display is in use). The SPI-based devices
+ // will require 3 connections (clock, mosi, miso), plus a chip select line (CS) for each driver.
+ // The UART-based devices require 2 pis per deriver (one of which must be interrupt capable).
+ // The same SPI pins can be shared with the display/SD card reader, meaning SPI-based devices are
+ // probably a good choice for this board.
+ //
+ // SOFTWARE_DRIVER_ENABLE is a good option. It uses SPI to control the driver enable and allows the
+ // hardware ENABLE pins for each driver to be repurposed as SPI chip select. To use this mode the
+ // driver modules will probably need to be modified, removing the pin used for the enable line from
+ // the module and wiring this connection directly to GND (as is the case for TMC2130).
+ // Using this option and sharing all of the SPI pins allows 5 TMC2130 drivers to be used along with
+ // a REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER without requiring the use of any extra pins.
+ //
+ // Other options will probably require the use of any free pins and the TFT serial port or a
+ // different type of display (like the TFT), using the pins normally used for the display and encoder.
+ // Unfortunately, tests show it's not possible to use endstop and thermistor pins for chip-select.
+ // Sample settings are provided below, but only some have been tested.
+ //
+ // Another option is to share the enable and chip-select pins when using SPI. Several users have
+ // reported that this works. However, it's unlikely that this configuration will allow SPI communi-
+ // cation with the device when the drivers are active, meaning that some of the more advanced TMC
+ // options may not be available.
+
+ // When using any TMC SPI-based drivers, software SPI is used
+ // because pins may be shared with the display or SD card.
+ #define TMC_USE_SW_SPI
+ #define TMC_SW_MOSI P0_18
+ #define TMC_SW_MISO P0_17
+ // To minimize pin usage use the same clock pin as the display/SD card reader. (May generate LCD noise.)
+ #define TMC_SW_SCK P0_15
+ // If pin 2_06 is unused, it can be used for the clock to avoid the LCD noise.
+ //#define TMC_SW_SCK P2_06
+
+ #if ENABLED(SOFTWARE_DRIVER_ENABLE)
+
+ // Software enable allows the enable pins to be repurposed as chip-select pins.
+ // Note: Requires the driver modules to be modified to always be enabled with the enable pin removed.
+ #if AXIS_DRIVER_TYPE_X(TMC2130)
+ #define X_CS_PIN P4_28
+ #undef X_ENABLE_PIN
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Y(TMC2130)
+ #define Y_CS_PIN P2_00
+ #undef Y_ENABLE_PIN
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Z(TMC2130)
+ #define Z_CS_PIN P0_19
+ #undef Z_ENABLE_PIN
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E0(TMC2130)
+ #define E0_CS_PIN P2_12
+ #undef E0_ENABLE_PIN
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E1(TMC2130)
+ #define E1_CS_PIN P0_10
+ #undef E1_ENABLE_PIN
+ #endif
+
+ #else // !SOFTWARE_DRIVER_ENABLE
+
+ // A chip-select pin is needed for each driver.
+
+ // EXAMPLES
+
+ // Example 1: No LCD attached or a TFT style display using the AUX header RX/TX pins.
+ // SDCARD_CONNECTION must not be 'LCD'. Nothing should be connected to EXP1/EXP2.
+ //#define SKR_USE_LCD_PINS_FOR_CS
+ #if ENABLED(SKR_USE_LCD_PINS_FOR_CS)
+ #if SD_CONNECTION_IS(LCD)
+ #error "SDCARD_CONNECTION must not be 'LCD' with SKR_USE_LCD_PINS_FOR_CS."
+ #endif
+ #define X_CS_PIN P1_23
+ #define Y_CS_PIN P3_26
+ #define Z_CS_PIN P2_11
+ #define E0_CS_PIN P3_25
+ #define E1_CS_PIN P1_31
+ #endif
+
+ // Example 2: A REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
+ // The SD card reader attached to the LCD (if present) can't be used because
+ // the pins will be in use. So SDCARD_CONNECTION must not be 'LCD'.
+ //#define SKR_USE_LCD_SD_CARD_PINS_FOR_CS
+ #if ENABLED(SKR_USE_LCD_SD_CARD_PINS_FOR_CS)
+ #if SD_CONNECTION_IS(LCD)
+ #error "SDCARD_CONNECTION must not be 'LCD' with SKR_USE_LCD_SD_CARD_PINS_FOR_CS."
+ #endif
+ #define X_CS_PIN P0_02
+ #define Y_CS_PIN P0_03
+ #define Z_CS_PIN P2_06
+ // We use SD_DETECT_PIN for E0
+ #undef SD_DETECT_PIN
+ #define E0_CS_PIN P1_31
+ // We use LCD_SDSS pin for E1
+ #undef LCD_SDSS
+ #define LCD_SDSS -1
+ #define E1_CS_PIN P1_23
+ #endif
+
+ // Example 3: Use the driver enable pins for chip-select.
+ // Commands must not be sent to the drivers when enabled. So certain
+ // advanced features (like driver monitoring) will not be available.
+ //#define SKR_USE_ENABLE_CS
+ #if ENABLED(SKR_USE_ENABLE_FOR_CS)
+ #define X_CS_PIN X_ENABLE_PIN
+ #define Y_CS_PIN Y_ENABLE_PIN
+ #define Z_CS_PIN Z_ENABLE_PIN
+ #define E0_CS_PIN E0_ENABLE_PIN
+ #define E1_CS_PIN E1_ENABLE_PIN
+ #endif
+
+ #endif // SOFTWARE_DRIVER_ENABLE
+
+#endif
+
+// Include common SKR pins
+#include "pins_BTT_SKR_common.h"
diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h
new file mode 100644
index 0000000..e5b7802
--- /dev/null
+++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h
@@ -0,0 +1,390 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+#define BOARD_INFO_NAME "BTT SKR V1.3"
+
+//
+// Trinamic Stallguard pins
+//
+#define X_DIAG_PIN P1_29 // X-
+#define Y_DIAG_PIN P1_27 // Y-
+#define Z_DIAG_PIN P1_25 // Z-
+#define E0_DIAG_PIN P1_28 // X+
+#define E1_DIAG_PIN P1_26 // Y+
+
+//
+// Limit Switches
+//
+#ifdef X_STALL_SENSITIVITY
+ #define X_STOP_PIN X_DIAG_PIN
+ #if X_HOME_DIR < 0
+ #define X_MAX_PIN P1_28 // X+
+ #else
+ #define X_MIN_PIN P1_28 // X+
+ #endif
+#else
+ #define X_MIN_PIN P1_29 // X-
+ #define X_MAX_PIN P1_28 // X+
+#endif
+
+#ifdef Y_STALL_SENSITIVITY
+ #define Y_STOP_PIN Y_DIAG_PIN
+ #if Y_HOME_DIR < 0
+ #define Y_MAX_PIN P1_26 // Y+
+ #else
+ #define Y_MIN_PIN P1_26 // Y+
+ #endif
+#else
+ #define Y_MIN_PIN P1_27 // Y-
+ #define Y_MAX_PIN P1_26 // Y+
+#endif
+
+#ifdef Z_STALL_SENSITIVITY
+ #define Z_STOP_PIN Z_DIAG_PIN
+ #if Z_HOME_DIR < 0
+ #define Z_MAX_PIN P1_24 // Z+
+ #else
+ #define Z_MIN_PIN P1_24 // Z+
+ #endif
+#else
+ #define Z_MIN_PIN P1_25 // Z-
+ #define Z_MAX_PIN P1_24 // Z+
+#endif
+
+#define ONBOARD_ENDSTOPPULLUPS // Board has built-in pullups
+
+//
+// Servos
+//
+#ifndef SERVO0_PIN
+ #define SERVO0_PIN P2_00
+#endif
+
+//
+// Z Probe (when not Z_MIN_PIN)
+//
+#ifndef Z_MIN_PROBE_PIN
+ #define Z_MIN_PROBE_PIN P1_24
+#endif
+
+//
+// Filament Runout Sensor
+//
+#ifndef FIL_RUNOUT_PIN
+ #define FIL_RUNOUT_PIN P1_28
+#endif
+
+//
+// Steppers
+//
+#define X_STEP_PIN P2_02
+#define X_DIR_PIN P2_06
+#define X_ENABLE_PIN P2_01
+#ifndef X_CS_PIN
+ #define X_CS_PIN P1_17
+#endif
+
+#define Y_STEP_PIN P0_19
+#define Y_DIR_PIN P0_20
+#define Y_ENABLE_PIN P2_08
+#ifndef Y_CS_PIN
+ #define Y_CS_PIN P1_15
+#endif
+
+#define Z_STEP_PIN P0_22
+#define Z_DIR_PIN P2_11
+#define Z_ENABLE_PIN P0_21
+#ifndef Z_CS_PIN
+ #define Z_CS_PIN P1_10
+#endif
+
+#define E0_STEP_PIN P2_13
+#define E0_DIR_PIN P0_11
+#define E0_ENABLE_PIN P2_12
+#ifndef E0_CS_PIN
+ #define E0_CS_PIN P1_08
+#endif
+
+#ifndef E1_CS_PIN
+ #define E1_CS_PIN P1_01
+#endif
+
+//
+// Software SPI pins for TMC2130 stepper drivers
+//
+#if ENABLED(TMC_USE_SW_SPI)
+ #ifndef TMC_SW_MOSI
+ #define TMC_SW_MOSI P4_28
+ #endif
+ #ifndef TMC_SW_MISO
+ #define TMC_SW_MISO P0_05
+ #endif
+ #ifndef TMC_SW_SCK
+ #define TMC_SW_SCK P0_04
+ #endif
+#endif
+
+#if HAS_TMC_UART
+ /**
+ * TMC2208/TMC2209 stepper drivers
+ *
+ * Hardware serial communication ports.
+ * If undefined software serial is used according to the pins below
+ */
+ //#define X_HARDWARE_SERIAL Serial1
+ //#define X2_HARDWARE_SERIAL Serial1
+ //#define Y_HARDWARE_SERIAL Serial1
+ //#define Y2_HARDWARE_SERIAL Serial1
+ //#define Z_HARDWARE_SERIAL Serial1
+ //#define Z2_HARDWARE_SERIAL Serial1
+ //#define E0_HARDWARE_SERIAL Serial1
+ //#define E1_HARDWARE_SERIAL Serial1
+ //#define E2_HARDWARE_SERIAL Serial1
+ //#define E3_HARDWARE_SERIAL Serial1
+ //#define E4_HARDWARE_SERIAL Serial1
+
+ //
+ // Software serial
+ //
+ #define X_SERIAL_TX_PIN P4_29
+ #define X_SERIAL_RX_PIN P1_17
+
+ #define Y_SERIAL_TX_PIN P1_16
+ #define Y_SERIAL_RX_PIN P1_15
+
+ #define Z_SERIAL_TX_PIN P1_14
+ #define Z_SERIAL_RX_PIN P1_10
+
+ #define E0_SERIAL_TX_PIN P1_09
+ #define E0_SERIAL_RX_PIN P1_08
+
+ #define E1_SERIAL_TX_PIN P1_04
+ #define E1_SERIAL_RX_PIN P1_01
+
+ // Reduce baud rate to improve software serial reliability
+ #define TMC_BAUD_RATE 19200
+#endif
+
+/**
+ * _____ _____
+ * NC | 1 2 | GND 5V | 1 2 | GND
+ * RESET | 3 4 | 1.31 (SD_DETECT) (LCD_D7) 1.23 | 3 4 | 1.22 (LCD_D6)
+ * (MOSI) 0.18 | 5 6 3.25 (BTN_EN2) (LCD_D5) 1.21 | 5 6 1.20 (LCD_D4)
+ * (SD_SS) 0.16 | 7 8 | 3.26 (BTN_EN1) (LCD_RS) 1.19 | 7 8 | 1.18 (LCD_EN)
+ * (SCK) 0.15 | 9 10| 0.17 (MISO) (BTN_ENC) 0.28 | 9 10| 1.30 (BEEPER)
+ * ----- -----
+ * EXP2 EXP1
+ */
+
+#define EXPA1_03_PIN P1_23
+#define EXPA1_04_PIN P1_22
+#define EXPA1_05_PIN P1_21
+#define EXPA1_06_PIN P1_20
+#define EXPA1_07_PIN P1_19
+#define EXPA1_08_PIN P1_18
+#define EXPA1_09_PIN P0_28
+#define EXPA1_10_PIN P1_30
+
+#define EXPA2_03_PIN -1
+#define EXPA2_04_PIN P1_31
+#define EXPA2_05_PIN P0_18
+#define EXPA2_06_PIN P3_25
+#define EXPA2_07_PIN P0_16
+#define EXPA2_08_PIN P3_26
+#define EXPA2_09_PIN P0_15
+#define EXPA2_10_PIN P0_17
+
+#if HAS_WIRED_LCD
+ #if ENABLED(ANET_FULL_GRAPHICS_LCD_ALT_WIRING)
+ #error "ANET_FULL_GRAPHICS_LCD_ALT_WIRING only applies to the ANET 1.0 board."
+
+ #elif ENABLED(ANET_FULL_GRAPHICS_LCD)
+ #error "CAUTION! ANET_FULL_GRAPHICS_LCD requires wiring modifications. See 'pins_BTT_SKR_V1_3.h' for details. Comment out this line to continue."
+
+ /**
+ * 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
+ * 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. (This is the critical part!)
+ * 3. Rewire the CLK Signal (LCD Pin9) to LCD Pin7. (LCD Pin9 remains open because this pin is open drain.)
+ * 4. A wire is needed to connect the Reset switch at J3 (LCD Pin7) to EXP2 (Pin3) on the board.
+ *
+ * !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!!
+ *
+ * The ANET_FULL_GRAPHICS_LCD connector plug:
+ *
+ * BEFORE AFTER
+ * _____ _____
+ * GND 1 | 1 2 | 2 5V 5V 1 | 1 2 | 2 GND
+ * CS 3 | 3 4 | 4 BTN_EN2 CS 3 | 3 4 | 4 BTN_EN2
+ * SID 5 | 5 6 6 BTN_EN1 SID 5 | 5 6 6 BTN_EN1
+ * open 7 | 7 8 | 8 BTN_ENC CLK 7 | 7 8 | 8 BTN_ENC
+ * CLK 9 | 9 10| 10 Beeper open 9 | 9 10| 10 Beeper
+ * ----- -----
+ * LCD LCD
+ */
+
+ #define LCD_PINS_RS EXPA1_03_PIN
+
+ #define BTN_EN1 EXPA1_06_PIN
+ #define BTN_EN2 EXPA1_04_PIN
+ #define BTN_ENC EXPA1_08_PIN
+
+ #define LCD_PINS_ENABLE EXPA1_05_PIN
+ #define LCD_PINS_D4 EXPA1_07_PIN
+
+ #elif ENABLED(CR10_STOCKDISPLAY)
+
+ #define LCD_PINS_RS EXPA1_04_PIN
+
+ #define BTN_EN1 EXPA1_08_PIN
+ #define BTN_EN2 EXPA1_06_PIN
+ #define BTN_ENC EXPA1_09_PIN // (58) open-drain
+
+ #define LCD_PINS_ENABLE EXPA1_03_PIN
+ #define LCD_PINS_D4 EXPA1_05_PIN
+
+ #elif HAS_ADC_BUTTONS
+
+ #error "ADC BUTTONS do not work unmodifed on SKR 1.3, The ADC ports cannot take more than 3.3v."
+
+ #elif IS_TFTGLCD_PANEL
+
+ #if ENABLED(TFTGLCD_PANEL_SPI)
+ #define TFTGLCD_CS EXPA2_08_PIN
+ #endif
+
+ #define SD_DETECT_PIN EXPA2_04_PIN
+
+ #else // !CR10_STOCKDISPLAY
+
+ #define LCD_PINS_RS EXPA1_07_PIN
+
+ #define BTN_EN1 EXPA2_08_PIN // (31) J3-2 & AUX-4
+ #define BTN_EN2 EXPA2_06_PIN // (33) J3-4 & AUX-4
+ #define BTN_ENC EXPA1_09_PIN // (58) open-drain
+
+ #define LCD_PINS_ENABLE EXPA1_08_PIN
+ #define LCD_PINS_D4 EXPA1_06_PIN
+
+ #define LCD_SDSS EXPA2_07_PIN // (16) J3-7 & AUX-4
+ #define SD_DETECT_PIN EXPA2_04_PIN // (49) (NOT 5V tolerant)
+
+ #if ENABLED(FYSETC_MINI_12864)
+ #define DOGLCD_CS EXPA1_08_PIN
+ #define DOGLCD_A0 EXPA1_07_PIN
+ #define DOGLCD_SCK EXPA2_09_PIN
+ #define DOGLCD_MOSI EXPA2_05_PIN
+
+ #define LCD_BACKLIGHT_PIN -1
+
+ #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
+ // results in LCD soft SPI mode 3, SD soft SPI mode 0
+
+ #define LCD_RESET_PIN EXPA1_06_PIN // Must be high or open for LCD to operate normally.
+
+ #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
+ #ifndef RGB_LED_R_PIN
+ #define RGB_LED_R_PIN EXPA1_05_PIN
+ #endif
+ #ifndef RGB_LED_G_PIN
+ #define RGB_LED_G_PIN EXPA1_04_PIN
+ #endif
+ #ifndef RGB_LED_B_PIN
+ #define RGB_LED_B_PIN EXPA1_03_PIN
+ #endif
+ #elif ENABLED(FYSETC_MINI_12864_2_1)
+ #define NEOPIXEL_PIN EXPA1_05_PIN
+ #endif
+
+ #else // !FYSETC_MINI_12864
+
+ #if ENABLED(MKS_MINI_12864)
+
+ #define DOGLCD_CS EXPA1_05_PIN
+ #define DOGLCD_A0 EXPA1_04_PIN
+ #define DOGLCD_SCK EXPA2_09_PIN
+ #define DOGLCD_MOSI EXPA2_05_PIN
+
+ #elif ENABLED(ENDER2_STOCKDISPLAY)
+
+ /**
+ * Creality Ender-2 display pinout
+ * _____
+ * 5V | 1 2 | GND
+ * (MOSI) P1_23 | 3 4 | P1_22 (LCD_CS)
+ * (LCD_A0) P1_21 | 5 6 P1_20 (BTN_EN2)
+ * RESET P1_19 | 7 8 | P1_18 (BTN_EN1)
+ * (BTN_ENC) P0_28 | 9 10| P1_30 (SCK)
+ * -----
+ * EXP1
+ */
+
+ #define BTN_EN1 EXPA1_08_PIN
+ #define BTN_EN2 EXPA1_06_PIN
+ #define BTN_ENC EXPA1_09_PIN
+ #define DOGLCD_CS EXPA1_04_PIN
+ #define DOGLCD_A0 EXPA1_05_PIN
+ #define DOGLCD_SCK EXPA1_10_PIN
+ #define DOGLCD_MOSI EXPA1_03_PIN
+ #define FORCE_SOFT_SPI
+ #define LCD_BACKLIGHT_PIN -1
+ #endif
+
+ #if IS_ULTIPANEL
+ #define LCD_PINS_D5 EXPA1_05_PIN
+ #define LCD_PINS_D6 EXPA1_04_PIN
+ #define LCD_PINS_D7 EXPA1_03_PIN
+
+ #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
+ #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
+ #endif
+
+ #endif
+
+ #endif // !FYSETC_MINI_12864
+
+ #endif // !CR10_STOCKDISPLAY
+
+#endif // HAS_WIRED_LCD
+
+//
+// SD Support
+//
+
+#ifndef SDCARD_CONNECTION
+ #define SDCARD_CONNECTION LCD
+#endif
+
+#if SD_CONNECTION_IS(LCD)
+ #define SD_SS_PIN EXPA2_07_PIN
+#endif
+
+/**
+ * Special pins
+ * P1_30 (37) (NOT 5V tolerant)
+ * P1_31 (49) (NOT 5V tolerant)
+ * P0_27 (57) (Open collector)
+ * P0_28 (58) (Open collector)
+ */
+
+// Include common SKR pins
+#include "pins_BTT_SKR_common.h"
diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h
new file mode 100644
index 0000000..dfe86b1
--- /dev/null
+++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h
@@ -0,0 +1,524 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+#ifndef BOARD_INFO_NAME
+ #define BOARD_INFO_NAME "BTT SKR V1.4"
+#endif
+
+#ifndef BOARD_CUSTOM_BUILD_FLAGS
+ #define BOARD_CUSTOM_BUILD_FLAGS -DLPC_PINCFG_UART3_P4_28
+#endif
+
+//
+// SD Connection
+//
+#ifndef SDCARD_CONNECTION
+ #define SDCARD_CONNECTION LCD
+#endif
+
+//
+// Servos
+//
+#define SERVO0_PIN P2_00
+
+//
+// TMC StallGuard DIAG pins
+//
+#define X_DIAG_PIN P1_29 // X-STOP
+#define Y_DIAG_PIN P1_28 // Y-STOP
+#define Z_DIAG_PIN P1_27 // Z-STOP
+#define E0_DIAG_PIN P1_26 // E0DET
+#define E1_DIAG_PIN P1_25 // E1DET
+
+//
+// Limit Switches
+//
+#ifdef X_STALL_SENSITIVITY
+ #define X_STOP_PIN X_DIAG_PIN
+ #if X_HOME_DIR < 0
+ #define X_MAX_PIN P1_26 // E0DET
+ #else
+ #define X_MIN_PIN P1_26 // E0DET
+ #endif
+#elif ENABLED(X_DUAL_ENDSTOPS)
+ #ifndef X_MIN_PIN
+ #define X_MIN_PIN P1_29 // X-STOP
+ #endif
+ #ifndef X_MAX_PIN
+ #define X_MAX_PIN P1_26 // E0DET
+ #endif
+#else
+ #define X_STOP_PIN P1_29 // X-STOP
+#endif
+
+#ifdef Y_STALL_SENSITIVITY
+ #define Y_STOP_PIN Y_DIAG_PIN
+ #if Y_HOME_DIR < 0
+ #define Y_MAX_PIN P1_25 // E1DET
+ #else
+ #define Y_MIN_PIN P1_25 // E1DET
+ #endif
+#elif ENABLED(Y_DUAL_ENDSTOPS)
+ #ifndef Y_MIN_PIN
+ #define Y_MIN_PIN P1_28 // Y-STOP
+ #endif
+ #ifndef Y_MAX_PIN
+ #define Y_MAX_PIN P1_25 // E1DET
+ #endif
+#else
+ #define Y_STOP_PIN P1_28 // Y-STOP
+#endif
+
+#ifdef Z_STALL_SENSITIVITY
+ #define Z_STOP_PIN Z_DIAG_PIN
+ #if Z_HOME_DIR < 0
+ #define Z_MAX_PIN P1_00 // PWRDET
+ #else
+ #define Z_MIN_PIN P1_00 // PWRDET
+ #endif
+#elif ENABLED(Z_MULTI_ENDSTOPS)
+ #ifndef Z_MIN_PIN
+ #define Z_MIN_PIN P1_27 // Z-STOP
+ #endif
+ #ifndef Z_MAX_PIN
+ #define Z_MAX_PIN P1_00 // PWRDET
+ #endif
+#else
+ #ifndef Z_STOP_PIN
+ #define Z_STOP_PIN P1_27 // Z-STOP
+ #endif
+#endif
+
+//
+// Z Probe (when not Z_MIN_PIN)
+//
+#ifndef Z_MIN_PROBE_PIN
+ #define Z_MIN_PROBE_PIN P0_10
+#endif
+
+//
+// Filament Runout Sensor
+//
+#define FIL_RUNOUT_PIN P1_26 // E0DET
+#define FIL_RUNOUT2_PIN P1_25 // E1DET
+
+//
+// Power Supply Control
+//
+#ifndef PS_ON_PIN
+ #define PS_ON_PIN P1_00 // PWRDET
+#endif
+
+//
+// Power Loss Detection
+//
+#ifndef POWER_LOSS_PIN
+ #define POWER_LOSS_PIN P1_00 // PWRDET
+#endif
+
+//
+// Steppers
+//
+#define X_STEP_PIN P2_02
+#define X_DIR_PIN P2_06
+#define X_ENABLE_PIN P2_01
+#ifndef X_CS_PIN
+ #define X_CS_PIN P1_10
+#endif
+
+#define Y_STEP_PIN P0_19
+#define Y_DIR_PIN P0_20
+#define Y_ENABLE_PIN P2_08
+#ifndef Y_CS_PIN
+ #define Y_CS_PIN P1_09
+#endif
+
+#define Z_STEP_PIN P0_22
+#define Z_DIR_PIN P2_11
+#define Z_ENABLE_PIN P0_21
+#ifndef Z_CS_PIN
+ #define Z_CS_PIN P1_08
+#endif
+
+#define E0_STEP_PIN P2_13
+#define E0_DIR_PIN P0_11
+#define E0_ENABLE_PIN P2_12
+#ifndef E0_CS_PIN
+ #define E0_CS_PIN P1_04
+#endif
+
+#define E1_STEP_PIN P1_15
+#define E1_DIR_PIN P1_14
+#define E1_ENABLE_PIN P1_16
+#ifndef E1_CS_PIN
+ #define E1_CS_PIN P1_01
+#endif
+
+#define TEMP_1_PIN P0_23_A0 // A0 (T0) - (67) - TEMP_1_PIN
+#define TEMP_BED_PIN P0_25_A2 // A2 (T2) - (69) - TEMP_BED_PIN
+
+//
+// Software SPI pins for TMC2130 stepper drivers
+//
+#if ENABLED(TMC_USE_SW_SPI)
+ #ifndef TMC_SW_MOSI
+ #define TMC_SW_MOSI P1_17
+ #endif
+ #ifndef TMC_SW_MISO
+ #define TMC_SW_MISO P0_05
+ #endif
+ #ifndef TMC_SW_SCK
+ #define TMC_SW_SCK P0_04
+ #endif
+#endif
+
+#if HAS_TMC_UART
+ /**
+ * TMC2208/TMC2209 stepper drivers
+ *
+ * Hardware serial communication ports.
+ * If undefined software serial is used according to the pins below
+ */
+ //#define X_HARDWARE_SERIAL Serial1
+ //#define X2_HARDWARE_SERIAL Serial1
+ //#define Y_HARDWARE_SERIAL Serial1
+ //#define Y2_HARDWARE_SERIAL Serial1
+ //#define Z_HARDWARE_SERIAL Serial1
+ //#define Z2_HARDWARE_SERIAL Serial1
+ //#define E0_HARDWARE_SERIAL Serial1
+ //#define E1_HARDWARE_SERIAL Serial1
+ //#define E2_HARDWARE_SERIAL Serial1
+ //#define E3_HARDWARE_SERIAL Serial1
+ //#define E4_HARDWARE_SERIAL Serial1
+
+ //
+ // Software serial
+ //
+ #define X_SERIAL_TX_PIN P1_10
+ #define X_SERIAL_RX_PIN P1_10
+
+ #define Y_SERIAL_TX_PIN P1_09
+ #define Y_SERIAL_RX_PIN P1_09
+
+ #define Z_SERIAL_TX_PIN P1_08
+ #define Z_SERIAL_RX_PIN P1_08
+
+ #define E0_SERIAL_TX_PIN P1_04
+ #define E0_SERIAL_RX_PIN P1_04
+
+ #define E1_SERIAL_TX_PIN P1_01
+ #define E1_SERIAL_RX_PIN P1_01
+
+ // Reduce baud rate to improve software serial reliability
+ #define TMC_BAUD_RATE 19200
+#endif
+
+/* _____ _____
+ * NC | 1 2 | GND 5V | 1 2 | GND
+ * RESET | 3 4 | 1.31 1.23 | 3 4 | 1.22
+ * 0.18 | 5 6 3.25 1.21 | 5 6 1.20
+ * 0.16 | 7 8 | 3.26 1.19 | 7 8 | 1.18
+ * 0.15 | 9 10| 0.17 0.28 | 9 10| 1.30
+ * ----- -----
+ * EXP2 EXP1
+ */
+
+#define EXPA1_03_PIN P1_23
+#define EXPA1_04_PIN P1_22
+#define EXPA1_05_PIN P1_21
+#define EXPA1_06_PIN P1_20
+#define EXPA1_07_PIN P1_19
+#define EXPA1_08_PIN P1_18
+#define EXPA1_09_PIN P0_28
+#define EXPA1_10_PIN P1_30
+
+#define EXPA2_03_PIN -1
+#define EXPA2_04_PIN P1_31
+#define EXPA2_05_PIN P0_18
+#define EXPA2_06_PIN P3_25
+#define EXPA2_07_PIN P0_16
+#define EXPA2_08_PIN P3_26
+#define EXPA2_09_PIN P0_15
+#define EXPA2_10_PIN P0_17
+
+//
+// SD Connection
+//
+#if SD_CONNECTION_IS(LCD)
+ #define SD_SS_PIN EXPA2_07_PIN
+#endif
+
+/**
+ * _____ _____
+ * NC | · · | GND 5V | · · | GND
+ * RESET | · · | 1.31 (SD_DETECT) (LCD_D7) 1.23 | · · | 1.22 (LCD_D6)
+ * (MOSI) 0.18 | · · 3.25 (BTN_EN2) (LCD_D5) 1.21 | · · 1.20 (LCD_D4)
+ * (SD_SS) 0.16 | · · | 3.26 (BTN_EN1) (LCD_RS) 1.19 | · · | 1.18 (LCD_EN)
+ * (SCK) 0.15 | · · | 0.17 (MISO) (BTN_ENC) 0.28 | · · | 1.30 (BEEPER)
+ * ----- -----
+ * EXP2 EXP1
+ */
+
+#if ENABLED(DWIN_CREALITY_LCD)
+
+ // RET6 DWIN ENCODER LCD
+ #define BTN_ENC P1_20
+ #define BTN_EN1 P1_23
+ #define BTN_EN2 P1_22
+
+ #ifndef BEEPER_PIN
+ #define BEEPER_PIN P1_21
+ #undef SPEAKER
+ #endif
+
+#elif HAS_WIRED_LCD && !HAS_BTT_EXP_MOT
+
+ #if ENABLED(ANET_FULL_GRAPHICS_LCD_ALT_WIRING)
+ #error "CAUTION! ANET_FULL_GRAPHICS_LCD_ALT_WIRING requires wiring modifications. See 'pins_BTT_SKR_V1_4.h' for details. Comment out this line to continue."
+
+ /**
+ * 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
+ * 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. (This is the critical part!)
+ *
+ * !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!!
+ *
+ * The ANET_FULL_GRAPHICS_LCD_ALT_WIRING connector plug:
+ *
+ * BEFORE AFTER
+ * _____ _____
+ * GND | 1 2 | 5V 5V | 1 2 | GND
+ * CS | 3 4 | BTN_EN2 CS | 3 4 | BTN_EN2
+ * SID | 5 6 BTN_EN1 SID | 5 6 BTN_EN1
+ * open | 7 8 | BTN_ENC open | 7 8 | BTN_ENC
+ * CLK | 9 10| Beeper CLK | 9 10| Beeper
+ * ----- -----
+ * LCD LCD
+ */
+
+ #define LCD_PINS_RS EXPA1_07_PIN
+
+ #define BTN_EN1 EXPA1_05_PIN
+ #define BTN_EN2 EXPA1_04_PIN
+ #define BTN_ENC EXPA1_10_PIN
+
+ #define LCD_PINS_ENABLE EXPA1_08_PIN
+ #define LCD_PINS_D4 EXPA1_06_PIN
+ #define BEEPER_PIN EXPA1_03_PIN
+
+ #elif ENABLED(ANET_FULL_GRAPHICS_LCD)
+ #error "CAUTION! ANET_FULL_GRAPHICS_LCD requires wiring modifications. See 'pins_BTT_SKR_V1_4.h' for details. Comment out this line to continue."
+
+ /**
+ * 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
+ * 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. (This is the critical part!)
+ * 3. Rewire the CLK Signal (LCD Pin9) to LCD Pin7. (LCD Pin9 remains open because this pin is open drain.)
+ * 4. A wire is needed to connect the Reset switch at J3 (LCD Pin7) to EXP2 (Pin3) on the board.
+ *
+ * !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!!
+ *
+ * The ANET_FULL_GRAPHICS_LCD connector plug:
+ *
+ * BEFORE AFTER
+ * _____ _____
+ * GND | 1 2 | 5V 5V | 1 2 | GND
+ * CS | 3 4 | BTN_EN2 CS | 3 4 | BTN_EN2
+ * SID | 5 6 BTN_EN1 SID | 5 6 BTN_EN1
+ * open | 7 8 | BTN_ENC CLK | 7 8 | BTN_ENC
+ * CLK | 9 10| Beeper open | 9 10| Beeper
+ * ----- -----
+ * LCD LCD
+ */
+
+ #define LCD_PINS_RS EXPA1_03_PIN
+
+ #define BTN_EN1 EXPA1_06_PIN
+ #define BTN_EN2 EXPA1_04_PIN
+ #define BTN_ENC EXPA1_08_PIN
+
+ #define LCD_PINS_ENABLE EXPA1_05_PIN
+ #define LCD_PINS_D4 EXPA1_07_PIN
+
+ #define BEEPER_PIN EXPA1_10_PIN
+
+ #elif ENABLED(CR10_STOCKDISPLAY)
+ #define BTN_ENC EXPA1_09_PIN // (58) open-drain
+ #define LCD_PINS_RS EXPA1_04_PIN
+
+ #define BTN_EN1 EXPA1_08_PIN
+ #define BTN_EN2 EXPA1_06_PIN
+
+ #define LCD_PINS_ENABLE EXPA1_03_PIN
+ #define LCD_PINS_D4 EXPA1_05_PIN
+
+ #elif ENABLED(ENDER2_STOCKDISPLAY)
+
+ /** Creality Ender-2 display pinout
+ * _____
+ * 5V | 1 2 | GND
+ * (MOSI) 1.23 | 3 4 | 1.22 (LCD_RS)
+ * (LCD_A0) 1.21 | 5 6 1.20 (BTN_EN2)
+ * RESET 1.19 | 7 8 | 1.18 (BTN_EN1)
+ * (BTN_ENC) 0.28 | 9 10| 1.30 (SCK)
+ * -----
+ * EXP1
+ */
+
+ #define BTN_EN1 EXPA1_08_PIN
+ #define BTN_EN2 EXPA1_06_PIN
+ #define BTN_ENC EXPA1_09_PIN
+
+ #define DOGLCD_CS EXPA1_04_PIN
+ #define DOGLCD_A0 EXPA1_05_PIN
+ #define DOGLCD_SCK EXPA1_10_PIN
+ #define DOGLCD_MOSI EXPA1_03_PIN
+ #define FORCE_SOFT_SPI
+ #define LCD_BACKLIGHT_PIN -1
+
+ #elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI
+ #define TFT_CS_PIN EXPA1_04_PIN
+ #define TFT_A0_PIN EXPA1_03_PIN
+ #define TFT_DC_PIN EXPA1_03_PIN
+ #define TFT_MISO_PIN EXPA2_10_PIN
+ #define TFT_BACKLIGHT_PIN EXPA1_08_PIN
+ #define TFT_RESET_PIN EXPA1_07_PIN
+
+ #define LCD_USE_DMA_SPI
+
+ #define TOUCH_INT_PIN EXPA1_05_PIN
+ #define TOUCH_CS_PIN EXPA1_06_PIN
+ #define TOUCH_BUTTONS_HW_SPI
+ #define TOUCH_BUTTONS_HW_SPI_DEVICE 1
+
+ // SPI 1
+ #define SD_SCK_PIN EXPA2_09_PIN
+ #define SD_MISO_PIN EXPA2_10_PIN
+ #define SD_MOSI_PIN EXPA2_05_PIN
+
+ // Disable any LCD related PINs config
+ #define LCD_PINS_ENABLE -1
+ #define LCD_PINS_RS -1
+
+ #define TFT_BUFFER_SIZE 2400
+
+ #elif IS_TFTGLCD_PANEL
+
+ #if ENABLED(TFTGLCD_PANEL_SPI)
+ #define TFTGLCD_CS EXPA2_08_PIN
+ #endif
+
+ #define SD_DETECT_PIN EXPA2_04_PIN
+
+ #else
+
+ #define BTN_ENC EXPA1_09_PIN // (58) open-drain
+ #define LCD_PINS_RS EXPA1_07_PIN
+
+ #define BTN_EN1 EXPA2_08_PIN // (31) J3-2 & AUX-4
+ #define BTN_EN2 EXPA2_06_PIN // (33) J3-4 & AUX-4
+
+ #define LCD_PINS_ENABLE EXPA1_08_PIN
+ #define LCD_PINS_D4 EXPA1_06_PIN
+
+ #define LCD_SDSS EXPA2_07_PIN // (16) J3-7 & AUX-4
+
+ #if SD_CONNECTION_IS(LCD)
+ #define SD_DETECT_PIN EXPA2_04_PIN // (49) (NOT 5V tolerant)
+ #endif
+
+ #if ENABLED(FYSETC_MINI_12864)
+ #define DOGLCD_CS EXPA1_08_PIN
+ #define DOGLCD_A0 EXPA1_07_PIN
+ #define DOGLCD_SCK EXPA2_09_PIN
+ #define DOGLCD_MOSI EXPA2_05_PIN
+
+ #define LCD_BACKLIGHT_PIN -1
+
+ #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
+ // results in LCD soft SPI mode 3, SD soft SPI mode 0
+
+ #define LCD_RESET_PIN EXPA1_06_PIN // Must be high or open for LCD to operate normally.
+
+ #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
+ #ifndef RGB_LED_R_PIN
+ #define RGB_LED_R_PIN EXPA1_05_PIN
+ #endif
+ #ifndef RGB_LED_G_PIN
+ #define RGB_LED_G_PIN EXPA1_04_PIN
+ #endif
+ #ifndef RGB_LED_B_PIN
+ #define RGB_LED_B_PIN EXPA1_03_PIN
+ #endif
+ #elif ENABLED(FYSETC_MINI_12864_2_1)
+ #define NEOPIXEL_PIN EXPA1_05_PIN
+ #endif
+
+ #else // !FYSETC_MINI_12864
+
+ #if ENABLED(MKS_MINI_12864)
+ #define DOGLCD_CS EXPA1_05_PIN
+ #define DOGLCD_A0 EXPA1_04_PIN
+ #define DOGLCD_SCK EXPA2_09_PIN
+ #define DOGLCD_MOSI EXPA2_05_PIN
+ #define FORCE_SOFT_SPI
+ #endif
+
+ #if IS_ULTIPANEL
+ #define LCD_PINS_D5 EXPA1_05_PIN
+ #define LCD_PINS_D6 EXPA1_04_PIN
+ #define LCD_PINS_D7 EXPA1_03_PIN
+
+ #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
+ #define BTN_ENC_EN EXPA1_03_PIN // Detect the presence of the encoder
+ #endif
+
+ #endif
+
+ #endif // !FYSETC_MINI_12864
+
+ #endif // HAS_MARLINUI_U8GLIB
+
+#endif // HAS_WIRED_LCD
+
+#if HAS_ADC_BUTTONS
+ #error "ADC BUTTONS do not work unmodifed on SKR 1.4, The ADC ports cannot take more than 3.3v."
+#endif
+
+//
+// NeoPixel LED
+//
+#ifndef NEOPIXEL_PIN
+ #define NEOPIXEL_PIN P1_24
+#endif
+
+/**
+ * Special pins
+ * P1_30 (37) (NOT 5V tolerant)
+ * P1_31 (49) (NOT 5V tolerant)
+ * P0_27 (57) (Open collector)
+ * P0_28 (58) (Open collector)
+ */
+
+//
+// Include common SKR pins
+//
+#include "pins_BTT_SKR_common.h"
diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h
new file mode 100644
index 0000000..a43940f
--- /dev/null
+++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h
@@ -0,0 +1,188 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+#if ENABLED(SKR_HAS_LPC1769)
+ #if NOT_TARGET(MCU_LPC1769)
+ #error "Oops! Make sure you have the LPC1769 environment selected in your IDE."
+ #endif
+#elif NOT_TARGET(MCU_LPC1768)
+ #error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
+#endif
+
+// If you have the Big tree tech driver expantion module, enable HAS_BTT_EXP_MOT
+// https://github.com/bigtreetech/BTT-Expansion-module/tree/master/BTT%20EXP-MOT
+//#define HAS_BTT_EXP_MOT 1
+
+#if BOTH(HAS_WIRED_LCD, HAS_BTT_EXP_MOT)
+ #if EITHER(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY)
+ #define EXP_MOT_USE_EXP2_ONLY 1
+ #else
+ #error "You can't use both an LCD and a Motor Expansion Module on EXP1/EXP2 at the same time."
+ #endif
+#endif
+
+// Ignore temp readings during development.
+//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
+
+//
+// Steppers
+//
+#ifndef E1_STEP_PIN
+ #define E1_STEP_PIN P0_01
+#endif
+#ifndef E1_DIR_PIN
+ #define E1_DIR_PIN P0_00
+#endif
+#ifndef E1_ENABLE_PIN
+ #define E1_ENABLE_PIN P0_10
+#endif
+
+//
+// Temperature Sensors
+// 3.3V max when defined as an analog input
+//
+#ifndef TEMP_0_PIN
+ #define TEMP_0_PIN P0_24_A1 // A1 (T1) - (68) - TEMP_0_PIN
+#endif
+#ifndef TEMP_1_PIN
+ #define TEMP_1_PIN P0_25_A2 // A2 (T2) - (69) - TEMP_1_PIN
+#endif
+#ifndef TEMP_BED_PIN
+ #define TEMP_BED_PIN P0_23_A0 // A0 (T0) - (67) - TEMP_BED_PIN
+#endif
+
+#if HOTENDS == 1
+ #if TEMP_SENSOR_PROBE
+ #define TEMP_PROBE_PIN TEMP_1_PIN
+ #elif TEMP_SENSOR_CHAMBER
+ #define TEMP_CHAMBER_PIN TEMP_1_PIN
+ #endif
+#endif
+
+//
+// Heaters / Fans
+//
+#ifndef HEATER_0_PIN
+ #define HEATER_0_PIN P2_07
+#endif
+#if HOTENDS == 1
+ #ifndef FAN1_PIN
+ #define FAN1_PIN P2_04
+ #endif
+#else
+ #ifndef HEATER_1_PIN
+ #define HEATER_1_PIN P2_04
+ #endif
+#endif
+#ifndef FAN_PIN
+ #define FAN_PIN P2_03
+#endif
+#ifndef HEATER_BED_PIN
+ #define HEATER_BED_PIN P2_05
+#endif
+
+//
+// LCD / Controller
+//
+#if !defined(BEEPER_PIN) && HAS_WIRED_LCD && DISABLED(LCD_USE_I2C_BUZZER)
+ #define BEEPER_PIN P1_30 // (37) not 5V tolerant
+#endif
+
+//
+// SD Support
+//
+#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
+
+#if SD_CONNECTION_IS(LCD)
+ #define SD_SCK_PIN P0_15
+ #define SD_MISO_PIN P0_17
+ #define SD_MOSI_PIN P0_18
+#elif SD_CONNECTION_IS(ONBOARD)
+ #undef SD_DETECT_PIN
+ #define SD_DETECT_PIN P0_27
+ #define SD_SCK_PIN P0_07
+ #define SD_MISO_PIN P0_08
+ #define SD_MOSI_PIN P0_09
+ #define SD_SS_PIN ONBOARD_SD_CS_PIN
+#elif SD_CONNECTION_IS(CUSTOM_CABLE)
+ #error "No custom SD drive cable defined for this board."
+#endif
+
+#if HAS_BTT_EXP_MOT
+
+ /** _____ _____
+ * NC | · · | GND NC | · · | GND
+ * NC | · · | 1.31 (M1EN) (M2EN) 1.23 | · · | 1.22 (M3EN)
+ * (M1STP) 0.18 | · · 3.25 (M1DIR) (M1RX) 1.21 | · · 1.20 (M1DIAG)
+ * (M2DIR) 0.16 | · · | 3.26 (M2STP) (M2RX) 1.19 | · · | 1.18 (M2DIAG)
+ * (M3DIR) 0.15 | · · | 0.17 (M3STP) (M3RX) 0.28 | · · | 1.30 (M3DIAG)
+ * ----- -----
+ * EXP2 EXP1
+ *
+ * NB In EXP_MOT_USE_EXP2_ONLY mode EXP1 is not used and M2EN and M3EN need to be jumpered to M1EN
+ */
+
+ // M1 on Driver Expansion Module
+ #define E2_STEP_PIN EXPA2_05_PIN
+ #define E2_DIR_PIN EXPA2_06_PIN
+ #define E2_ENABLE_PIN EXPA2_04_PIN
+ #if !EXP_MOT_USE_EXP2_ONLY
+ #define E2_DIAG_PIN EXPA1_06_PIN
+ #define E2_CS_PIN EXPA1_05_PIN
+ #if HAS_TMC_UART
+ #define E2_SERIAL_TX_PIN EXPA1_05_PIN
+ #define E2_SERIAL_RX_PIN EXPA1_05_PIN
+ #endif
+ #endif
+
+ // M2 on Driver Expansion Module
+ #define E3_STEP_PIN EXPA2_08_PIN
+ #define E3_DIR_PIN EXPA2_07_PIN
+ #if !EXP_MOT_USE_EXP2_ONLY
+ #define E3_ENABLE_PIN EXPA1_03_PIN
+ #define E3_DIAG_PIN EXPA1_08_PIN
+ #define E3_CS_PIN EXPA1_07_PIN
+ #if HAS_TMC_UART
+ #define E3_SERIAL_TX_PIN EXPA1_07_PIN
+ #define E3_SERIAL_RX_PIN EXPA1_07_PIN
+ #endif
+ #else
+ #define E3_ENABLE_PIN EXPA2_04_PIN
+ #endif
+
+ // M3 on Driver Expansion Module
+ #define E4_STEP_PIN EXPA2_10_PIN
+ #define E4_DIR_PIN EXPA2_09_PIN
+ #if !EXP_MOT_USE_EXP2_ONLY
+ #define E4_ENABLE_PIN EXPA1_04_PIN
+ #define E4_DIAG_PIN EXPA1_10_PIN
+ #define E4_CS_PIN EXPA1_09_PIN
+ #if HAS_TMC_UART
+ #define E4_SERIAL_TX_PIN EXPA1_09_PIN
+ #define E4_SERIAL_RX_PIN EXPA1_09_PIN
+ #endif
+ #else
+ #define E4_ENABLE_PIN EXPA2_04_PIN
+ #endif
+
+#endif // HAS_BTT_EXP_MOT
diff --git a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h
new file mode 100644
index 0000000..1970c0c
--- /dev/null
+++ b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h
@@ -0,0 +1,168 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+#if NOT_TARGET(MCU_LPC1768)
+ #error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
+#endif
+
+#define BOARD_INFO_NAME "GMARSH X6 REV1"
+
+// Ignore temp readings during develpment.
+//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
+
+//
+// Enable 12MHz clock output on P1.27 pin to sync TMC2208 chip clocks
+//
+#define LPC1768_ENABLE_CLKOUT_12M
+
+//
+// Servos
+//
+#define SERVO0_PIN P1_26 // PWM1[6]
+#define SERVO1_PIN P1_18 // PWM1[1]
+
+//
+// Limit Switches
+//
+#define X_MIN_PIN P0_00
+#define X_MAX_PIN P0_01
+#define Y_MIN_PIN P0_10
+#define Y_MAX_PIN P0_21
+#define Z_MIN_PIN P2_13
+#define Z_MAX_PIN P2_22
+
+//
+// Steppers
+//
+
+#define X_STEP_PIN P1_01
+#define X_DIR_PIN P1_04
+#define X_ENABLE_PIN P0_26
+
+#define Y_STEP_PIN P1_10
+#define Y_DIR_PIN P1_14
+#define Y_ENABLE_PIN P1_08
+
+#define Z_STEP_PIN P1_17
+#define Z_DIR_PIN P4_29
+#define Z_ENABLE_PIN P1_15
+
+#define E0_STEP_PIN P0_05
+#define E0_DIR_PIN P2_00
+#define E0_ENABLE_PIN P4_28
+
+#define E1_STEP_PIN P2_03
+#define E1_DIR_PIN P2_04
+#define E1_ENABLE_PIN P2_01
+
+#define E2_STEP_PIN P2_07
+#define E2_DIR_PIN P2_08
+#define E2_ENABLE_PIN P2_05
+
+//
+// TMC2208 UART pins
+//
+#if HAS_TMC_UART
+ #define X_SERIAL_TX_PIN P1_00
+ #define X_SERIAL_RX_PIN P1_00
+ #define Y_SERIAL_TX_PIN P1_09
+ #define Y_SERIAL_RX_PIN P1_09
+ #define Z_SERIAL_TX_PIN P1_16
+ #define Z_SERIAL_RX_PIN P1_16
+ #define E0_SERIAL_TX_PIN P0_04
+ #define E0_SERIAL_RX_PIN P0_04
+ #define E1_SERIAL_TX_PIN P2_02
+ #define E1_SERIAL_RX_PIN P2_02
+ #define E2_SERIAL_TX_PIN P2_06
+ #define E2_SERIAL_RX_PIN P2_06
+
+ // Reduce baud rate to improve software serial reliability
+ #define TMC_BAUD_RATE 19200
+#else
+ #error "TMC2208 UART configuration is required for GMarsh X6."
+#endif
+
+//
+// Temperature Sensors
+// 3.3V max when defined as an analog input
+//
+#define TEMP_0_PIN P0_24_A1 // AD0[0] on P0_23
+#define TEMP_BED_PIN P0_23_A0 // AD0[1] on P0_24
+
+//
+// Heaters / Fans
+//
+#define HEATER_BED_PIN P1_19 // Not a PWM pin, software PWM required
+#define HEATER_0_PIN P3_26 // PWM1[3]
+#define FAN_PIN P3_25 // Part cooling fan - connected to PWM1[2]
+#define E0_AUTO_FAN_PIN P0_27 // Extruder cooling fan
+
+//
+// Misc. Functions
+//
+#define LED_PIN P1_31
+
+//
+// LCD
+//
+#if IS_RRD_SC
+ #define BEEPER_PIN P0_19
+ #define BTN_EN1 P1_23
+ #define BTN_EN2 P1_24
+ #define BTN_ENC P1_25
+ #define LCD_PINS_RS P0_20
+ #define LCD_PINS_ENABLE P0_21
+ #define LCD_PINS_D4 P2_11
+ #define LCD_PINS_D5 P0_22
+ #define LCD_PINS_D6 P1_29
+ #define LCD_PINS_D7 P1_28
+
+ #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
+ #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
+ #endif
+
+#endif
+
+//
+// SD Support
+//
+
+#ifndef SDCARD_CONNECTION
+ #define SDCARD_CONNECTION LCD
+#endif
+
+#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
+
+#if SD_CONNECTION_IS(LCD)
+ #define SD_SCK_PIN P0_15
+ #define SD_MISO_PIN P0_17
+ #define SD_MOSI_PIN P0_18
+ #define SD_SS_PIN P0_16
+#elif SD_CONNECTION_IS(ONBOARD)
+ #undef SD_DETECT_PIN
+ #define SD_DETECT_PIN P0_27
+ #define SD_SCK_PIN P0_07
+ #define SD_MISO_PIN P0_08
+ #define SD_MOSI_PIN P0_09
+ #define SD_SS_PIN ONBOARD_SD_CS_PIN
+#endif
diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h
new file mode 100644
index 0000000..fbddc66
--- /dev/null
+++ b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h
@@ -0,0 +1,388 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+/**
+ * MKS SBASE pin assignments
+ */
+
+#if defined(MKS_HAS_LPC1769) && NOT_TARGET(MCU_LPC1769)
+ #error "Oops! Make sure you have the LPC1769 environment selected in your IDE."
+#elif !defined(MKS_HAS_LPC1769) && NOT_TARGET(MCU_LPC1768)
+ #error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
+#endif
+
+#ifndef BOARD_INFO_NAME
+ #define BOARD_INFO_NAME "MKS SBASE"
+#endif
+#ifndef BOARD_WEBSITE_URL
+ #define BOARD_WEBSITE_URL "github.com/makerbase-mks/MKS-SBASE"
+#endif
+
+#define LED_PIN P1_18 // Used as a status indicator
+#define LED2_PIN P1_19
+#define LED3_PIN P1_20
+#define LED4_PIN P1_21
+
+//
+// Servos
+//
+#define SERVO0_PIN P1_23 // J8-3 (low jitter)
+#define SERVO1_PIN P2_12 // J8-4
+#define SERVO2_PIN P2_11 // J8-5
+#define SERVO3_PIN P4_28 // J8-6
+
+//
+// Limit Switches - Not Interrupt Capable
+//
+#define X_MIN_PIN P1_24 // 10k pullup to 3.3V, 1K series
+#define X_MAX_PIN P1_25 // 10k pullup to 3.3V, 1K series
+#define Y_MIN_PIN P1_26 // 10k pullup to 3.3V, 1K series
+#define Y_MAX_PIN P1_27 // 10k pullup to 3.3V, 1K series
+#define Z_MIN_PIN P1_28 // The original Mks Sbase DIO19 has a 10k pullup to 3.3V or 5V, 1K series, so when using a Zprobe we must use DIO41 (J8 P1.22)
+#define Z_MAX_PIN P1_29 // 10k pullup to 3.3V, 1K series
+
+#ifndef Z_MIN_PROBE_PIN
+ #define Z_MIN_PROBE_PIN P4_28 // Connector J8
+#endif
+
+//
+// Steppers
+//
+#define X_STEP_PIN P2_00
+#define X_DIR_PIN P0_05
+#define X_ENABLE_PIN P0_04
+
+#define Y_STEP_PIN P2_01
+#define Y_DIR_PIN P0_11
+#define Y_ENABLE_PIN P0_10
+
+#define Z_STEP_PIN P2_02
+#define Z_DIR_PIN P0_20
+#define Z_ENABLE_PIN P0_19
+
+#define E0_STEP_PIN P2_03
+#define E0_DIR_PIN P0_22
+#define E0_ENABLE_PIN P0_21
+
+#define E1_STEP_PIN P2_08
+#define E1_DIR_PIN P2_13
+#define E1_ENABLE_PIN P4_29
+
+//
+// Temperature Sensors
+// 3.3V max when defined as an analog input
+//
+#define TEMP_BED_PIN P0_23_A0 // A0 (TH1)
+#define TEMP_0_PIN P0_24_A1 // A1 (TH2)
+#define TEMP_1_PIN P0_25_A2 // A2 (TH3)
+#define TEMP_2_PIN P0_26_A3 // A3 (TH4)
+
+//
+// Heaters / Fans
+//
+#define HEATER_BED_PIN P2_05
+#define HEATER_0_PIN P2_07
+#define HEATER_1_PIN P2_06
+#ifndef FAN_PIN
+ #define FAN_PIN P2_04
+#endif
+
+//
+// Connector J7
+// Note: These pins are all digitally shared with the EXP1/EXP2 Connector.
+// Using them with an LCD connected or configured will lead to hangs & crashes.
+//
+
+// 5V
+// NC
+// GND
+#define PIN_P0_17 P0_17
+#define PIN_P0_16 P0_16
+#define PIN_P0_15 P0_15
+
+//
+// Connector J8
+//
+
+// GND
+#define PIN_P1_22 P1_22
+#define PIN_P1_23 P1_23 // PWM Capable
+#define PIN_P2_12 P2_12 // Interrupt Capable
+#define PIN_P2_11 P2_11 // Interrupt Capable
+
+//
+// Průša i3 MMU1 (Multi Material Multiplexer) Support
+//
+#if HAS_PRUSA_MMU1
+ #define E_MUX0_PIN P1_23 // J8-3
+ #define E_MUX1_PIN P2_12 // J8-4
+ #define E_MUX2_PIN P2_11 // J8-5
+#endif
+
+//
+// Misc. Functions
+//
+#define PS_ON_PIN P0_25 // TH3 Connector
+
+//
+// Ethernet pins
+//
+#if !IS_ULTIPANEL
+ #define ENET_MDIO P1_17 // J12-4
+ #define ENET_RX_ER P1_14 // J12-6
+ #define ENET_RXD1 P1_10 // J12-8
+#endif
+
+#define ENET_MOC P1_16 // J12-3
+#define REF_CLK P1_15 // J12-5
+#define ENET_RXD0 P1_09 // J12-7
+#define ENET_CRS P1_08 // J12-9
+#define ENET_TX_EN P1_04 // J12-10
+#define ENET_TXD0 P1_00 // J12-11
+#define ENET_TXD1 P1_01 // J12-12
+
+#ifndef SDCARD_CONNECTION
+ #define SDCARD_CONNECTION ONBOARD
+#endif
+
+#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
+
+#if SD_CONNECTION_IS(CUSTOM_CABLE)
+
+ /**
+ * A custom cable is needed. See the README file in the
+ * Marlin\src\config\examples\Mks\Sbase directory
+ * P0.27 is on EXP2 and the on-board SD card's socket. That means it can't be
+ * used as the SD_DETECT for the LCD's SD card.
+ *
+ * The best solution is to use the custom cable to connect the LCD's SD_DETECT
+ * to a pin NOT on EXP2.
+ *
+ * If you can't find a pin to use for the LCD's SD_DETECT then comment out
+ * SD_DETECT_PIN entirely and remove that wire from the the custom cable.
+ */
+ #define SD_DETECT_PIN P2_11 // J8-5 (moved from EXP2 P0.27)
+ #define SD_SCK_PIN P1_22 // J8-2 (moved from EXP2 P0.7)
+ #define SD_MISO_PIN P1_23 // J8-3 (moved from EXP2 P0.8)
+ #define SD_MOSI_PIN P2_12 // J8-4 (moved from EXP2 P0.9)
+ #define SD_SS_PIN P0_28
+ #define LPC_SOFTWARE_SPI // With a custom cable we need software SPI because the
+ // selected pins are not on a hardware SPI controller
+#elif SD_CONNECTION_IS(LCD) || SD_CONNECTION_IS(ONBOARD)
+ #define SD_SCK_PIN P0_07
+ #define SD_MISO_PIN P0_08
+ #define SD_MOSI_PIN P0_09
+ #if SD_CONNECTION_IS(LCD)
+ // Use standard cable and header, SPI and SD detect are shared with onboard SD card.
+ // Hardware SPI is used for both SD cards. The detect pin is shared between the
+ // LCD and onboard SD readers so we disable it.
+ #define SD_SS_PIN P0_28
+ #else
+ #define SD_DETECT_PIN P0_27
+ #define SD_SS_PIN ONBOARD_SD_CS_PIN
+ #endif
+#endif
+
+/**
+ * Smart LCD adapter
+ *
+ * The Smart LCD adapter can be used for the two 10 pin LCD controllers such as
+ * REPRAP_DISCOUNT_SMART_CONTROLLER. It can't be used for controllers that use
+ * DOGLCD_A0, DOGLCD_CS, LCD_PINS_D5, LCD_PINS_D6 or LCD_PINS_D7. A custom cable
+ * is needed to pick up 5V for the EXP1 connection.
+ *
+ * SD card on the LCD uses the same SPI signals as the LCD. This results in garbage/lines
+ * on the LCD display during accesses of the SD card. The menus/code has been arranged so
+ * that the garbage/lines are erased immediately after the SD card accesses are completed.
+ */
+
+#if IS_TFTGLCD_PANEL
+
+ #if ENABLED(TFTGLCD_PANEL_SPI)
+ #define TFTGLCD_CS P3_25 // EXP2.3
+ #endif
+
+ #if SD_CONNECTION_IS(LCD)
+ #define SD_DETECT_PIN P0_28 // EXP2.4
+ #endif
+
+#elif HAS_WIRED_LCD
+
+ #define BEEPER_PIN P1_31 // EXP1.1
+ #define BTN_ENC P1_30 // EXP1.2
+ #define BTN_EN1 P3_26 // EXP2.5
+ #define BTN_EN2 P3_25 // EXP2.3
+ #define LCD_PINS_RS P0_16 // EXP1.4
+ #define LCD_SDSS P0_28 // EXP2.4
+ #define LCD_PINS_ENABLE P0_18 // EXP1.3
+ #define LCD_PINS_D4 P0_15 // EXP1.5
+ #if ANY(VIKI2, miniVIKI)
+ #define DOGLCD_SCK SD_SCK_PIN
+ #define DOGLCD_MOSI SD_MOSI_PIN
+ #endif
+
+ #if ENABLED(FYSETC_MINI_12864)
+ /**
+ * The FYSETC display can NOT use the SCK and MOSI pins on EXP2, so a
+ * special cable is needed to go between EXP2 on the FYSETC and the
+ * controller board's EXP2 and J8. It also means that a software SPI
+ * is needed to drive those pins.
+ *
+ * The FYSETC requires mode 3 SPI interface.
+ *
+ * Pins 6, 7 & 8 on EXP2 are no connects. That means a second special
+ * cable will be needed if the RGB LEDs are to be active.
+ */
+ #define DOGLCD_CS LCD_PINS_ENABLE // EXP1.3 (LCD_EN on FYSETC schematic)
+ #define DOGLCD_A0 LCD_PINS_RS // EXP1.4 (LCD_A0 on FYSETC schematic)
+ #define DOGLCD_SCK P2_11 // J8-5 (SCK on FYSETC schematic)
+ #define DOGLCD_MOSI P4_28 // J8-6 (MOSI on FYSETC schematic)
+
+ //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
+ // results in LCD soft SPI mode 3, SD soft SPI mode 0
+
+ #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
+ #ifndef RGB_LED_R_PIN
+ #define RGB_LED_R_PIN P2_12 // J8-4 (LCD_D6 on FYSETC schematic)
+ #endif
+ #ifndef RGB_LED_G_PIN
+ #define RGB_LED_G_PIN P1_23 // J8-3 (LCD_D5 on FYSETC schematic)
+ #endif
+ #ifndef RGB_LED_B_PIN
+ #define RGB_LED_B_PIN P1_22 // J8-2 (LCD_D7 on FYSETC schematic)
+ #endif
+ #elif ENABLED(FYSETC_MINI_12864_2_1)
+ #define NEOPIXEL_PIN P2_12
+ #endif
+
+ #elif ENABLED(MINIPANEL)
+ // GLCD features
+ // Uncomment screen orientation
+ //#define LCD_SCREEN_ROT_90
+ //#define LCD_SCREEN_ROT_180
+ //#define LCD_SCREEN_ROT_270
+ #endif
+
+#endif // HAS_WIRED_LCD
+
+/**
+ * Example for trinamic drivers using the J8 connector on MKs Sbase.
+ * 2130s need 1 pin for each driver. 2208/2209s need 2 pins for serial control.
+ * This board does not have enough pins to use hardware serial.
+ */
+
+#if HAS_DRIVER(TMC2130)
+ // J8
+ #define X_CS_PIN P1_22
+ #define Y_CS_PIN P1_23
+ #define Z_CS_PIN P2_12
+ #define E0_CS_PIN P2_11
+ #define E1_CS_PIN P4_28
+
+ // Hardware SPI is on EXP2. See if you can make it work:
+ // https://github.com/makerbase-mks/MKS-SBASE/issues/25
+ #define TMC_USE_SW_SPI
+ #if ENABLED(TMC_USE_SW_SPI)
+ #ifndef TMC_SW_MOSI
+ #define TMC_SW_MOSI P0_03 // AUX1
+ #endif
+ #ifndef TMC_SW_MISO
+ #define TMC_SW_MISO P0_02 // AUX1
+ #endif
+ #ifndef TMC_SW_SCK
+ #define TMC_SW_SCK P0_26 // TH4
+ #endif
+ #endif
+
+#endif
+
+#if MB(MKS_SBASE) && HAS_TMC_UART
+
+ /**
+ * TMC2208/TMC2209 stepper drivers
+ *
+ * The shortage of pins becomes apparent.
+ * Worst case you may have to give up the LCD
+ * RX pins need to be interrupt capable
+ */
+ #define X_SERIAL_TX_PIN P1_22 // J8-2
+ #define X_SERIAL_RX_PIN P2_12 // J8-4 Interrupt Capable
+ #define Y_SERIAL_TX_PIN P1_23 // J8-3
+ #define Y_SERIAL_RX_PIN P2_11 // J8-5 Interrupt Capable
+ #define Z_SERIAL_TX_PIN P2_12 // J8-4
+ #define Z_SERIAL_RX_PIN P0_25 // TH3
+ #define E0_SERIAL_TX_PIN P4_28 // J8-6
+ #define E0_SERIAL_RX_PIN P0_26 // TH4
+
+ // Reduce baud rate to improve software serial reliability
+ #define TMC_BAUD_RATE 19200
+#endif
+
+// UNUSED
+#define PIN_P0_27 P0_27 // EXP2/Onboard SD
+#define PIN_P0_28 P0_28 // EXP2
+#define PIN_P0_02 P0_02 // AUX1 (Interrupt Capable/ADC/Serial Port 0)
+#define PIN_P0_03 P0_03 // AUX1 (Interrupt Capable/ADC/Serial Port 0)
+
+/**
+ * PWMs
+ *
+ * There are 6 PWMs. Each PWM can be assigned to one of two pins.
+ *
+ * SERVO2 does NOT have a PWM assigned to it.
+ *
+ * PWM1.1 P1_18 SERVO3_PIN FIL_RUNOUT_PIN 5V output, PWM
+ * PWM1.1 P2_00 E0_STEP_PIN
+ * PWM1.2 P1_20 SERVO0_PIN
+ * PWM1.2 P2_01 X_STEP_PIN
+ * PWM1.3 P1_21 SERVO1_PIN J5-1
+ * PWM1.3 P2_02 Y_STEP_PIN
+ * PWM1.4 P1_23 SDSS(SSEL0) J3-5 AUX-3
+ * PWM1.4 P2_03 Z_STEP_PIN
+ * PWM1.5 P1_24 X_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES
+ * PWM1.5 P2_04 RAMPS_D9_PIN
+ * PWM1.6 P1_26 Y_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES
+ * PWM1.6 P2_05 RAMPS_D10_PIN
+ */
+
+/**
+ * Special pins
+ * P1_30 - not 5V tolerant - EXP1
+ * P1_31 - not 5V tolerant - EXP1
+ * P0_27 - open collector - EXP2
+ * P0_28 - open collector - EXP2
+ */
+
+/**
+ * Serial Ports
+ * P0_00 - Port 3
+ * P0_01 - SD Card (Onboard)
+ * P0_10 - Port 2
+ * P0_11 - Y_EN/Y_DIR
+ * P0_15 - Port 1
+ * P0_16 - EXP1
+ * P0_02 - Port 0
+ * P0_03 - AUX1
+ * P0_29 - Port -1
+ * P0_30 - USB
+ */
diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h
new file mode 100644
index 0000000..b919eca
--- /dev/null
+++ b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h
@@ -0,0 +1,395 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+/**
+ * MKS SGEN-L pin assignments
+ */
+
+#if NOT_TARGET(MCU_LPC1768)
+ #error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
+#endif
+
+#define BOARD_INFO_NAME "MKS SGen-L"
+#define BOARD_WEBSITE_URL "github.com/makerbase-mks/MKS-SGEN_L"
+
+//
+// Servos
+//
+#define SERVO0_PIN P1_23 // SERVO P1.23
+#define SERVO1_PIN P2_00 // SERVO P2.0
+
+//
+// Trinamic Stallguard pins
+//
+#define X_DIAG_PIN P1_29 // X-
+#define Y_DIAG_PIN P1_27 // Y-
+#define Z_DIAG_PIN P1_25 // Z-
+#define E0_DIAG_PIN P1_28 // X+
+#define E1_DIAG_PIN P1_26 // Y+
+
+//
+// Limit Switches
+//
+#ifdef X_STALL_SENSITIVITY
+ #define X_STOP_PIN X_DIAG_PIN
+ #if X_HOME_DIR < 0
+ #define X_MAX_PIN P1_28 // X+
+ #else
+ #define X_MIN_PIN P1_28 // X+
+ #endif
+#else
+ #define X_MIN_PIN P1_29 // X-
+ #define X_MAX_PIN P1_28 // X+
+#endif
+
+#ifdef Y_STALL_SENSITIVITY
+ #define Y_STOP_PIN Y_DIAG_PIN
+ #if Y_HOME_DIR < 0
+ #define Y_MAX_PIN P1_26 // Y+
+ #else
+ #define Y_MIN_PIN P1_26 // Y+
+ #endif
+#else
+ #define Y_MIN_PIN P1_27 // Y-
+ #define Y_MAX_PIN P1_26 // Y+
+#endif
+
+#ifdef Z_STALL_SENSITIVITY
+ #define Z_STOP_PIN Z_DIAG_PIN
+ #if Z_HOME_DIR < 0
+ #define Z_MAX_PIN P1_24 // Z+
+ #else
+ #define Z_MIN_PIN P1_24 // Z+
+ #endif
+#else
+ #define Z_MIN_PIN P1_25 // Z-
+ #define Z_MAX_PIN P1_24 // Z+
+#endif
+
+//
+// Z Probe (when not Z_MIN_PIN)
+//
+#ifndef Z_MIN_PROBE_PIN
+ #define Z_MIN_PROBE_PIN P1_24
+#endif
+
+//
+// Steppers
+//
+#define X_STEP_PIN P2_02
+#define X_DIR_PIN P2_03
+#define X_ENABLE_PIN P2_01
+#ifndef X_CS_PIN
+ #define X_CS_PIN P1_01
+#endif
+
+#define Y_STEP_PIN P0_19
+#define Y_DIR_PIN P0_20
+#define Y_ENABLE_PIN P2_08
+#ifndef Y_CS_PIN
+ #define Y_CS_PIN P1_08
+#endif
+
+#define Z_STEP_PIN P0_22
+#define Z_DIR_PIN P2_11
+#define Z_ENABLE_PIN P0_21
+#ifndef Z_CS_PIN
+ #define Z_CS_PIN P1_10
+#endif
+
+#define E0_STEP_PIN P2_13
+#define E0_DIR_PIN P0_11
+#define E0_ENABLE_PIN P2_12
+#ifndef E0_CS_PIN
+ #define E0_CS_PIN P1_15
+#endif
+
+#define E1_STEP_PIN P0_01
+#define E1_DIR_PIN P0_00
+#define E1_ENABLE_PIN P0_10
+#ifndef E1_CS_PIN
+ #define E1_CS_PIN P1_17
+#endif
+
+//
+// Software SPI pins for TMC2130 stepper drivers
+//
+#if ENABLED(TMC_USE_SW_SPI)
+ #ifndef TMC_SW_MOSI
+ #define TMC_SW_MOSI P4_28
+ #endif
+ #ifndef TMC_SW_MISO
+ #define TMC_SW_MISO P0_05
+ #endif
+ #ifndef TMC_SW_SCK
+ #define TMC_SW_SCK P0_04
+ #endif
+#endif
+
+#if HAS_TMC_UART
+ /**
+ * TMC2208/TMC2209 stepper drivers
+ *
+ * Hardware serial communication ports.
+ * If undefined software serial is used according to the pins below
+ */
+ //#define X_HARDWARE_SERIAL Serial1
+ //#define X2_HARDWARE_SERIAL Serial1
+ //#define Y_HARDWARE_SERIAL Serial1
+ //#define Y2_HARDWARE_SERIAL Serial1
+ //#define Z_HARDWARE_SERIAL Serial1
+ //#define Z2_HARDWARE_SERIAL Serial1
+ //#define E0_HARDWARE_SERIAL Serial1
+ //#define E1_HARDWARE_SERIAL Serial1
+ //#define E2_HARDWARE_SERIAL Serial1
+ //#define E3_HARDWARE_SERIAL Serial1
+ //#define E4_HARDWARE_SERIAL Serial1
+
+ //
+ // Software serial
+ //
+
+ #define X_SERIAL_TX_PIN P1_04
+ #define X_SERIAL_RX_PIN P1_01
+
+ #define Y_SERIAL_TX_PIN P1_09
+ #define Y_SERIAL_RX_PIN P1_08
+
+ #define Z_SERIAL_TX_PIN P1_14
+ #define Z_SERIAL_RX_PIN P1_10
+
+ #define E0_SERIAL_TX_PIN P1_16
+ #define E0_SERIAL_RX_PIN P1_15
+
+ #define E1_SERIAL_TX_PIN P4_29
+ #define E1_SERIAL_RX_PIN P1_17
+
+ #define Z2_SERIAL_TX_PIN P4_29
+ #define Z2_SERIAL_RX_PIN P1_17
+
+ // Reduce baud rate to improve software serial reliability
+ #define TMC_BAUD_RATE 19200
+#endif // HAS_TMC_UART
+
+//
+// Temperature Sensors
+// 3.3V max when defined as an analog input
+//
+#define TEMP_0_PIN P0_23_A0 // Analog Input A0 (TH1)
+#define TEMP_BED_PIN P0_24_A1 // Analog Input A1 (TB)
+#define TEMP_1_PIN P0_25_A2 // Analog Input A2 (TH2)
+
+//
+// Heaters / Fans
+//
+#define HEATER_BED_PIN P2_05
+#define HEATER_0_PIN P2_07
+#if HOTENDS == 1
+ #ifndef FAN1_PIN
+ #define FAN1_PIN P2_06
+ #endif
+#else
+ #ifndef HEATER_1_PIN
+ #define HEATER_1_PIN P2_06
+ #endif
+#endif
+#ifndef FAN_PIN
+ #define FAN_PIN P2_04
+#endif
+
+//
+// Misc. Functions
+//
+#define LED_PIN P1_18 // Used as a status indicator
+#define LED2_PIN P1_19
+#define LED3_PIN P1_20
+#define LED4_PIN P1_21
+
+/**
+ * _____ _____
+ * (BEEPER) 1.31 | · · | 1.30 (BTN_ENC) (MISO) 0.8 | · · | 0.7 (SD_SCK)
+ * (LCD_EN) 0.18 | · · | 0.16 (LCD_RS) (BTN_EN1) 3.25 | · · | 0.28 (SD_CS2)
+ * (LCD_D4) 0.15 | · · 0.17 (LCD_D5) (BTN_EN2) 3.26 | · · 0.9 (SD_MOSI)
+ * (LCD_D6) 1.0 | · · | 1.22 (LCD_D7) (SD_DETECT) 0.27 | · · | RST
+ * GND | · · | 5V GND | · · | NC
+ * ----- -----
+ * EXP1 EXP2
+ */
+#if HAS_WIRED_LCD
+
+ #define BEEPER_PIN P1_31
+ #define BTN_ENC P1_30
+
+ #if ENABLED(CR10_STOCKDISPLAY)
+ #define LCD_PINS_RS P1_00
+
+ #define BTN_EN1 P0_18
+ #define BTN_EN2 P0_15
+
+ #define LCD_PINS_ENABLE P1_22
+ #define LCD_PINS_D4 P0_17
+
+ #elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI
+ #define TFT_CS_PIN P1_00
+ #define TFT_A0_PIN P1_22
+ #define TFT_DC_PIN P1_22
+ #define TFT_MISO_PIN P0_08
+ #define TFT_BACKLIGHT_PIN P0_18
+ #define TFT_RESET_PIN P0_16
+
+ #define LCD_USE_DMA_SPI
+
+ #define TOUCH_INT_PIN P0_17
+ #define TOUCH_CS_PIN P0_15
+ #define TOUCH_BUTTONS_HW_SPI
+ #define TOUCH_BUTTONS_HW_SPI_DEVICE 2
+
+ // Disable any LCD related PINs config
+ #define LCD_PINS_ENABLE -1
+ #define LCD_PINS_RS -1
+
+ #ifndef TFT_BUFFER_SIZE
+ #define TFT_BUFFER_SIZE 1200
+ #endif
+ #ifndef TFT_QUEUE_SIZE
+ #define TFT_QUEUE_SIZE 6144
+ #endif
+
+ #define BTN_EN1 P3_25
+ #define BTN_EN2 P3_26
+
+ #elif IS_TFTGLCD_PANEL
+
+ #undef BEEPER_PIN
+ #undef BTN_ENC
+
+ #if ENABLED(TFTGLCD_PANEL_SPI)
+ #define TFTGLCD_CS P3_25
+ #endif
+
+ #else
+
+ #define BTN_EN1 P3_25
+ #define BTN_EN2 P3_26
+
+ #define LCD_SDSS P0_28
+
+ #if ENABLED(MKS_12864OLED_SSD1306)
+
+ #define LCD_PINS_DC P0_17
+ #define DOGLCD_CS P0_16
+ #define DOGLCD_A0 LCD_PINS_DC
+ #define DOGLCD_SCK P0_15
+ #define DOGLCD_MOSI P0_18
+
+ #define LCD_PINS_RS P1_00
+ #define LCD_PINS_D7 P1_22
+ #define KILL_PIN -1 // NC
+
+ #else // !MKS_12864OLED_SSD1306
+
+ #define LCD_PINS_RS P0_16
+
+ #define LCD_PINS_ENABLE P0_18
+ #define LCD_PINS_D4 P0_15
+
+ #if ENABLED(FYSETC_MINI_12864)
+
+ #define DOGLCD_CS P0_18
+ #define DOGLCD_A0 P0_16
+ #define DOGLCD_SCK P0_07
+ #define DOGLCD_MOSI P0_09
+
+ #define LCD_BACKLIGHT_PIN -1
+
+ #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
+ // results in LCD soft SPI mode 3, SD soft SPI mode 0
+
+ #define LCD_RESET_PIN P0_15 // Must be high or open for LCD to operate normally.
+
+ #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
+ #ifndef RGB_LED_R_PIN
+ #define RGB_LED_R_PIN P0_17
+ #endif
+ #ifndef RGB_LED_G_PIN
+ #define RGB_LED_G_PIN P1_00
+ #endif
+ #ifndef RGB_LED_B_PIN
+ #define RGB_LED_B_PIN P1_22
+ #endif
+ #elif ENABLED(FYSETC_MINI_12864_2_1)
+ #define NEOPIXEL_PIN P0_17
+ #endif
+
+ #else // !FYSETC_MINI_12864
+
+ #if ENABLED(MKS_MINI_12864)
+ #define DOGLCD_CS P0_17
+ #define DOGLCD_A0 P1_00
+ #endif
+
+ #if IS_ULTIPANEL
+ #define LCD_PINS_D5 P0_17
+ #define LCD_PINS_D6 P1_00
+ #define LCD_PINS_D7 P1_22
+
+ #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
+ #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
+ #endif
+
+ #endif
+
+ #endif // !FYSETC_MINI_12864
+
+ #endif // !MKS_12864OLED_SSD1306
+
+ #endif // !CR10_STOCKDISPLAY
+
+#endif // HAS_WIRED_LCD
+
+#ifndef SDCARD_CONNECTION
+ #define SDCARD_CONNECTION ONBOARD
+#endif
+
+#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
+
+#if SD_CONNECTION_IS(LCD) || SD_CONNECTION_IS(ONBOARD)
+ #define SD_DETECT_PIN P0_27
+ #define SD_SCK_PIN P0_07
+ #define SD_MISO_PIN P0_08
+ #define SD_MOSI_PIN P0_09
+ #if SD_CONNECTION_IS(ONBOARD)
+ #define SD_SS_PIN ONBOARD_SD_CS_PIN
+ #else
+ #define SD_SS_PIN P0_28
+ #endif
+#elif SD_CONNECTION_IS(CUSTOM_CABLE)
+ #error "No custom SD drive cable defined for this board."
+#endif
+
+//
+// Other Pins
+//
+//#define PIN_P0_02 P0_02 // AUX1 (Interrupt Capable/ADC/Serial Port 0)
+//#define PIN_P0_03 P0_03 // AUX1 (Interrupt Capable/ADC/Serial Port 0)
+//#define PS_ON_PIN P1_23 // SERVO P1.23
diff --git a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h
new file mode 100644
index 0000000..6584030
--- /dev/null
+++ b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h
@@ -0,0 +1,518 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+/**
+ * Re-ARM with RAMPS v1.4 pin assignments
+ *
+ * Applies to the following boards:
+ *
+ * RAMPS_14_EFB (Hotend, Fan, Bed)
+ * RAMPS_14_EEB (Hotend0, Hotend1, Bed)
+ * RAMPS_14_EFF (Hotend, Fan0, Fan1)
+ * RAMPS_14_EEF (Hotend0, Hotend1, Fan)
+ * RAMPS_14_SF (Spindle, Controller Fan)
+ */
+
+// Numbers in parentheses () are the corresponding mega2560 pin numbers
+
+#if NOT_TARGET(MCU_LPC1768)
+ #error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
+#endif
+
+#define BOARD_INFO_NAME "Re-ARM RAMPS 1.4"
+
+//
+// Servos
+//
+#define SERVO0_PIN P1_20 // (11)
+#define SERVO1_PIN P1_21 // ( 6) also on J5-1
+#define SERVO2_PIN P1_19 // ( 5)
+#define SERVO3_PIN P1_18 // ( 4) 5V output
+
+//
+// Limit Switches
+//
+#define X_MIN_PIN P1_24 // ( 3) 10k pullup to 3.3V, 1K series
+#define X_MAX_PIN P1_25 // ( 2) 10k pullup to 3.3V, 1K series
+#define Y_MIN_PIN P1_26 // (14) 10k pullup to 3.3V, 1K series
+#define Y_MAX_PIN P1_27 // (15) 10k pullup to 3.3V, 1K series
+#define Z_MIN_PIN P1_29 // (18) 10k pullup to 3.3V, 1K series
+#define Z_MAX_PIN P1_28 // (19) 10k pullup to 3.3V, 1K series
+#define ONBOARD_ENDSTOPPULLUPS // Board has built-in pullups
+
+//
+// Steppers
+//
+#define X_STEP_PIN P2_01 // (54)
+#define X_DIR_PIN P0_11 // (55)
+#define X_ENABLE_PIN P0_10 // (38)
+#ifndef X_CS_PIN
+ #define X_CS_PIN P1_01 // ETH
+#endif
+
+#define Y_STEP_PIN P2_02 // (60)
+#define Y_DIR_PIN P0_20 // (61)
+#define Y_ENABLE_PIN P0_19 // (56)
+#ifndef Y_CS_PIN
+ #define Y_CS_PIN P1_04 // ETH
+#endif
+
+#define Z_STEP_PIN P2_03 // (46)
+#define Z_DIR_PIN P0_22 // (48)
+#define Z_ENABLE_PIN P0_21 // (62)
+#ifndef Z_CS_PIN
+ #define Z_CS_PIN P1_10 // ETH
+#endif
+
+#define E0_STEP_PIN P2_00 // (26)
+#define E0_DIR_PIN P0_05 // (28)
+#define E0_ENABLE_PIN P0_04 // (24)
+#ifndef E0_CS_PIN
+ #define E0_CS_PIN P1_14 // ETH
+#endif
+
+#define E1_STEP_PIN P2_08 // (36)
+#define E1_DIR_PIN P2_13 // (34)
+#define E1_ENABLE_PIN P4_29 // (30)
+#ifndef E1_CS_PIN
+ #define E1_CS_PIN -1
+#endif
+
+//
+// Software SPI pins for TMC2130 stepper drivers
+//
+#if ENABLED(TMC_USE_SW_SPI)
+ #ifndef TMC_SW_MOSI
+ #define TMC_SW_MOSI P1_00 // ETH
+ #endif
+ #ifndef TMC_SW_MISO
+ #define TMC_SW_MISO P1_08 // ETH
+ #endif
+ #ifndef TMC_SW_SCK
+ #define TMC_SW_SCK P1_09 // ETH
+ #endif
+#endif
+
+#if HAS_TMC_UART
+ /**
+ * TMC2208/TMC2209 stepper drivers
+ *
+ * Hardware serial communication ports.
+ * If undefined software serial is used according to the pins below
+ */
+
+ //
+ // Software serial
+ //
+
+ // P2_08 E1-Step
+ // P2_13 E1-Dir
+
+ #ifndef X_SERIAL_TX_PIN
+ #define X_SERIAL_TX_PIN P0_01
+ #endif
+ #ifndef X_SERIAL_RX_PIN
+ #define X_SERIAL_RX_PIN P0_01
+ #endif
+
+ #ifndef Y_SERIAL_TX_PIN
+ #define Y_SERIAL_TX_PIN P0_00
+ #endif
+ #ifndef Y_SERIAL_RX_PIN
+ #define Y_SERIAL_RX_PIN P0_00
+ #endif
+
+ #ifndef Z_SERIAL_TX_PIN
+ #define Z_SERIAL_TX_PIN P2_13
+ #endif
+ #ifndef Z_SERIAL_RX_PIN
+ #define Z_SERIAL_RX_PIN P2_13
+ #endif
+
+ #ifndef E0_SERIAL_TX_PIN
+ #define E0_SERIAL_TX_PIN P2_08
+ #endif
+ #ifndef E0_SERIAL_RX_PIN
+ #define E0_SERIAL_RX_PIN P2_08
+ #endif
+
+ // Reduce baud rate to improve software serial reliability
+ #define TMC_BAUD_RATE 19200
+#endif
+
+//
+// Temperature Sensors
+// 3.3V max when defined as an analog input
+//
+#define TEMP_0_PIN P0_23_A0 // A0 (T0) - (67) - TEMP_0_PIN
+#define TEMP_BED_PIN P0_24_A1 // A1 (T1) - (68) - TEMP_BED_PIN
+#define TEMP_1_PIN P0_25_A2 // A2 (T2) - (69) - TEMP_1_PIN
+#define TEMP_2_PIN P0_26_A3 // A3 - (63) - J5-3 & AUX-2
+#define TEMP_3_PIN P1_30_A4 // A4 - (37) - BUZZER_PIN
+//#define TEMP_4_PIN P1_31_A5 // A5 - (49) - SD_DETECT_PIN
+//#define ?? P0_03_A6 // A6 - ( 0) - RXD0 - J4-4 & AUX-1
+#define FILWIDTH_PIN P0_02_A7 // A7 - ( 1) - TXD0 - J4-5 & AUX-1
+
+//
+// Augmentation for auto-assigning RAMPS plugs
+//
+#if NONE(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D)
+ #if HAS_MULTI_HOTEND
+ #if TEMP_SENSOR_BED
+ #define IS_RAMPS_EEB
+ #else
+ #define IS_RAMPS_EEF
+ #endif
+ #elif TEMP_SENSOR_BED
+ #define IS_RAMPS_EFB
+ #else
+ #define IS_RAMPS_EFF
+ #endif
+#endif
+
+//
+// Heaters / Fans
+//
+#ifndef MOSFET_D_PIN
+ #define MOSFET_D_PIN -1
+#endif
+#ifndef RAMPS_D8_PIN
+ #define RAMPS_D8_PIN P2_07 // (8)
+#endif
+#ifndef RAMPS_D9_PIN
+ #define RAMPS_D9_PIN P2_04 // (9)
+#endif
+#ifndef RAMPS_D10_PIN
+ #define RAMPS_D10_PIN P2_05 // (10)
+#endif
+
+#define HEATER_0_PIN RAMPS_D10_PIN
+
+#if ENABLED(IS_RAMPS_EFB) // Hotend, Fan, Bed
+ #define HEATER_BED_PIN RAMPS_D8_PIN
+#elif ENABLED(IS_RAMPS_EEF) // Hotend, Hotend, Fan
+ #define HEATER_1_PIN RAMPS_D9_PIN
+#elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed
+ #define HEATER_1_PIN RAMPS_D9_PIN
+ #define HEATER_BED_PIN RAMPS_D8_PIN
+#elif ENABLED(IS_RAMPS_EFF) // Hotend, Fan, Fan
+ #define FAN1_PIN RAMPS_D8_PIN
+#elif DISABLED(IS_RAMPS_SF) // Not Spindle, Fan (i.e., "EFBF" or "EFBE")
+ #define HEATER_BED_PIN RAMPS_D8_PIN
+ #if HOTENDS == 1
+ #define FAN1_PIN MOSFET_D_PIN
+ #else
+ #define HEATER_1_PIN MOSFET_D_PIN
+ #endif
+#endif
+
+#ifndef FAN_PIN
+ #if EITHER(IS_RAMPS_EFB, IS_RAMPS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan
+ #define FAN_PIN RAMPS_D9_PIN
+ #elif EITHER(IS_RAMPS_EEF, IS_RAMPS_SF) // Hotend, Hotend, Fan or Spindle, Fan
+ #define FAN_PIN RAMPS_D8_PIN
+ #elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed
+ #define FAN_PIN P1_18 // (4) IO pin. Buffer needed
+ #else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE")
+ #define FAN_PIN RAMPS_D9_PIN
+ #endif
+#endif
+
+//
+// Misc. Functions
+//
+#define LED_PIN P4_28 // (13)
+
+// define digital pin 5 for the filament runout sensor. Use the RAMPS 1.4 digital input 5 on the servos connector
+#ifndef FIL_RUNOUT_PIN
+ #define FIL_RUNOUT_PIN P1_19 // (5)
+#endif
+
+#define PS_ON_PIN P2_12 // (12)
+
+#if !defined(MAX6675_SS_PIN) && DISABLED(USE_ZMAX_PLUG)
+ #define MAX6675_SS_PIN P1_28
+#endif
+
+#if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT) && !defined(SPINDLE_LASER_ENA_PIN)
+ #if !defined(NUM_SERVOS) || NUM_SERVOS < 4 // Try to use servo connector
+ #define CASE_LIGHT_PIN P1_18 // (4) MUST BE HARDWARE PWM
+ #endif
+#endif
+
+//
+// M3/M4/M5 - Spindle/Laser Control
+// Use servo pins, if available
+//
+#if HAS_CUTTER && !PIN_EXISTS(SPINDLE_LASER_ENA)
+ #if NUM_SERVOS > 1
+ #if ENABLED(SPINDLE_FEATURE)
+ #error "SPINDLE_FEATURE requires 3 free servo pins."
+ #else
+ #error "LASER_FEATURE requires 3 free servo pins."
+ #endif
+ #endif
+ #define SPINDLE_LASER_ENA_PIN SERVO1_PIN // (6) Pin should have a pullup/pulldown!
+ #define SPINDLE_LASER_PWM_PIN SERVO3_PIN // (4) MUST BE HARDWARE PWM
+ #define SPINDLE_DIR_PIN SERVO2_PIN // (5)
+#endif
+
+//
+// Průša i3 MK2 Multiplexer Support
+//
+#if SERIAL_PORT != 0 && SERIAL_PORT_2 != 0
+ #define E_MUX0_PIN P0_03 // ( 0) Z_CS_PIN
+ #define E_MUX1_PIN P0_02 // ( 1) E0_CS_PIN
+#endif
+#define E_MUX2_PIN P0_26 // (63) E1_CS_PIN
+
+/**
+ * LCD / Controller
+ *
+ * All controllers can use J3 and J5 on the Re-ARM board. Custom cabling will be required.
+ *
+ * - https://github.com/wolfmanjm/universal-panel-adapter
+ * - https://panucattdevices.freshdesk.com/support/solutions/articles/1000243195-lcd-display-installation
+ */
+
+/**
+ * Smart LCD adapter
+ *
+ * The Smart LCD adapter can be used for the two 10 pin LCD controllers such as
+ * REPRAP_DISCOUNT_SMART_CONTROLLER. It can't be used for controllers that use
+ * DOGLCD_A0, DOGLCD_CS, LCD_PINS_D5, LCD_PINS_D6 or LCD_PINS_D7. A custom cable
+ * is needed to pick up 5V for the EXP1 connection.
+ *
+ * SD card on the LCD uses the same SPI signals as the LCD. This results in garbage/lines
+ * on the LCD display during accesses of the SD card. The menus/code has been arranged so
+ * that the garbage/lines are erased immediately after the SD card accesses are completed.
+ */
+
+#if ENABLED(CR10_STOCKDISPLAY)
+
+ // Re-Arm can support Creality stock display without SD card reader and single cable on EXP3.
+ // Re-Arm J3 pins 1 (p1.31) & 2 (P3.26) are not used. Stock cable will need to have one
+ // 10-pin IDC connector trimmed or replaced with a 12-pin IDC connector to fit J3.
+ // Requires REVERSE_ENCODER_DIRECTION in Configuration.h
+
+ #define BEEPER_PIN P2_11 // J3-3 & AUX-4
+
+ #define BTN_EN1 P0_16 // J3-7 & AUX-4
+ #define BTN_EN2 P1_23 // J3-5 & AUX-4
+ #define BTN_ENC P3_25 // J3-4 & AUX-4
+
+ #define LCD_PINS_RS P0_15 // J3-9 & AUX-4 (CS)
+ #define LCD_PINS_ENABLE P0_18 // J3-10 & AUX-3 (SID, MOSI)
+ #define LCD_PINS_D4 P2_06 // J3-8 & AUX-3 (SCK, CLK)
+
+#elif ENABLED(ZONESTAR_LCD)
+
+ #error "CAUTION! ZONESTAR_LCD on REARM requires wiring modifications. NB. ADCs are not 5V tolerant. Comment out this line to continue."
+
+#elif IS_TFTGLCD_PANEL
+
+ #if ENABLED(TFTGLCD_PANEL_SPI)
+ #define TFTGLCD_CS P3_26 // (31) J3-2 & AUX-4
+ #endif
+
+ #define SD_DETECT_PIN P1_31 // (49) J3-1 & AUX-3 (NOT 5V tolerant)
+ #define KILL_PIN P1_22 // (41) J5-4 & AUX-4
+
+#elif HAS_WIRED_LCD
+
+ #if ENABLED(FYSETC_MINI_12864)
+ #define BEEPER_PIN P1_01
+ #define BTN_ENC P1_04
+ #else
+ #define BEEPER_PIN P1_30 // (37) not 5V tolerant
+ #define BTN_ENC P2_11 // (35) J3-3 & AUX-4
+ #endif
+
+ #define BTN_EN1 P3_26 // (31) J3-2 & AUX-4
+ #define BTN_EN2 P3_25 // (33) J3-4 & AUX-4
+
+ #define SD_DETECT_PIN P1_31 // (49) J3-1 & AUX-3 (NOT 5V tolerant)
+ #define KILL_PIN P1_22 // (41) J5-4 & AUX-4
+ #define LCD_PINS_RS P0_16 // (16) J3-7 & AUX-4
+ #define LCD_SDSS P1_23 // (53) J3-5 & AUX-3
+
+ #if IS_NEWPANEL
+ #if IS_RRW_KEYPAD
+ #define SHIFT_OUT_PIN P0_18 // (51) (MOSI) J3-10 & AUX-3
+ #define SHIFT_CLK_PIN P0_15 // (52) (SCK) J3-9 & AUX-3
+ #define SHIFT_LD_PIN P1_31 // (49) J3-1 & AUX-3 (NOT 5V tolerant)
+ #endif
+ #else
+ //#define SHIFT_CLK_PIN P3_26 // (31) J3-2 & AUX-4
+ //#define SHIFT_LD_PIN P3_25 // (33) J3-4 & AUX-4
+ //#define SHIFT_OUT_PIN P2_11 // (35) J3-3 & AUX-4
+ //#define SHIFT_EN_PIN P1_22 // (41) J5-4 & AUX-4
+ #endif
+
+ #if ANY(VIKI2, miniVIKI)
+ //#define LCD_SCREEN_ROT_180
+
+ #define DOGLCD_CS P0_16 // (16)
+ #define DOGLCD_A0 P2_06 // (59) J3-8 & AUX-2
+ #define DOGLCD_SCK SD_SCK_PIN
+ #define DOGLCD_MOSI SD_MOSI_PIN
+
+ #define STAT_LED_BLUE_PIN P0_26 // (63) may change if cable changes
+ #define STAT_LED_RED_PIN P1_21 // ( 6) may change if cable changes
+
+ #else
+
+ #if ENABLED(FYSETC_MINI_12864)
+ #define DOGLCD_SCK P0_15
+ #define DOGLCD_MOSI P0_18
+
+ // EXP1 on LCD adapter is not usable - using Ethernet connector instead
+ #define DOGLCD_CS P1_09
+ #define DOGLCD_A0 P1_14
+ //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
+ // results in LCD soft SPI mode 3, SD soft SPI mode 0
+
+ #define LCD_RESET_PIN P0_16 // Must be high or open for LCD to operate normally.
+
+ #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
+ #ifndef RGB_LED_R_PIN
+ #define RGB_LED_R_PIN P1_00
+ #endif
+ #ifndef RGB_LED_G_PIN
+ #define RGB_LED_G_PIN P1_01
+ #endif
+ #ifndef RGB_LED_B_PIN
+ #define RGB_LED_B_PIN P1_08
+ #endif
+ #elif ENABLED(FYSETC_MINI_12864_2_1)
+ #define NEOPIXEL_PIN P1_00
+ #endif
+ #else
+ #define DOGLCD_CS P0_26 // (63) J5-3 & AUX-2
+ #define DOGLCD_A0 P2_06 // (59) J3-8 & AUX-2
+ #endif
+
+ #define LCD_BACKLIGHT_PIN P0_16 //(16) J3-7 & AUX-4 - only used on DOGLCD controllers
+ #define LCD_PINS_ENABLE P0_18 // (51) (MOSI) J3-10 & AUX-3
+ #define LCD_PINS_D4 P0_15 // (52) (SCK) J3-9 & AUX-3
+ #if IS_ULTIPANEL
+ #define LCD_PINS_D5 P1_17 // (71) ENET_MDIO
+ #define LCD_PINS_D6 P1_14 // (73) ENET_RX_ER
+ #define LCD_PINS_D7 P1_10 // (75) ENET_RXD1
+
+ #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
+ #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
+ #endif
+
+ #endif
+ #endif
+
+ #if ENABLED(MINIPANEL)
+ // GLCD features
+ // Uncomment screen orientation
+ //#define LCD_SCREEN_ROT_90
+ //#define LCD_SCREEN_ROT_180
+ //#define LCD_SCREEN_ROT_270
+ #endif
+
+#endif // HAS_WIRED_LCD
+
+//
+// Ethernet pins
+//
+#if !IS_ULTIPANEL
+ #define ENET_MDIO P1_17 // (71) J12-4
+ #define ENET_RX_ER P1_14 // (73) J12-6
+ #define ENET_RXD1 P1_10 // (75) J12-8
+#endif
+#define ENET_MOC P1_16 // (70) J12-3
+#define REF_CLK P1_15 // (72) J12-5
+#define ENET_RXD0 P1_09 // (74) J12-7
+#define ENET_CRS P1_08 // (76) J12-9
+#define ENET_TX_EN P1_04 // (77) J12-10
+#define ENET_TXD0 P1_00 // (78) J12-11
+#define ENET_TXD1 P1_01 // (79) J12-12
+
+//
+// SD Support
+//
+#ifndef SDCARD_CONNECTION
+ #define SDCARD_CONNECTION ONBOARD
+#endif
+
+#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
+
+#if SD_CONNECTION_IS(LCD)
+ #define SD_SCK_PIN P0_15 // (52) system defined J3-9 & AUX-3
+ #define SD_MISO_PIN P0_17 // (50) system defined J3-10 & AUX-3
+ #define SD_MOSI_PIN P0_18 // (51) system defined J3-10 & AUX-3
+ #define SD_SS_PIN P1_23 // (53) system defined J3-5 & AUX-3 (Sometimes called SDSS) - CS used by Marlin
+#elif SD_CONNECTION_IS(ONBOARD)
+ #undef SD_DETECT_PIN
+ #define SD_SCK_PIN P0_07
+ #define SD_MISO_PIN P0_08
+ #define SD_MOSI_PIN P0_09
+ #define SD_SS_PIN ONBOARD_SD_CS_PIN
+#elif SD_CONNECTION_IS(CUSTOM_CABLE)
+ #error "No custom SD drive cable defined for this board."
+#endif
+
+/**
+ * Fast PWMs
+ *
+ * The LPC1768's hardware PWM controller has 6 channels. Each channel
+ * can be setup to either control a dedicated pin directly or to generate
+ * an interrupt. The direct method's duty cycle is accurate to within a
+ * a microsecond. The interrupt method's average duty cycle has the
+ * the same accuracy but the individual cycles can vary because of higher
+ * priority interrupts.
+ *
+ * All Fast PWMs have a 50Hz rate.
+ *
+ * The following pins/signals use the direct method. All other pins use the
+ * the interrupt method. Note that SERVO2_PIN and RAMPS_D8_PIN use the
+ * interrupt method.
+ *
+ * P1_20 (11) SERVO0_PIN
+ * P1_21 ( 6) SERVO1_PIN J5-1
+ * P0_18 ( 4) SERVO3_PIN 5V output
+ * *P2_04 ( 9) RAMPS_D9_PIN
+ * *P2_05 (10) RAMPS_D10_PIN
+ *
+ * * - If used as a heater driver then a Fast PWM is NOT assigned. If used as
+ * a fan driver then enabling FAST_PWM_FAN assigns a Fast PWM to it.
+ */
+
+ /**
+ * Special pins
+ * P1_30 (37) (NOT 5V tolerant)
+ * P1_31 (49) (NOT 5V tolerant)
+ * P0_27 (57) (Open collector)
+ * P0_28 (58) (Open collector)
+ */
+
+/**
+ * The following mega2560 pins are NOT available in a Re-ARM system:
+ *
+ * 7, 17, 22, 23, 25, 27, 29, 32, 39, 40, 42, 43, 44, 45, 47, 64, 65, 66
+ */
diff --git a/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h b/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h
new file mode 100644
index 0000000..700e79d
--- /dev/null
+++ b/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h
@@ -0,0 +1,118 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+/**
+ * Selena Compact pin assignments
+ */
+
+#if NOT_TARGET(MCU_LPC1768)
+ #error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
+#endif
+
+#define BOARD_INFO_NAME "Selena Compact"
+#define BOARD_WEBSITE_URL "github.com/Ales2-k/Selena"
+
+//
+// Servos
+//
+#define SERVO0_PIN P1_23
+
+//
+// Limit Switches
+//
+#define X_MIN_PIN P1_28
+#define X_MAX_PIN P1_25
+#define Y_MIN_PIN P2_11
+#define Y_MAX_PIN -1
+#define Z_MIN_PIN P1_27
+#define Z_MAX_PIN -1
+#define Z_PROBE P1_22
+
+//
+// Steppers
+//
+#define X_STEP_PIN P2_00
+#define X_DIR_PIN P0_05
+#define X_ENABLE_PIN P0_04
+
+#define Y_STEP_PIN P2_01
+#define Y_DIR_PIN P0_11
+#define Y_ENABLE_PIN P0_10
+
+#define Z_STEP_PIN P2_02
+#define Z_DIR_PIN P0_20
+#define Z_ENABLE_PIN P0_19
+
+#define E0_STEP_PIN P2_03
+#define E0_DIR_PIN P0_22
+#define E0_ENABLE_PIN P0_21
+
+#define E1_STEP_PIN P2_08
+#define E1_DIR_PIN P2_13
+#define E1_ENABLE_PIN P4_29
+
+//
+// Temperature Sensors
+// 3.3V max when defined as an analog input
+//
+#define TEMP_BED_PIN P0_23_A0 // A0 (TH1)
+#define TEMP_0_PIN P0_24_A1 // A1 (TH2)
+#define TEMP_1_PIN P0_25_A2 // A2 (TH3)
+
+//
+// Heaters / Fans
+//
+
+#define HEATER_BED_PIN P2_05
+#define HEATER_BED2_PIN P2_04
+#define HEATER_0_PIN P2_07
+#define HEATER_1_PIN P2_06
+#ifndef FAN_PIN
+ #define FAN_PIN P1_24
+#endif
+#define FAN1_PIN P1_26
+
+//
+// Display
+//
+
+#if IS_RRD_FG_SC
+ #define LCD_PINS_RS P0_16
+ #define LCD_PINS_ENABLE P0_18
+ #define LCD_PINS_D4 P0_15
+ #define LCD_PINS_D5 P1_00
+ #define LCD_PINS_D6 P1_01
+ #define LCD_PINS_D7 P1_04
+ #define BEEPER_PIN P1_31
+
+ #define BTN_EN1 P3_25
+ #define BTN_EN2 P3_26
+ #define BTN_ENC P1_30
+
+ #define SD_DETECT_PIN -1
+
+ #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
+ #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
+ #endif
+
+#endif // IS_RRD_FG_SC
--
cgit v1.2.3