diff options
author | Georgiy Bondarenko <69736697+nehilo@users.noreply.github.com> | 2021-03-04 20:54:23 +0300 |
---|---|---|
committer | Georgiy Bondarenko <69736697+nehilo@users.noreply.github.com> | 2021-03-04 20:54:23 +0300 |
commit | e8701195e66f2d27ffe17fb514eae8173795aaf7 (patch) | |
tree | 9f519c4abf6556b9ae7190a6210d87ead1dfadde /Marlin/src/pins/lpc1769 | |
download | kp3s-lgvl-e8701195e66f2d27ffe17fb514eae8173795aaf7.tar.xz kp3s-lgvl-e8701195e66f2d27ffe17fb514eae8173795aaf7.zip |
Initial commit
Diffstat (limited to 'Marlin/src/pins/lpc1769')
-rw-r--r-- | Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h | 126 | ||||
-rw-r--r-- | Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h | 219 | ||||
-rw-r--r-- | Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h | 44 | ||||
-rw-r--r-- | Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h | 266 | ||||
-rw-r--r-- | Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h | 30 | ||||
-rw-r--r-- | Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h | 177 | ||||
-rw-r--r-- | Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h | 289 | ||||
-rw-r--r-- | Marlin/src/pins/lpc1769/pins_FLY_CDY.h | 181 | ||||
-rw-r--r-- | Marlin/src/pins/lpc1769/pins_MKS_SGEN.h | 59 | ||||
-rw-r--r-- | Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h | 414 | ||||
-rw-r--r-- | Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h | 181 | ||||
-rw-r--r-- | Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h | 182 |
12 files changed, 2168 insertions, 0 deletions
diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h new file mode 100644 index 0000000..adf9085 --- /dev/null +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h @@ -0,0 +1,126 @@ +/** + * 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 <https://www.gnu.org/licenses/>. + * + */ +#pragma once + +/** + * Azteeg X5 GT pin assignments + */ + +#if NOT_TARGET(MCU_LPC1769) + #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." +#endif + +#define BOARD_INFO_NAME "Azteeg X5 GT" +#define BOARD_WEBSITE_URL "tinyurl.com/yx8tdqa3" + +// +// Servos +// +#define SERVO0_PIN P1_23 + +// +// Limit Switches +// +#define X_MIN_PIN P1_24 +#define X_MAX_PIN P1_27 +#define Y_MIN_PIN P1_25 +#define Y_MAX_PIN P1_28 +#define Z_MIN_PIN P1_26 +#define Z_MAX_PIN P1_29 + +// +// Steppers +// +#define X_STEP_PIN P2_01 +#define X_DIR_PIN P0_11 +#define X_ENABLE_PIN P0_10 +#ifndef X_CS_PIN + #define X_CS_PIN P0_10 // BSD2660 default +#endif + +#define Y_STEP_PIN P2_02 +#define Y_DIR_PIN P0_20 +#define Y_ENABLE_PIN P0_19 +#ifndef Y_CS_PIN + #define Y_CS_PIN P0_19 // BSD2660 default +#endif + +#define Z_STEP_PIN P2_03 +#define Z_DIR_PIN P0_22 +#define Z_ENABLE_PIN P0_21 +#ifndef Z_CS_PIN + #define Z_CS_PIN P0_21 // BSD2660 default +#endif + +#define E0_STEP_PIN P2_00 +#define E0_DIR_PIN P0_05 +#define E0_ENABLE_PIN P0_04 +#ifndef E0_CS_PIN + #define E0_CS_PIN P0_04 // BSD2660 default +#endif + +#define E1_STEP_PIN P2_08 +#define E1_DIR_PIN P2_13 +#define E1_ENABLE_PIN P4_29 +#ifndef E1_CS_PIN + #define E1_CS_PIN P4_29 // BSD2660 default +#endif + +// +// 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_07 +#define HEATER_0_PIN P2_04 +#define HEATER_1_PIN P2_05 +#ifndef FAN_PIN + #define FAN_PIN P0_26 +#endif +#define FAN1_PIN P1_22 + +// +// Display +// + +#if ANY(VIKI2, miniVIKI) + #define BEEPER_PIN P1_31 + #define DOGLCD_A0 P2_06 + #define DOGLCD_CS P0_16 + + #define BTN_EN1 P3_25 + #define BTN_EN2 P3_26 + #define BTN_ENC P2_11 + + #define SD_DETECT_PIN P1_18 + #define SDSS P1_21 + + #define STAT_LED_RED_PIN P1_19 + #define STAT_LED_BLUE_PIN P1_20 +#endif diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h new file mode 100644 index 0000000..fdd6487 --- /dev/null +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h @@ -0,0 +1,219 @@ +/** + * 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 <https://www.gnu.org/licenses/>. + * + */ +#pragma once + +/** + * Azteeg X5 MINI pin assignments + */ + +#if NOT_TARGET(MCU_LPC1769) + #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." +#endif + +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "Azteeg X5 MINI" +#endif +#define BOARD_WEBSITE_URL "tiny.cc/x5_mini" + +// +// LED +// +#define LED_PIN P1_18 +#define LED2_PIN P1_20 +#define LED3_PIN P1_19 +#define LED4_PIN P1_21 + +// +// Servos +// +#define SERVO0_PIN P1_29 + +// +// Limit Switches +// +#define X_STOP_PIN P1_24 +#define Y_STOP_PIN P1_26 +#define Z_STOP_PIN P1_28 + +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN P2_04 +#endif + +#ifndef FILWIDTH_PIN + #define FILWIDTH_PIN P0_25_A2 // Analog Input (P0_25) +#endif + +// +// Steppers +// +#define X_STEP_PIN P2_01 +#define X_DIR_PIN P0_11 +#define X_ENABLE_PIN P0_10 + +#define Y_STEP_PIN P2_02 +#define Y_DIR_PIN P0_20 +#define Y_ENABLE_PIN P0_19 + +#define Z_STEP_PIN P2_03 +#define Z_DIR_PIN P0_22 +#define Z_ENABLE_PIN P0_21 + +#define E0_STEP_PIN P2_00 +#define E0_DIR_PIN P0_05 +#define E0_ENABLE_PIN P0_04 + +// +// DIGIPOT slave addresses (7-bit unshifted) +// +#ifndef DIGIPOT_I2C_ADDRESS_A + #define DIGIPOT_I2C_ADDRESS_A 0x2C +#endif +#ifndef DIGIPOT_I2C_ADDRESS_B + #define DIGIPOT_I2C_ADDRESS_B 0x2E +#endif + +// +// 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) + +// +// Heaters / Fans +// +#define HEATER_BED_PIN P2_07 +#define HEATER_0_PIN P2_05 +#ifndef FAN_PIN + #define FAN_PIN P0_26 +#endif +#define FAN1_PIN P1_25 + +// +// Display +// +#if HAS_WIRED_LCD + + #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) + + #else + + #define BTN_EN1 P3_26 // (31) J3-2 & AUX-4 + #define BTN_EN2 P3_25 // (33) J3-4 & AUX-4 + #define BTN_ENC P2_11 // (35) J3-3 & AUX-4 + + #define SD_DETECT_PIN P1_31 // (49) not 5V tolerant J3-1 & AUX-3 + #define KILL_PIN P1_22 // (41) J5-4 & AUX-4 + #define LCD_PINS_RS P0_16 // (16) J3-7 & AUX-4 + #define LCD_SDSS P0_16 // (16) J3-7 & AUX-4 + #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 + + #define DOGLCD_A0 P2_06 // (59) J3-8 & AUX-2 + + #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) not 5V tolerant J3-1 & AUX-3 + #elif !IS_NEWPANEL + //#define SHIFT_OUT_PIN P2_11 // (35) J3-3 & AUX-4 + //#define SHIFT_CLK_PIN P3_26 // (31) J3-2 & AUX-4 + //#define SHIFT_LD_PIN P3_25 // (33) J3-4 & AUX-4 + //#define SHIFT_EN_PIN P1_22 // (41) J5-4 & AUX-4 + #endif + + #if ANY(VIKI2, miniVIKI) + //#define LCD_SCREEN_ROT_180 + + #define BEEPER_PIN P1_30 // (37) may change if cable changes + #define DOGLCD_CS P0_26 // (63) J5-3 & 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 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 + #endif + #define BEEPER_PIN P1_30 // (37) not 5V tolerant + #define DOGLCD_CS P0_16 // (16) + + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder + #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 + +#endif // HAS_WIRED_LCD + +// +// 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 + #define SD_MISO_PIN P0_17 + #define SD_MOSI_PIN P0_18 + #define SD_SS_PIN P1_23 +#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 diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h new file mode 100644 index 0000000..99ff0fd --- /dev/null +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h @@ -0,0 +1,44 @@ +/** + * 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 <https://www.gnu.org/licenses/>. + * + */ +#pragma once + +/** + * Azteeg X5 MINI pin assignments + */ + +#if NOT_TARGET(MCU_LPC1769) + #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." +#endif + +#define BOARD_INFO_NAME "Azteeg X5 MINI WIFI" + +// +// DIGIPOT slave addresses +// +#ifndef DIGIPOT_I2C_ADDRESS_A + #define DIGIPOT_I2C_ADDRESS_A 0x58 // shifted slave address for first DIGIPOT (0x58 <- 0x2C << 1) +#endif +#ifndef DIGIPOT_I2C_ADDRESS_B + #define DIGIPOT_I2C_ADDRESS_B 0x5C // shifted slave address for second DIGIPOT (0x5C <- 0x2E << 1) +#endif + +#include "pins_AZTEEG_X5_MINI.h" diff --git a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h new file mode 100644 index 0000000..6e498ba --- /dev/null +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h @@ -0,0 +1,266 @@ +/** + * 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 <https://www.gnu.org/licenses/>. + * + */ +#pragma once + +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "BTT SKR E3 Turbo" +#endif + +// Onboard I2C EEPROM +#define I2C_EEPROM +#define MARLIN_EEPROM_SIZE 0x1000 // 4KB (AT24C32) + +// +// Servos +// +#define SERVO0_PIN P1_23 + +// +// 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 +#define X_STOP_PIN X_DIAG_PIN +#define Y_STOP_PIN Y_DIAG_PIN +#define Z_STOP_PIN Z_DIAG_PIN + +// +// Z Probe +// +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN P1_22 +#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_21 +#endif + +// LED driving pin +#ifndef NEOPIXEL_PIN + #define NEOPIXEL_PIN P1_24 +#endif + +// +// Power Loss Detection +// +#ifndef POWER_LOSS_PIN + #define POWER_LOSS_PIN P1_20 // PWRDET +#endif + +// +// Steppers +// +#define X_STEP_PIN P1_04 +#define X_DIR_PIN P1_08 +#define X_ENABLE_PIN P1_00 +#ifndef X_CS_PIN + #define X_CS_PIN P1_01 +#endif + +#define Y_STEP_PIN P1_14 +#define Y_DIR_PIN P1_15 +#define Y_ENABLE_PIN P1_09 +#ifndef Y_CS_PIN + #define Y_CS_PIN P1_10 +#endif + +#define Z_STEP_PIN P4_29 +#define Z_DIR_PIN P4_28 +#define Z_ENABLE_PIN P1_16 +#ifndef Z_CS_PIN + #define Z_CS_PIN P1_17 +#endif + +#define E0_STEP_PIN P2_06 +#define E0_DIR_PIN P2_07 +#define E0_ENABLE_PIN P0_04 +#ifndef E0_CS_PIN + #define E0_CS_PIN P0_05 +#endif + +#define E1_STEP_PIN P2_11 +#define E1_DIR_PIN P2_12 +#define E1_ENABLE_PIN P0_21 +#ifndef E1_CS_PIN + #define E1_CS_PIN P0_22 +#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 + // + #define X_SERIAL_TX_PIN P1_01 + #define X_SERIAL_RX_PIN P1_01 + + #define Y_SERIAL_TX_PIN P1_10 + #define Y_SERIAL_RX_PIN P1_10 + + #define Z_SERIAL_TX_PIN P1_17 + #define Z_SERIAL_RX_PIN P1_17 + + #define E0_SERIAL_TX_PIN P0_05 + #define E0_SERIAL_RX_PIN P0_05 + + #define E1_SERIAL_TX_PIN P0_22 + #define E1_SERIAL_RX_PIN P0_22 + + // Reduce baud rate to improve software serial reliability + #define TMC_BAUD_RATE 19200 +#endif + +// +// TMC Low Power Standby pins +// +#define X_STDBY_PIN P3_26 +#define Y_STDBY_PIN P3_25 +#define Z_STDBY_PIN P1_18 +#define E0_STDBY_PIN P1_19 +#define E1_STDBY_PIN P2_13 + +// +// Temperature Sensors +// +#define TEMP_0_PIN P0_24 +#define TEMP_1_PIN P0_23 +//#define TEMP_2_PIN P1_30 // Onboard thermistor +#define TEMP_BED_PIN P0_25 + +// +// Heaters / Fans +// +#define HEATER_0_PIN P2_03 // EXTRUDER 0 +#define HEATER_1_PIN P2_04 // EXTRUDER 1 +#define HEATER_BED_PIN P2_05 // BED +#define FAN_PIN P2_01 +#define FAN1_PIN P2_02 + +#ifndef CONTROLLER_FAN_PIN + #define CONTROLLER_FAN_PIN FAN1_PIN +#endif + +/** + * _____ + * 5V | 1 2 | GND + * (LCD_EN) P0_18 | 3 4 | P0_17 (LCD_RS) + * (LCD_D4) P0_15 | 5 6 P0_20 (BTN_EN2) + * RESET | 7 8 | P0_19 (BTN_EN1) + * (BTN_ENC) P0_16 | 9 10| P2_08 (BEEPER) + * ----- + * EXP + */ + +#define EXPA1_03_PIN P0_18 +#define EXPA1_04_PIN P0_17 +#define EXPA1_05_PIN P0_15 +#define EXPA1_06_PIN P0_20 +#define EXPA1_07_PIN -1 +#define EXPA1_08_PIN P0_19 +#define EXPA1_09_PIN P0_16 +#define EXPA1_10_PIN P2_08 + +#if HAS_WIRED_LCD + + #if ENABLED(CR10_STOCKDISPLAY) + + #define BEEPER_PIN EXPA1_10_PIN + + #define BTN_EN1 EXPA1_08_PIN + #define BTN_EN2 EXPA1_06_PIN + #define BTN_ENC EXPA1_09_PIN + + #define LCD_PINS_RS EXPA1_04_PIN + #define LCD_PINS_ENABLE EXPA1_03_PIN + #define LCD_PINS_D4 EXPA1_05_PIN + + #elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD! + + #error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_SKR_E3_TURBO.h' for details. Comment out this line to continue." + + #define LCD_PINS_RS EXPA1_05_PIN + #define LCD_PINS_ENABLE EXPA1_09_PIN + #define LCD_PINS_D4 EXPA1_04_PIN + #define LCD_PINS_D5 EXPA1_06_PIN + #define LCD_PINS_D6 EXPA1_08_PIN + #define LCD_PINS_D7 EXPA1_10_PIN + #define ADC_KEYPAD_PIN P1_23 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD! + + #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY) + + #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 + + #else + + #error "Only ZONESTAR_LCD, MKS_MINI_12864, ENDER2_STOCKDISPLAY, and CR10_STOCKDISPLAY are currently supported on the BTT_SKR_E3_TURBO." + + #endif + +#endif // HAS_WIRED_LCD + +// +// SD Support +// +#ifndef SDCARD_CONNECTION + #define SDCARD_CONNECTION ONBOARD +#endif + +#if SD_CONNECTION_IS(ONBOARD) + #define SD_DETECT_PIN P2_00 + #define SD_SCK_PIN P0_07 + #define SD_MISO_PIN P0_08 + #define SD_MOSI_PIN P0_09 + #define SD_SS_PIN P0_06 +#elif SD_CONNECTION_IS(CUSTOM_CABLE) + #error "SD CUSTOM_CABLE is not compatible with SKR E3 Turbo." +#endif + +#define ON_BOARD_SPI_DEVICE 1 // SPI1 diff --git a/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h b/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h new file mode 100644 index 0000000..a751286 --- /dev/null +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h @@ -0,0 +1,30 @@ +/** + * 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 <https://www.gnu.org/licenses/>. + * + */ +#pragma once + +#define BOARD_INFO_NAME "BTT SKR V1.4 TURBO" +#define SKR_HAS_LPC1769 + +// +// Include SKR 1.4 pins +// +#include "../lpc1768/pins_BTT_SKR_V1_4.h" diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h new file mode 100644 index 0000000..d66ffbe --- /dev/null +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h @@ -0,0 +1,177 @@ +/** + * 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 <https://www.gnu.org/licenses/>. + * + */ +#pragma once + +/** + * Cohesion3D Mini pin assignments + */ + +#if NOT_TARGET(MCU_LPC1769) + #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." +#endif + +#define BOARD_INFO_NAME "Cohesion3D Mini" + +// +// Servos +// +#define SERVO0_PIN P1_23 + +// +// Limit Switches +// +#define X_MIN_PIN P1_24 // 10k pullup to 3.3V +#define X_MAX_PIN P1_25 // 10k pullup to 3.3V +#define Y_MIN_PIN P1_26 // 10k pullup to 3.3V +#define Y_MAX_PIN P1_27 // 10k pullup to 3.3V +#define Z_MIN_PIN P1_28 // 10k pullup to 3.3V +#define Z_MAX_PIN P1_29 // 10k pullup to 3.3V + +// +// Steppers +// +#define X_STEP_PIN P2_00 +#define X_DIR_PIN P0_05 +#define X_ENABLE_PIN P0_04 +#define X_CS_PIN P1_10 // Ethernet Expansion - Pin 9 + +#define Y_STEP_PIN P2_01 +#define Y_DIR_PIN P0_11 +#define Y_ENABLE_PIN P0_10 +#define Y_CS_PIN P1_09 // Ethernet Expansion - Pin 10 + +#define Z_STEP_PIN P2_02 +#define Z_DIR_PIN P0_20 +#define Z_ENABLE_PIN P0_19 +#define Z_CS_PIN P1_00 // Ethernet Expansion - Pin 11 + +#define E0_STEP_PIN P2_03 +#define E0_DIR_PIN P0_22 +#define E0_ENABLE_PIN P0_21 +#define E0_CS_PIN P1_04 // Ethernet Expansion - Pin 12 + +// +// Default pins for TMC software SPI +// +#if ENABLED(TMC_USE_SW_SPI) + #ifndef TMC_SW_MOSI + #define TMC_SW_MOSI P1_16 // Ethernet Expansion - Pin 5 + #endif + #ifndef TMC_SW_MISO + #define TMC_SW_MISO P1_17 // Ethernet Expansion - Pin 6 + #endif + #ifndef TMC_SW_SCK + #define TMC_SW_SCK P1_08 // Ethernet Expansion - Pin 7 + #endif +#endif + +// +// Analog Inputs +// 3.3V max when defined as an analog input +// +#define TEMP_0_PIN P0_23_A0 // P0_23 +#define TEMP_BED_PIN P0_24_A1 // P0_24 + +// +// Heaters / Fans +// +#define HEATER_BED_PIN P2_05 +#define HEATER_0_PIN P2_07 // FET 1 +#ifndef FAN_PIN + #define FAN_PIN P2_06 // FET 3 +#endif + +// +// Auto fans +// +#define AUTO_FAN_PIN P2_04 // FET 4 +#ifndef E0_AUTO_FAN_PIN + #define E0_AUTO_FAN_PIN AUTO_FAN_PIN +#endif +#ifndef E1_AUTO_FAN_PIN + #define E1_AUTO_FAN_PIN AUTO_FAN_PIN +#endif +#ifndef E2_AUTO_FAN_PIN + #define E2_AUTO_FAN_PIN AUTO_FAN_PIN +#endif + +// +// Misc. Functions +// +#define LED_PIN P4_28 // Play LED + +// +// M3/M4/M5 - Spindle/Laser Control +// +#if HAS_CUTTER + #undef HEATER_0_PIN + #define SPINDLE_LASER_ENA_PIN P2_07 // FET 1 + #undef HEATER_BED_PIN + #define SPINDLE_LASER_PWM_PIN P2_05 // Bed FET + #undef FAN_PIN + #define SPINDLE_DIR_PIN P2_06 // FET 3 +#endif + +// +// LCD / Controller +// +// LCD_PINS_D5, D6, and D7 are not present in the EXP1 connector, and will need to be +// defined to use the REPRAP_DISCOUNT_SMART_CONTROLLER. +// +// A remote SD card is currently not supported because the pins routed to the EXP2 +// connector are shared with the onboard SD card, and Marlin does not support reading +// G-code files from the onboard SD card. +// +#if HAS_WIRED_LCD + + #define BEEPER_PIN P0_27 // EXP2-7 - open drain + + #define BTN_EN1 P3_26 // EXP2-5 + #define BTN_EN2 P3_25 // EXP2-3 + #define BTN_ENC P1_30 // EXP1-2 + + #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 + + #define KILL_PIN P2_11 // EXP2-10 + + #if ENABLED(SDSUPPORT) + #error "SDSUPPORT is not currently supported by the Cohesion3D boards" + #endif + +#endif // HAS_WIRED_LCD + +// +// 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 diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h new file mode 100644 index 0000000..edf13ce --- /dev/null +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h @@ -0,0 +1,289 @@ +/** + * 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 <https://www.gnu.org/licenses/>. + * + */ +#pragma once + +/** + * Cohesion3D ReMix pin assignments + */ + +#if NOT_TARGET(MCU_LPC1769) + #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." +#endif + +#define BOARD_INFO_NAME "Cohesion3D ReMix" + +// +// Servos +// +#define SERVO0_PIN P2_04 + +// +// Limit Switches +// +#define X_MIN_PIN P1_24 // 10k pullup to 3.3V +#define X_MAX_PIN P1_25 // 10k pullup to 3.3V +#define Y_MIN_PIN P1_26 // 10k pullup to 3.3V +#define Y_MAX_PIN P1_27 // 10k pullup to 3.3V +#define Z_MIN_PIN P1_28 // 10k pullup to 3.3V +#define Z_MAX_PIN P1_29 // 10k pullup to 3.3V + +// +// Z Probe (when not Z_MIN_PIN) +// +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN P1_29 +#endif + +// +// Steppers +// +#define X_STEP_PIN P2_00 +#define X_DIR_PIN P0_05 +#define X_ENABLE_PIN P0_04 +#define X_CS_PIN P1_10 // Ethernet Expansion - Pin 9 + +#define Y_STEP_PIN P2_01 +#define Y_DIR_PIN P0_11 +#define Y_ENABLE_PIN P0_10 +#define Y_CS_PIN P1_09 // Ethernet Expansion - Pin 10 + +#define Z_STEP_PIN P2_02 +#define Z_DIR_PIN P0_20 +#define Z_ENABLE_PIN P0_19 +#define Z_CS_PIN P1_00 // Ethernet Expansion - Pin 11 + +#define E0_STEP_PIN P2_03 +#define E0_DIR_PIN P0_22 +#define E0_ENABLE_PIN P0_21 +#define E0_CS_PIN P1_04 // Ethernet Expansion - Pin 12 + +#define E1_STEP_PIN P2_08 +#define E1_DIR_PIN P2_13 +#define E1_ENABLE_PIN P4_29 +#define E1_CS_PIN P1_01 // Ethernet Expansion - Pin 14 + +#define E2_STEP_PIN P1_20 +#define E2_DIR_PIN P1_19 +#define E2_ENABLE_PIN P1_21 +#define E2_CS_PIN P1_18 // FET 6 + +// +// Default pins for TMC software SPI +// +#if ENABLED(TMC_USE_SW_SPI) + #ifndef TMC_SW_MOSI + #define TMC_SW_MOSI P1_16 // Ethernet Expansion - Pin 5 + #endif + #ifndef TMC_SW_MISO + #define TMC_SW_MISO P1_17 // Ethernet Expansion - Pin 6 + #endif + #ifndef TMC_SW_SCK + #define TMC_SW_SCK P1_08 // Ethernet Expansion - Pin 7 + #endif +#endif + +// +// Analog Inputs +// 3.3V max when defined as an analog input +// +#define TEMP_0_PIN P0_23_A0 +#define TEMP_BED_PIN P0_24_A1 +#define TEMP_1_PIN P0_25_A2 +#if ENABLED(FILAMENT_WIDTH_SENSOR) + #define FILWIDTH_PIN P0_26_A3 +#else + #define TEMP_2_PIN P0_26_A3 +#endif + +// +// Heaters / Fans +// +#define HEATER_BED_PIN P2_05 +#define HEATER_0_PIN P2_07 // FET 1 +#define HEATER_1_PIN P1_23 // FET 2 +#define HEATER_2_PIN P1_22 // FET 3 +#ifndef FAN_PIN + #define FAN_PIN P2_06 // FET 4 +#endif + +// +// Auto fans +// +#if HOTENDS == 3 + #define AUTO_FAN_PIN P1_18 // FET 6 +#else + #define AUTO_FAN_PIN P1_22 // FET 3 +#endif +#ifndef E0_AUTO_FAN_PIN + #define E0_AUTO_FAN_PIN AUTO_FAN_PIN +#endif +#ifndef E1_AUTO_FAN_PIN + #define E1_AUTO_FAN_PIN AUTO_FAN_PIN +#endif +#ifndef E2_AUTO_FAN_PIN + #define E2_AUTO_FAN_PIN AUTO_FAN_PIN +#endif + +// +// Misc. Functions +// +#define LED_PIN P4_28 // Play LED + +// +// M3/M4/M5 - Spindle/Laser Control +// +#if HAS_CUTTER + #undef HEATER_0_PIN + #undef HEATER_BED_PIN + #undef FAN_PIN + #define SPINDLE_LASER_ENA_PIN P2_07 // FET 1 + #define SPINDLE_LASER_PWM_PIN P2_05 // Bed FET + #define SPINDLE_DIR_PIN P2_06 // FET 4 +#endif + +// +// LCD / Controller +// +// LCD_PINS_D5, D6, and D7 are not present in the EXP1 connector, and will need to be +// defined to use the REPRAP_DISCOUNT_SMART_CONTROLLER. +// +// A remote SD card is currently not supported because the pins routed to the EXP2 +// connector are shared with the onboard SD card, and Marlin does not support that +// hardware configuration. +// + +#if ENABLED(FYSETC_MINI_12864) + + #define FORCE_SOFT_SPI // REQUIRED - results in LCD soft SPI mode 3 + + #define BEEPER_PIN P1_31 // EXP1-1 + #define BTN_ENC P1_30 // EXP1-2 + #define DOGLCD_CS P0_18 // EXP1-3 + #define DOGLCD_A0 P0_16 // EXP1-4 + #define LCD_RESET_PIN P0_15 // EXP1-5 + + // A custom cable is REQUIRED for EXP2 cable because the SCK & MOSI on the card's EXP2 are dedicated + // to the onboard SD card. All required EXP2 signals come from the Ethernet connector. Pin 1 of this + // connector is the one nearest the motor power connector. + #define DOGLCD_SCK P1_17 // EXP2-2 => Ethernet pin 5 (bottom, 3 from left) + #define BTN_EN2 P1_09 // EXP2-3 => Ethernet pin 9 (bottom, 5 from left) + #define BTN_EN1 P1_04 // EXP2-5 => Ethernet pin 11 (bottom, 6 from left) + #define DOGLCD_MOSI P1_01 // EXP2-6 => Ethernet pin 13 (bottom, 7 from left) + + // A custom EXP1 cable is required colored LEDs. Pins 1-5, 9, 10 of the cable go to pins 1-5, 9, 10 + // on the board's EXP1 connector. Pins 6, 7, and 8 of the EXP1 cable go to the Ethernet connector. + // Rev 1.2 displays do NOT require the RGB LEDs. 2.0 and 2.1 displays do require RGB. + #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #ifndef RGB_LED_R_PIN + #define RGB_LED_R_PIN P1_16 // EXP1-6 => Ethernet pin 6 (top row, 3 from left) + #endif + #ifndef RGB_LED_G_PIN + #define RGB_LED_G_PIN P1_10 // EXP1-7 => Ethernet pin 10 (top row, 5 from left) + #endif + #ifndef RGB_LED_B_PIN + #define RGB_LED_B_PIN P1_00 // EXP1-8 => Ethernet pin 12 (top row, 6 from left) + #endif + #elif ENABLED(FYSETC_MINI_12864_2_1) + #define NEOPIXEL_PIN P1_16 // EXP1-6 => Ethernet pin 6 (top row, 3 from left) + #endif + +#elif HAS_WIRED_LCD + + #define BEEPER_PIN P1_31 // EXP1-1 + //#define SD_DETECT_PIN P0_27 // EXP2-7 + + #define BTN_EN1 P3_26 // EXP2-5 + #define BTN_EN2 P3_25 // EXP2-3 + #define BTN_ENC P1_30 // EXP1-2 + + #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 + + #define KILL_PIN P2_11 // EXP2-10 + +#endif // HAS_WIRED_LCD + +// +// 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) || SD_CONNECTION_IS(ONBOARD) + #define SD_SCK_PIN P0_07 // (52) system defined J3-9 & AUX-3 + #define SD_MISO_PIN P0_08 // (50) system defined J3-10 & AUX-3 + #define SD_MOSI_PIN P0_09 // (51) system defined J3-10 & AUX-3 + #if SD_CONNECTION_IS(LCD) + #define SD_SS_PIN P1_23 // (53) system defined J3-5 & AUX-3 (Sometimes called SDSS) - CS used by Marlin + #else + #undef SD_DETECT_PIN + #define SD_SS_PIN ONBOARD_SD_CS_PIN + #endif +#elif SD_CONNECTION_IS(CUSTOM_CABLE) + #error "No custom SD drive cable defined for this board." +#endif + +// +// Ethernet pins +// +//#define ENET_MDIO P1_17 // Ethernet pin 5 (bottom, 3 from left) +//#define ENET_RX_ER P1_14 +//#define ENET_RXD1 P1_10 // Ethernet pin 10 (top row, 5 from left) +//#define ENET_MOC P1_16 // Ethernet pin 6 (top row, 3 from left) +//#define REF_CLK P1_15 +//#define ENET_RXD0 P1_09 // Ethernet pin 9 (bottom, 5 from left) +//#define ENET_CRS P1_08 // Ethernet pin 8 (top row, 4 from left) - INPUT ONLY +//#define ENET_TX_EN P1_04 // Ethernet pin 11 (bottom, 6 from left) +//#define ENET_TXD0 P1_00 // Ethernet pin 12 (top row, 6 from left) +//#define ENET_TXD1 P1_01 // Ethernet pin 13 (bottom, 7 from left) + +/** + * EXP1 pins + * 1 - P1_31 + * 2 - P1_30 + * 3 - P0_18 + * 4 - P0_16 + * 5 - P0_15 + * 6 - N/C + * 7 - N/C + * 8 - P0_27 (also on EXP2-7) + * 9 - GND + * 10 - +5V + * + * + * EXP2 pins + * 1 - P0_08 + * 2 - P0_07 + * 3 - P3_26 + * 4 - P0_28 + * 5 - P3_25 + * 6 - P0_09 + * 7 - P0_27 (also on EXP1_8) + * 8 - P2_11 + * 9 - GND + * 10 - N/C + */ diff --git a/Marlin/src/pins/lpc1769/pins_FLY_CDY.h b/Marlin/src/pins/lpc1769/pins_FLY_CDY.h new file mode 100644 index 0000000..3982d76 --- /dev/null +++ b/Marlin/src/pins/lpc1769/pins_FLY_CDY.h @@ -0,0 +1,181 @@ +/** + * 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 <https://www.gnu.org/licenses/>. + * + */ +#pragma once + +#if NOT_TARGET(MCU_LPC1769) + #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." +#endif + +#define BOARD_INFO_NAME "FLY-CDY" +#define BOARD_WEBSITE_URL "github.com/FLYmaker/FLY-CDY" + +// +// Servos +// +#define SERVO0_PIN P1_26 + +// +// Limit Switches +// + +#define X_MIN_PIN P1_29 // X- +#define X_MAX_PIN P1_28 // X+ +#define Y_MIN_PIN P1_27 // Y- +#define Y_MAX_PIN P1_25 // Y+ +#define Z_MIN_PIN P1_22 // Z- +#define Z_MAX_PIN P0_27 // Z+ + +// +// Steppers +// +#define X_STEP_PIN P2_00 +#define X_DIR_PIN P1_01 +#define X_ENABLE_PIN P1_00 +#ifndef X_CS_PIN + #define X_CS_PIN P1_04 +#endif + +#define Y_STEP_PIN P2_01 +#define Y_DIR_PIN P1_09 +#define Y_ENABLE_PIN P1_08 +#ifndef Y_CS_PIN + #define Y_CS_PIN P1_10 +#endif + +#define Z_STEP_PIN P2_02 +#define Z_DIR_PIN P1_15 +#define Z_ENABLE_PIN P1_14 +#ifndef Z_CS_PIN + #define Z_CS_PIN P1_16 +#endif + +#define E0_STEP_PIN P2_03 +#define E0_DIR_PIN P4_29 +#define E0_ENABLE_PIN P1_17 +#ifndef E0_CS_PIN + #define E0_CS_PIN P4_28 +#endif + +#define E1_STEP_PIN P2_04 +#define E1_DIR_PIN P2_11 +#define E1_ENABLE_PIN P0_04 +#ifndef E1_CS_PIN + #define E1_CS_PIN P2_12 +#endif + +#define E2_STEP_PIN P2_05 +#define E2_DIR_PIN P0_11 +#define E2_ENABLE_PIN P2_13 +#ifndef E2_CS_PIN + #define E2_CS_PIN P0_10 +#endif + +// +// Software SPI pins for TMC2130 stepper drivers +// +#if ENABLED(TMC_USE_SW_SPI) + #ifndef TMC_SW_MOSI + #define TMC_SW_MOSI P0_20 + #endif + #ifndef TMC_SW_MISO + #define TMC_SW_MISO P0_19 + #endif + #ifndef TMC_SW_SCK + #define TMC_SW_SCK P0_21 + #endif +#endif + +#if HAS_TMC_UART + #define X_SERIAL_TX_PIN P1_04 + #define X_SERIAL_RX_PIN P1_04 + + #define Y_SERIAL_TX_PIN P1_10 + #define Y_SERIAL_RX_PIN P1_10 + + #define Z_SERIAL_TX_PIN P1_16 + #define Z_SERIAL_RX_PIN P1_16 + + #define E0_SERIAL_TX_PIN P4_28 + #define E0_SERIAL_RX_PIN P4_28 + + #define E1_SERIAL_TX_PIN P2_12 + #define E1_SERIAL_RX_PIN P2_12 + + #define E2_SERIAL_TX_PIN P0_10 + #define E2_SERIAL_RX_PIN P0_10 + + // Reduce baud rate to improve software serial reliability + #define TMC_BAUD_RATE 19200 +#endif + +// +// Temperature Sensors +// +#define TEMP_0_PIN P0_26_A3 // (T4) +#define TEMP_1_PIN P0_25_A2 // (T3) +#define TEMP_2_PIN P0_24_A1 // (T2) +#define TEMP_BED_PIN P0_23_A0 // (T1) + +// +// Heaters / Fans +// +#define HEATER_BED_PIN P3_26 +#define HEATER_0_PIN P3_25 +#define HEATER_1_PIN P1_20 +#define HEATER_2_PIN P1_23 +#ifndef FAN_PIN + #define FAN_PIN P1_18 +#endif +#define FAN1_PIN P1_21 +#define FAN2_PIN P1_24 + +// +// LCD / Controller +// +#define BEEPER_PIN P2_07 +#define LCD_PINS_RS P2_10 +#define LCD_PINS_ENABLE P0_22 +#define LCD_PINS_D4 P1_19 +#define LCD_PINS_D5 P2_08 +#define LCD_PINS_D6 P1_30 +#define LCD_PINS_D7 P1_31 +#define BTN_EN1 P0_00 +#define BTN_EN2 P0_01 +#define BTN_ENC P0_28 + +#ifndef SDCARD_CONNECTION + #define SDCARD_CONNECTION ONBOARD +#endif + +#if SD_CONNECTION_IS(ONBOARD) + #define SD_SS_PIN P0_06 + #define SD_SCK_PIN P0_07 + #define SD_MISO_PIN P0_08 + #define SD_MOSI_PIN P0_09 + #define SD_DETECT_PIN P0_05 +#elif 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 + #define SD_DETECT_PIN P2_06 +#endif diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h new file mode 100644 index 0000000..d675499 --- /dev/null +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h @@ -0,0 +1,59 @@ +/** + * 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 <https://www.gnu.org/licenses/>. + * + */ +#pragma once + +/** + * MKS SGen pin assignments + * + * The pins diagram can be found and the following URL: + * https://github.com/makerbase-mks/MKS-SGen/blob/master/Hardware/MKS%20SGEN%20V1.0_001/MKS%20SGEN%20V1.0_001%20PIN.pdf + */ + +#if NOT_TARGET(MCU_LPC1769) + #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." +#endif + +#define BOARD_INFO_NAME "MKS SGen" +#define BOARD_WEBSITE_URL "github.com/makerbase-mks/MKS-SGEN" + +#define MKS_HAS_LPC1769 +#include "../lpc1768/pins_MKS_SBASE.h" + +#if HAS_TMC_UART + /** + * TMC2208/TMC2209 stepper drivers + */ + + #define X_SERIAL_TX_PIN P1_22 // J8-2 + #define X_SERIAL_RX_PIN P1_22 // J8-2 + #define Y_SERIAL_TX_PIN P1_23 // J8-3 + #define Y_SERIAL_RX_PIN P1_23 // J8-3 + #define Z_SERIAL_TX_PIN P2_12 // J8-4 + #define Z_SERIAL_RX_PIN P2_12 // J8-4 + #define E0_SERIAL_TX_PIN P2_11 // J8-5 + #define E0_SERIAL_RX_PIN P2_11 // J8-5 + #define E1_SERIAL_TX_PIN P4_28 // J8-6 + #define E1_SERIAL_RX_PIN P4_28 // J8-6 + + // Reduce baud rate to improve software serial reliability + #define TMC_BAUD_RATE 19200 +#endif diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h new file mode 100644 index 0000000..79c79c5 --- /dev/null +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h @@ -0,0 +1,414 @@ +/** + * 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 <https://www.gnu.org/licenses/>. + * + */ +#pragma once + +/** + * MKS SGen pin assignments + */ + +#if NOT_TARGET(MCU_LPC1769) + #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." +#endif + +#define BOARD_INFO_NAME "MKS SGEN_L V2" +#define BOARD_WEBSITE_URL "github.com/makerbase-mks" + +// +// EEPROM, MKS SGEN_L V2.0 hardware has 4K EEPROM on the board +// +#if NO_EEPROM_SELECTED + //#define SDCARD_EEPROM_EMULATION + //#define I2C_EEPROM // AT24C32 + #define FLASH_EEPROM_EMULATION + #define MARLIN_EEPROM_SIZE 0x1000 // 4KB +#endif + +// +// Servos +// +#define SERVO0_PIN P1_23 // SERVO P1.23 +#define SERVO1_PIN P2_00 // SERVO P2.0 + +// +// Trinamic Stallguard pins, can connect or disconnect by jumpers cap on the board +// +#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 +// +#if 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 + +#if 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 + +#if 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 P1_09 +#define E1_DIR_PIN P1_14 +#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 P1_16 + #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_01 + #define X_SERIAL_RX_PIN P1_01 + #define Y_SERIAL_TX_PIN P1_08 + #define Y_SERIAL_RX_PIN P1_08 + #define Z_SERIAL_TX_PIN P1_10 + #define Z_SERIAL_RX_PIN P1_10 + #define E0_SERIAL_TX_PIN P1_15 + #define E0_SERIAL_RX_PIN P1_15 + #define E1_SERIAL_TX_PIN P1_17 + #define E1_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) +#define TEMP_2_PIN P0_26_A3 // Analog Input A3 (P0.26, No pull up) + +// +// Heaters / Fans +// +#define HEATER_BED_PIN P2_05 +#define HEATER_0_PIN P2_07 +#if HAS_MULTI_HOTEND + #ifndef HEATER_1_PIN + #define HEATER_1_PIN P2_06 + #endif +#else + #ifndef FAN2_PIN + #define FAN2_PIN P2_06 // HE1 for FAN3 + #endif +#endif +#ifndef FAN_PIN + #define FAN_PIN P2_04 // FAN1 +#endif +#ifndef FAN1_PIN + #define FAN1_PIN P1_04 // FAN2 +#endif + +// +// Misc. Functions +// +#define LED_PIN P1_18 // Used as a status indicator + +// +// RGB LED +// +#if ENABLED(RGB_LED) + #ifndef RGB_LED_R_PIN + #define RGB_LED_R_PIN P1_19 + #endif + #ifndef RGB_LED_G_PIN + #define RGB_LED_G_PIN P1_20 + #endif + #ifndef RGB_LED_B_PIN + #define RGB_LED_B_PIN P1_21 + #endif +#else + #define LED2_PIN P1_19 // Initialized by HAL/LPC1768/main.cpp + #define LED3_PIN P1_20 + #define LED4_PIN P1_21 +#endif + +/** + * _____ _____ + * (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 IS_TFTGLCD_PANEL + + #if ENABLED(TFTGLCD_PANEL_SPI) + #define TFTGLCD_CS P3_25 + #endif + + #define SD_DETECT_PIN P0_27 + +#elif 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 + + #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 + + #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 + + #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 P1_20 + + #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/lpc1769/pins_SMOOTHIEBOARD.h b/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h new file mode 100644 index 0000000..c5ce3f8 --- /dev/null +++ b/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h @@ -0,0 +1,181 @@ +/** + * 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 <https://www.gnu.org/licenses/>. + * + */ +#pragma once + +/** + * Smoothieboard pin assignments + */ + +#if NOT_TARGET(MCU_LPC1769) + #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." +#endif + +#define BOARD_INFO_NAME "Smoothieboard" +#define BOARD_WEBSITE_URL "smoothieware.org/smoothieboard" + +// +// Servos +// +#define SERVO0_PIN P1_23 + +// +// Limit Switches +// +#define X_MIN_PIN P1_24 +#define X_MAX_PIN P1_25 +#define Y_MIN_PIN P1_26 +#define Y_MAX_PIN P1_27 +#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 // (T1) +#define TEMP_BED_PIN P0_24_A1 // (T2) +#define TEMP_1_PIN P0_25_A2 // (T3) +#define TEMP_2_PIN P0_26_A3 // (T4) + +// +// Heaters / Fans +// +#define HEATER_BED_PIN P2_05 +#define HEATER_0_PIN P2_07 +#define HEATER_1_PIN P1_23 +#ifndef FAN_PIN + #define FAN_PIN P2_06 +#endif +#define FAN1_PIN P2_04 + +// +// LCD / Controller +// +#if ANY(VIKI2, miniVIKI) + + #define BEEPER_PIN P1_31 + #define DOGLCD_A0 P2_11 + #define DOGLCD_CS P0_16 + + #define BTN_EN1 P3_25 + #define BTN_EN2 P3_26 + #define BTN_ENC P1_30 + + #define SD_DETECT_PIN P1_18 + #define SDSS P1_21 + + #define STAT_LED_RED_PIN P1_19 + #define STAT_LED_BLUE_PIN P1_20 + +#elif HAS_WIRED_LCD + + /** + * SD Support + * + * For the RRD GLCD it CANNOT share the same SPI as the LCD so it must be + * hooked up to the onboard SDCard SPI and use a spare pin for the SDCS. + * Also note that an external SDCard sharing the SPI port with the + * onboard/internal SDCard must be ejected before rebooting as the bootloader + * does not like the external card. NOTE Smoothie will not boot if the external + * sdcard is inserted in the RRD LCD sdcard slot at boot time, it must be + * inserted after it has booted. + */ + #define SD_DETECT_PIN P0_27 // EXP2 Pin 7 (SD_CD, SD_DET) + + #define SD_MISO_PIN P0_08 // EXP2 Pin 1 (PB3, SD_MISO) + #define SD_SCK_PIN P0_07 // EXP2 Pin 2 (SD_SCK) + #define SD_SS_PIN P0_28 // EXP2 Pin 4 (SD_CSEL, SD_CS) + #define SD_MOSI_PIN P0_09 // EXP2 Pin 6 (PB2, SD_MOSI) + + /** + * The Smoothieboard supports the REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER with either + * a custom cable with breakouts to the pins indicated below or the RRD GLCD Adapter board + * found at http://smoothieware.org/rrdglcdadapter + * + * Other links to information about setting up a display panel with Smoothieboard + * http://chibidibidiwah.wdfiles.com/local--files/panel/smoothieboard2sd.jpg + * http://smoothieware.org/panel + */ + #if IS_RRD_FG_SC + // EXP1 Pins + #define BEEPER_PIN P1_31 // EXP1 Pin 1 + #define BTN_ENC P1_30 // EXP1 Pin 2 + #define LCD_PINS_ENABLE P0_18 // EXP1 Pin 3 (MOSI) + #define LCD_PINS_RS P0_16 // EXP1 Pin 4 (CS) + #define LCD_PINS_D4 P0_15 // EXP1 Pin 5 (SCK) + // EXP2 Pins + #define BTN_EN2 P3_26 // EXP2 Pin 3 + #define BTN_EN1 P3_25 // EXP2 Pin 5 + + #elif IS_TFTGLCD_PANEL + + #define SD_DETECT_PIN P0_27 // EXP2 Pin 7 (SD_CD, SD_DET) + + #if ENABLED(TFTGLCD_PANEL_SPI) + #define TFTGLCD_CS P3_26 // EXP2 Pin 3 + #endif + + #else + #error "Marlin's Smoothieboard support cannot drive your LCD." + #endif + +#endif + +/** + * I2C Digipots - MCP4451 + * Address 58 (2C << 1) + * Set from 0 - 127 with stop bit. + * (Ex. 3F << 1 | 1) + */ +#define DIGIPOTS_I2C_SCL P0_00 +#define DIGIPOTS_I2C_SDA_X P0_04 +#define DIGIPOTS_I2C_SDA_Y P0_10 +#define DIGIPOTS_I2C_SDA_Z P0_19 +#define DIGIPOTS_I2C_SDA_E0 P0_21 +#define DIGIPOTS_I2C_SDA_E1 P4_29 + +#ifndef DIGIPOT_I2C_ADDRESS_A + #define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address (58 <- 2C << 1) +#endif diff --git a/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h new file mode 100644 index 0000000..d4f3e5b --- /dev/null +++ b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.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 <https://www.gnu.org/licenses/>. + * + */ +#pragma once + +/** + * TH3D EZBoard pin assignments + */ + +#if NOT_TARGET(MCU_LPC1769) + #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." +#endif + +#define BOARD_INFO_NAME "TH3D EZBoard" +#define BOARD_WEBSITE_URL "th3dstudio.com" + +// +// Servos +// +#define SERVO0_PIN P2_04 + +// +// Limit Switches +// +#define X_STOP_PIN P1_24 +#define Y_STOP_PIN P1_25 +#define Z_STOP_PIN P1_26 + +// +// Filament Runout Sensor +// +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN P1_27 +#endif + +// +// Steppers +// +#define X_STEP_PIN P2_00 +#define X_DIR_PIN P1_16 +#define X_ENABLE_PIN P1_17 + +#define Y_STEP_PIN P2_01 +#define Y_DIR_PIN P1_10 +#define Y_ENABLE_PIN P1_09 + +#define Z_STEP_PIN P2_02 +#define Z_DIR_PIN P1_15 +#define Z_ENABLE_PIN P1_14 + +#define E0_STEP_PIN P2_03 +#define E0_DIR_PIN P1_04 +#define E0_ENABLE_PIN P1_08 + +#define E1_STEP_PIN P2_08 +#define E1_DIR_PIN P2_13 +#define E1_ENABLE_PIN P4_29 + +#if HAS_TMC_UART + // + // TMC220x stepper drivers + // Software serial + // + #define X_SERIAL_TX_PIN P0_04 + #define X_SERIAL_RX_PIN P0_05 + #define Y_SERIAL_TX_PIN P0_10 + #define Y_SERIAL_RX_PIN P0_11 + #define Z_SERIAL_TX_PIN P0_19 + #define Z_SERIAL_RX_PIN P0_20 + #define E0_SERIAL_TX_PIN P0_22 + #define E0_SERIAL_RX_PIN P0_21 + + // Reduce baud rate to improve software serial reliability + #define TMC_BAUD_RATE 19200 +#endif + +// +// Temp Sensors +// 3.3V max when defined as an Analog Input! +// +#if TEMP_SENSOR_0 == 20 // PT100 Adapter + #define TEMP_0_PIN P0_02_A7 // Analog Input +#else + #define TEMP_0_PIN P0_23_A0 // Analog Input P0_23 +#endif + +#define TEMP_BED_PIN P0_24_A1 // Analog Input P0_24 +#define TEMP_1_PIN P0_25_A2 // Analog Input P0_25 + +#if ENABLED(FILAMENT_WIDTH_SENSOR) + #define FILWIDTH_PIN P0_26_A3 // Analog Input P0_26 +#else + #define TEMP_2_PIN P0_26_A3 // Analog Input P0_26 +#endif + +// +// Heaters / Fans +// +#define HEATER_BED_PIN P2_05 +#define HEATER_0_PIN P2_07 +#ifndef FAN_PIN + #define FAN_PIN P2_06 +#endif +#define FAN1_PIN P1_22 + +// +// Auto fans +// +#define AUTO_FAN_PIN P1_22 // FET 3 +#ifndef E0_AUTO_FAN_PIN + #define E0_AUTO_FAN_PIN AUTO_FAN_PIN +#endif +#ifndef E1_AUTO_FAN_PIN + #define E1_AUTO_FAN_PIN AUTO_FAN_PIN +#endif +#ifndef E2_AUTO_FAN_PIN + #define E2_AUTO_FAN_PIN AUTO_FAN_PIN +#endif + +// +// SD Card +// + +#define SDCARD_CONNECTION ONBOARD + +#define SD_SCK_PIN P0_07 +#define SD_MISO_PIN P0_08 +#define SD_MOSI_PIN P0_09 +#define ONBOARD_SD_CS_PIN P0_06 +#define SD_SS_PIN ONBOARD_SD_CS_PIN + +// +// LCD / Controller +// + +/** + * _____ + * 5V | · · | GND + * (LCD_EN) P0_18 | · · | P0_16 (LCD_RS) + * (LCD_D4) P0_15 | · · P3_25 (BTN_EN2) + * (RESET) P2_11 | · · | P3_26 (BTN_EN1) + * (BTN_ENC) P1_30 | · · | P1_31 (BEEPER) + * ----- + * EXP1 + * + * LCD_PINS_D5, D6, and D7 are not present in the EXP1 connector, and will need to be + * defined to use the REPRAP_DISCOUNT_SMART_CONTROLLER. + * + * A remote SD card is currently not supported because the pins routed to the EXP2 + * connector are shared with the onboard SD card. + */ + +#if ENABLED(CR10_STOCKDISPLAY) + #define BEEPER_PIN P1_31 + #define BTN_EN1 P3_26 + #define BTN_EN2 P3_25 + #define BTN_ENC P1_30 + #define LCD_PINS_RS P0_16 + #define LCD_PINS_ENABLE P0_18 + #define LCD_PINS_D4 P0_15 + #define KILL_PIN P2_11 +#elif HAS_WIRED_LCD + #error "Only the CR10_STOCKDISPLAY is supported with TH3D EZBoard." +#endif |