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/mega | |
download | kp3s-lgvl-e8701195e66f2d27ffe17fb514eae8173795aaf7.tar.xz kp3s-lgvl-e8701195e66f2d27ffe17fb514eae8173795aaf7.zip |
Initial commit
Diffstat (limited to 'Marlin/src/pins/mega')
27 files changed, 3569 insertions, 0 deletions
diff --git a/Marlin/src/pins/mega/pins_CHEAPTRONIC.h b/Marlin/src/pins/mega/pins_CHEAPTRONIC.h new file mode 100644 index 0000000..98427d9 --- /dev/null +++ b/Marlin/src/pins/mega/pins_CHEAPTRONIC.h @@ -0,0 +1,80 @@ +/** + * 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 + +/** + * Cheaptronic v1.0 pin assignments + */ + +#if NOT_TARGET(__AVR_ATmega2560__) + #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" +#endif + +#define BOARD_INFO_NAME "Cheaptronic v1.0" +// +// Limit Switches +// +#define X_STOP_PIN 3 +#define Y_STOP_PIN 2 +#define Z_STOP_PIN 5 + +// +// Steppers +// +#define X_STEP_PIN 14 +#define X_DIR_PIN 15 +#define X_ENABLE_PIN 24 + +#define Y_STEP_PIN 35 +#define Y_DIR_PIN 36 +#define Y_ENABLE_PIN 31 + +#define Z_STEP_PIN 40 +#define Z_DIR_PIN 41 +#define Z_ENABLE_PIN 37 + +#define E0_STEP_PIN 26 +#define E0_DIR_PIN 28 +#define E0_ENABLE_PIN 25 + +#define E1_STEP_PIN 33 +#define E1_DIR_PIN 34 +#define E1_ENABLE_PIN 30 + +// +// Temperature sensors +// +#define TEMP_0_PIN 15 // Analog Input +#define TEMP_1_PIN 14 // Analog Input +#define TEMP_BED_PIN 13 // Analog Input + +// +// Heaters / Fans +// +#define HEATER_0_PIN 19 // EXTRUDER 1 +#define HEATER_1_PIN 23 // EXTRUDER 2 +#define HEATER_BED_PIN 22 + +// +// LCD / Controller +// +// Cheaptronic v1.0 doesn't support LCD diff --git a/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h b/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h new file mode 100644 index 0000000..3f18bc8 --- /dev/null +++ b/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h @@ -0,0 +1,140 @@ +/** + * 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 + +/** + * Cheaptronic v2.0 pin assignments + * Built and sold by Michal Dyntar - RRO + * www.reprapobchod.cz + */ + +#if NOT_TARGET(__AVR_ATmega2560__) + #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" +#endif + +#define BOARD_INFO_NAME "Cheaptronic v2.0" + +// +// Limit Switches +// +#define X_MIN_PIN 30 +#define X_MAX_PIN 31 +#define Y_MIN_PIN 32 +#define Y_MAX_PIN 33 +#define Z_MIN_PIN 34 +#define Z_MAX_PIN 35 + +// +// Steppers +// +#define X_STEP_PIN 17 +#define X_DIR_PIN 16 +#define X_ENABLE_PIN 48 + +#define Y_STEP_PIN 54 +#define Y_DIR_PIN 47 +#define Y_ENABLE_PIN 55 + +#define Z_STEP_PIN 57 +#define Z_DIR_PIN 56 +#define Z_ENABLE_PIN 62 + +#define E0_STEP_PIN 23 +#define E0_DIR_PIN 22 +#define E0_ENABLE_PIN 24 + +#define E1_STEP_PIN 26 +#define E1_DIR_PIN 25 +#define E1_ENABLE_PIN 27 + +#define E2_STEP_PIN 29 +#define E2_DIR_PIN 28 +#define E2_ENABLE_PIN 39 + +// +// Temperature sensors +// +#define TEMP_0_PIN 15 +#define TEMP_1_PIN 13 +#define TEMP_2_PIN 14 +#define TEMP_3_PIN 11 // should be used for chamber temperature control +#define TEMP_BED_PIN 12 + +// +// Heaters / Fans +// +#define HEATER_0_PIN 6 +#define HEATER_1_PIN 7 +#define HEATER_2_PIN 8 +#define HEATER_BED_PIN 9 +#ifndef FAN_PIN + #define FAN_PIN 3 +#endif +#define FAN2_PIN 58 // additional fan or light control output + +// +// Other board specific pins +// +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN 37 // board input labeled as F-DET +#endif +#define Z_MIN_PROBE_PIN 36 // additional external board input labeled as E-SENS (should be used for Z-probe) +#define LED_PIN 13 +#define SPINDLE_ENABLE_PIN 4 // additional PWM pin 1 at JP1 connector - should be used for laser control too +#define EXT_2 5 // additional PWM pin 2 at JP1 connector +#define EXT_3 2 // additional PWM pin 3 at JP1 connector +#define PS_ON_PIN 45 +#define KILL_PIN 46 + +#ifndef FILWIDTH_PIN + #define FILWIDTH_PIN 11 // shared with TEMP_3 analog input +#endif + +// +// LCD / Controller +// +#define LCD_PINS_RS 19 +#define LCD_PINS_ENABLE 42 +#define LCD_PINS_D4 18 +#define LCD_PINS_D5 38 +#define LCD_PINS_D6 41 +#define LCD_PINS_D7 40 + +#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder +#endif + +// +// Beeper, SD Card, Encoder +// +#define BEEPER_PIN 44 + +#if ENABLED(SDSUPPORT) + #define SDSS 53 + #define SD_DETECT_PIN 49 +#endif + +#if IS_NEWPANEL + #define BTN_EN1 11 + #define BTN_EN2 12 + #define BTN_ENC 43 +#endif diff --git a/Marlin/src/pins/mega/pins_CNCONTROLS_11.h b/Marlin/src/pins/mega/pins_CNCONTROLS_11.h new file mode 100644 index 0000000..f80e614 --- /dev/null +++ b/Marlin/src/pins/mega/pins_CNCONTROLS_11.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 <https://www.gnu.org/licenses/>. + * + */ +#pragma once + +/** + * CartesioV11 pin assignments + */ + +#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) + #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" +#endif + +#define BOARD_INFO_NAME "CN Controls V11" + +// +// Limit Switches +// +#define X_STOP_PIN 43 +#define Y_STOP_PIN 45 +#define Z_STOP_PIN 42 + +// +// Steppers +// +#define X_STEP_PIN 34 +#define X_DIR_PIN 36 +#define X_ENABLE_PIN 35 + +#define Y_STEP_PIN 37 +#define Y_DIR_PIN 39 +#define Y_ENABLE_PIN 38 + +#define Z_STEP_PIN 40 +#define Z_DIR_PIN 48 +#define Z_ENABLE_PIN 41 + +#define E0_STEP_PIN 29 +#define E0_DIR_PIN 28 +#define E0_ENABLE_PIN 3 + +#define E1_STEP_PIN 61 +#define E1_DIR_PIN 62 +#define E1_ENABLE_PIN 60 + +#define E2_STEP_PIN 15 +#define E2_DIR_PIN 14 +#define E2_ENABLE_PIN 16 + +#define E3_STEP_PIN 44 +#define E3_DIR_PIN 49 +#define E3_ENABLE_PIN 47 + +// +// Temperature Sensors +// +#define TEMP_0_PIN 0 // Analog Input +#define TEMP_1_PIN 3 // Analog Input. 3 for tool2 -> 2 for chambertemp +#define TEMP_2_PIN 2 // Analog Input. 9 for tool3 -> 2 for chambertemp +#define TEMP_3_PIN 11 // Analog Input. 11 for tool4 -> 2 for chambertemp +#define TEMP_BED_PIN 1 // Analog Input + +#ifndef TEMP_CHAMBER_PIN + //#define TEMP_CHAMBER_PIN 2 // Analog Input +#endif + +// +// Heaters / Fans +// +#define HEATER_0_PIN 5 +#define HEATER_1_PIN 58 +#define HEATER_2_PIN 64 +#define HEATER_3_PIN 46 +#define HEATER_BED_PIN 2 + +#ifndef FAN_PIN + //#define FAN_PIN 7 // common PWM pin for all tools +#endif + +// +// Auto fans +// +#define AUTO_FAN_PIN 7 +#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 +#ifndef E3_AUTO_FAN_PIN + #define E3_AUTO_FAN_PIN AUTO_FAN_PIN +#endif + +// +// Misc. Functions +// +#define SDSS 53 +#define SD_DETECT_PIN 13 + +// Tools + +//#define TOOL_0_PIN 4 +//#define TOOL_1_PIN 59 +//#define TOOL_2_PIN 8 +//#define TOOL_3_PIN 30 +//#define TOOL_PWM_PIN 7 // common PWM pin for all tools + +// Common I/O + +//#define FIL_RUNOUT_PIN -1 +//#define PWM_1_PIN 11 +//#define PWM_2_PIN 10 +//#define SPARE_IO 12 + +// +// LCD / Controller +// +#define BEEPER_PIN 6 + +// Pins for DOGM SPI LCD Support +#define DOGLCD_A0 26 +#define DOGLCD_CS 24 +#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h +#define DOGLCD_SCK -1 + +#define BTN_EN1 23 +#define BTN_EN2 25 +#define BTN_ENC 27 + +// Hardware buttons for manual movement of XYZ +#define SHIFT_OUT_PIN 19 +#define SHIFT_LD_PIN 18 +#define SHIFT_CLK_PIN 17 + +//#define UI1 31 +//#define UI2 22 + +#define STAT_LED_BLUE_PIN -1 +#define STAT_LED_RED_PIN 31 diff --git a/Marlin/src/pins/mega/pins_CNCONTROLS_12.h b/Marlin/src/pins/mega/pins_CNCONTROLS_12.h new file mode 100644 index 0000000..540f5c2 --- /dev/null +++ b/Marlin/src/pins/mega/pins_CNCONTROLS_12.h @@ -0,0 +1,167 @@ +/** + * 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 + +/** + * CartesioV12 pin assignments + */ + +#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) + #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" +#endif + +#define BOARD_INFO_NAME "CN Controls V12" + +// +// Limit Switches +// +#define X_STOP_PIN 19 +#define Y_STOP_PIN 22 +#define Z_STOP_PIN 23 + +// +// Steppers +// +#define X_STEP_PIN 25 +#define X_DIR_PIN 27 +#define X_ENABLE_PIN 26 + +#define Y_STEP_PIN 28 +#define Y_DIR_PIN 30 +#define Y_ENABLE_PIN 29 + +#define Z_STEP_PIN 31 +#define Z_DIR_PIN 33 +#define Z_ENABLE_PIN 32 + +#define E0_STEP_PIN 57 +#define E0_DIR_PIN 55 +#define E0_ENABLE_PIN 58 + +#define E1_STEP_PIN 61 +#define E1_DIR_PIN 62 +#define E1_ENABLE_PIN 60 + +#define E2_STEP_PIN 46 +#define E2_DIR_PIN 66 +#define E2_ENABLE_PIN 44 + +#define E3_STEP_PIN 45 +#define E3_DIR_PIN 69 +#define E3_ENABLE_PIN 47 + +// +// Temperature Sensors +// +#define TEMP_0_PIN 0 // Analog Input +#define TEMP_1_PIN 9 // Analog Input. 9 for tool2 -> 13 for chambertemp +#define TEMP_2_PIN 13 // Analog Input. 10 for tool3 -> 13 for chambertemp +#define TEMP_3_PIN 11 // Analog Input. 11 for tool4 -> 13 for chambertemp +#define TEMP_BED_PIN 14 // Analog Input + +#ifndef TEMP_CHAMBER_PIN + //#define TEMP_CHAMBER_PIN 13 // Analog Input +#endif + +// +// Heaters / Fans +// +#define HEATER_0_PIN 11 +#define HEATER_1_PIN 9 +#define HEATER_2_PIN 6 +#define HEATER_3_PIN 3 +#define HEATER_BED_PIN 24 + +#ifndef FAN_PIN + #define FAN_PIN 5 // 5 is PWMtool3 -> 7 is common PWM pin for all tools +#endif + +// +// Auto fans +// +#define AUTO_FAN_PIN 7 +#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 +#ifndef E3_AUTO_FAN_PIN + #define E3_AUTO_FAN_PIN AUTO_FAN_PIN +#endif + +// +// Misc. Functions +// +#define SDSS 53 +#define SD_DETECT_PIN 15 + +// Tools + +//#define TOOL_0_PIN 56 +//#define TOOL_0_PWM_PIN 10 // red warning led at dual extruder +//#define TOOL_1_PIN 59 +//#define TOOL_1_PWM_PIN 8 // lights at dual extruder +//#define TOOL_2_PIN 4 +//#define TOOL_2_PWM_PIN 5 +//#define TOOL_3_PIN 14 +//#define TOOL_3_PWM_PIN 2 + +// Common I/O + +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN 18 +#endif +//#define PWM_1_PIN 12 +//#define PWM_2_PIN 13 +//#define SPARE_IO 17 + +// +// LCD / Controller +// +#define BEEPER_PIN 16 + +// Pins for DOGM SPI LCD Support +#define DOGLCD_A0 39 +#define DOGLCD_CS 35 +#define DOGLCD_MOSI 48 +#define DOGLCD_SCK 49 +#define LCD_SCREEN_ROT_180 + +// The encoder and click button +#define BTN_EN1 36 +#define BTN_EN2 34 +#define BTN_ENC 38 + +// Hardware buttons for manual movement of XYZ +#define SHIFT_OUT_PIN 42 +#define SHIFT_LD_PIN 41 +#define SHIFT_CLK_PIN 40 + +//#define UI1 43 +//#define UI2 37 + +#define STAT_LED_BLUE_PIN -1 +#define STAT_LED_RED_PIN 10 // TOOL_0_PWM_PIN diff --git a/Marlin/src/pins/mega/pins_CNCONTROLS_15.h b/Marlin/src/pins/mega/pins_CNCONTROLS_15.h new file mode 100644 index 0000000..8bafbdf --- /dev/null +++ b/Marlin/src/pins/mega/pins_CNCONTROLS_15.h @@ -0,0 +1,127 @@ +/** + * 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 + +/** + * CNControls V15 for HMS434 pin assignments + */ + +#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) + #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" +#endif + +#define BOARD_INFO_NAME "CN Controls V15" + +// +// Servos +// +#define SERVO0_PIN 6 + +// +// Limit Switches +// +#define X_STOP_PIN 34 +#define Y_STOP_PIN 39 +#define Z_STOP_PIN 62 + +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN 49 +#endif + +// +// Steppers +// +#define X_STEP_PIN 14 +#define X_DIR_PIN 25 +#define X_ENABLE_PIN 26 + +#define Y_STEP_PIN 11 +#define Y_DIR_PIN 12 +#define Y_ENABLE_PIN 15 + +#define Z_STEP_PIN 24 +#define Z_DIR_PIN 27 +#define Z_ENABLE_PIN 28 + +#define E0_STEP_PIN 64 +#define E0_DIR_PIN 65 +#define E0_ENABLE_PIN 63 + +// +// Temperature Sensors +// Analog Inputs +// +#define TEMP_0_PIN 2 // Analog Input +#define TEMP_BED_PIN 4 // Analog Input + +#ifndef TEMP_CHAMBER_PIN + #define TEMP_CHAMBER_PIN 5 // Analog Input +#endif + +// +// Heaters +// +#define HEATER_0_PIN 4 +#define HEATER_BED_PIN 32 +#define HEATER_CHAMBER_PIN 33 + +// +// Fans +// +#define FAN_PIN 8 + +// +// Auto fans +// +#define AUTO_FAN_PIN 30 +#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 +#ifndef E3_AUTO_FAN_PIN + #define E3_AUTO_FAN_PIN AUTO_FAN_PIN +#endif +#ifndef CHAMBER_AUTO_FAN_PIN + //#define CHAMBER_AUTO_FAN_PIN 10 +#endif + +// +// Misc. Functions +// +#define SDSS 53 +#define SD_DETECT_PIN 40 + +// Common I/O + +#define FIL_RUNOUT_PIN 9 +//#define FIL_RUNOUT_PIN 29 // encoder sensor +//#define PWM_1_PIN 12 +//#define PWM_2_PIN 13 +//#define SPARE_IO 17 +#define BEEPER_PIN 13 +#define STAT_LED_BLUE_PIN -1 +#define STAT_LED_RED_PIN 10 // 31 diff --git a/Marlin/src/pins/mega/pins_EINSTART-S.h b/Marlin/src/pins/mega/pins_EINSTART-S.h new file mode 100644 index 0000000..40d65c3 --- /dev/null +++ b/Marlin/src/pins/mega/pins_EINSTART-S.h @@ -0,0 +1,113 @@ +/** + * 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 + +/** + * Einstart-S pin assignments + * PCB Silkscreen: 3DPrinterCon_v3.5 + */ + +#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) + #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" +#endif + +#define BOARD_INFO_NAME "Einstart-S" + +// +// Limit Switches +// +#define X_STOP_PIN 44 +#define Y_STOP_PIN 43 +#define Z_STOP_PIN 42 + +// +// Steppers +// +#define X_STEP_PIN 76 +#define X_DIR_PIN 75 +#define X_ENABLE_PIN 73 + +#define Y_STEP_PIN 31 +#define Y_DIR_PIN 32 +#define Y_ENABLE_PIN 72 + +#define Z_STEP_PIN 34 +#define Z_DIR_PIN 35 +#define Z_ENABLE_PIN 33 + +#define E0_STEP_PIN 36 +#define E0_DIR_PIN 37 +#define E0_ENABLE_PIN 30 + +// +// Temperature Sensors +// +#define TEMP_0_PIN 0 // Analog Input +#define TEMP_BED_PIN 1 // Analog Input + +// +// Heaters / Fans +// +#define HEATER_0_PIN 83 +#define HEATER_BED_PIN 38 + +#define FAN_PIN 82 + +// +// Misc. Functions +// +#define SDSS 53 +#define LED_PIN 4 + +////////////////////////// +// LCDs and Controllers // +////////////////////////// + +// +// LCD Display output pins +// + +// Requires #define U8GLIB_SH1106_EINSTART in Configuration.h +// u8glib constructor +// U8GLIB_SH1106_128X64 u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, LCD_PINS_DC, LCD_PINS_RS); + +#define LCD_PINS_DC 78 +#define LCD_PINS_RS 79 +// DOGM SPI LCD Support +#define DOGLCD_CS 3 +#define DOGLCD_MOSI 2 +#define DOGLCD_SCK 5 +#define DOGLCD_A0 2 + +// +// LCD Display input pins +// +#define BTN_UP 25 +#define BTN_DWN 26 +#define BTN_LFT 27 +#define BTN_RT 28 + +// 'OK' button +#define BTN_ENC 29 + +// Set Kill to right arrow, same as RIGID_PANEL +#define KILL_PIN 28 diff --git a/Marlin/src/pins/mega/pins_ELEFU_3.h b/Marlin/src/pins/mega/pins_ELEFU_3.h new file mode 100644 index 0000000..af93c40 --- /dev/null +++ b/Marlin/src/pins/mega/pins_ELEFU_3.h @@ -0,0 +1,152 @@ +/** + * 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 + +/** + * Elefu RA Board Pin Assignments + */ + +#if NOT_TARGET(__AVR_ATmega2560__) + #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" +#endif + +#define BOARD_INFO_NAME "Elefu Ra v3" + +// +// Limit Switches +// +#define X_MIN_PIN 35 +#define X_MAX_PIN 34 +#define Y_MIN_PIN 33 +#define Y_MAX_PIN 32 +#define Z_MIN_PIN 31 +#define Z_MAX_PIN 30 + +// +// Z Probe (when not Z_MIN_PIN) +// +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN 30 +#endif + +// +// Steppers +// +#define X_STEP_PIN 49 +#define X_DIR_PIN 13 +#define X_ENABLE_PIN 48 + +#define Y_STEP_PIN 11 +#define Y_DIR_PIN 9 +#define Y_ENABLE_PIN 12 + +#define Z_STEP_PIN 7 +#define Z_DIR_PIN 6 +#define Z_ENABLE_PIN 8 + +#define E0_STEP_PIN 40 +#define E0_DIR_PIN 41 +#define E0_ENABLE_PIN 37 + +#define E1_STEP_PIN 18 +#define E1_DIR_PIN 19 +#define E1_ENABLE_PIN 38 + +#define E2_STEP_PIN 43 +#define E2_DIR_PIN 47 +#define E2_ENABLE_PIN 42 + +// +// Temperature Sensors +// +#define TEMP_0_PIN 3 // Analog Input +#define TEMP_1_PIN 2 // Analog Input +#define TEMP_2_PIN 1 // Analog Input +#define TEMP_BED_PIN 0 // Analog Input + +// +// Heaters / Fans +// +#define HEATER_0_PIN 45 // 12V PWM1 +#define HEATER_1_PIN 46 // 12V PWM2 +#define HEATER_2_PIN 17 // 12V PWM3 +#define HEATER_BED_PIN 44 // DOUBLE 12V PWM + +#ifndef FAN_PIN + #define FAN_PIN 16 // 5V PWM +#endif + +// +// Misc. Functions +// +#define PS_ON_PIN 10 // Set to -1 if using a manual switch on the PWRSW Connector +#define SLEEP_WAKE_PIN 26 // This feature still needs work +#define PHOTOGRAPH_PIN 29 + +// +// LCD / Controller +// +#define BEEPER_PIN 36 + +#if ENABLED(RA_CONTROL_PANEL) + + #define SDSS 53 + #define SD_DETECT_PIN 28 + + #define BTN_EN1 14 + #define BTN_EN2 39 + #define BTN_ENC 15 + +#endif // RA_CONTROL_PANEL + +#if ENABLED(RA_DISCO) + // variables for which pins the TLC5947 is using + #define TLC_CLOCK_PIN 25 + #define TLC_BLANK_PIN 23 + #define TLC_XLAT_PIN 22 + #define TLC_DATA_PIN 24 + + // We also need to define pin to port number mapping for the 2560 to match the pins listed above. + // If you change the TLC pins, update this as well per the 2560 datasheet! This currently only works with the RA Board. + #define TLC_CLOCK_BIT 3 + #define TLC_CLOCK_PORT &PORTA + + #define TLC_BLANK_BIT 1 + #define TLC_BLANK_PORT &PORTA + + #define TLC_DATA_BIT 2 + #define TLC_DATA_PORT &PORTA + + #define TLC_XLAT_BIT 0 + #define TLC_XLAT_PORT &PORTA + + // Change this to match your situation. Lots of TLCs takes up the arduino SRAM very quickly, so be careful + // Leave it at at least 1 if you have enabled RA_LIGHTING + // The number of TLC5947 boards chained together for use with the animation, additional ones will repeat the animation on them, but are not individually addressable and mimic those before them. You can leave the default at 2 even if you only have 1 TLC5947 module. + #define NUM_TLCS 2 + + // These TRANS_ARRAY values let you change the order the LEDs on the lighting modules will animate for chase functions. + // Modify them according to your specific situation. + // NOTE: the array should be 8 long for every TLC you have. These defaults assume (2) TLCs. + #define TRANS_ARRAY { 0, 1, 2, 3, 4, 5, 6, 7, 15, 14, 13, 12, 11, 10, 9, 8 } // forward + //#define TRANS_ARRAY { 7, 6, 5, 4, 3, 2, 1, 0, 8, 9, 10, 11, 12, 13, 14, 15 } // backward +#endif // RA_DISCO diff --git a/Marlin/src/pins/mega/pins_GT2560_REV_A.h b/Marlin/src/pins/mega/pins_GT2560_REV_A.h new file mode 100644 index 0000000..dcd829f --- /dev/null +++ b/Marlin/src/pins/mega/pins_GT2560_REV_A.h @@ -0,0 +1,169 @@ +/** + * 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 + +/** + * Geeetech GT2560 Revision A board pin assignments, based on the work of + * George Robles (https://georges3dprinters.com) and + * Richard Smith <galorin@gmail.com> + */ + +#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) + #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" +#endif + +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "GT2560 Rev.A" +#endif +#define DEFAULT_MACHINE_NAME "Prusa i3 Pro B" + +// +// Limit Switches +// +#define X_MIN_PIN 22 +#define X_MAX_PIN 24 +#define Y_MIN_PIN 26 +#define Y_MAX_PIN 28 +#define Z_MIN_PIN 30 + +#if ENABLED(BLTOUCH) + #if MB(GT2560_REV_A_PLUS) + #define SERVO0_PIN 11 + #else + #define SERVO0_PIN 32 + #endif + #define Z_MAX_PIN -1 +#else + #define Z_MAX_PIN 32 +#endif + +// +// Steppers +// +#define X_STEP_PIN 25 +#define X_DIR_PIN 23 +#define X_ENABLE_PIN 27 + +#define Y_STEP_PIN 31 +#define Y_DIR_PIN 33 +#define Y_ENABLE_PIN 29 + +#define Z_STEP_PIN 37 +#define Z_DIR_PIN 39 +#define Z_ENABLE_PIN 35 + +#define E0_STEP_PIN 43 +#define E0_DIR_PIN 45 +#define E0_ENABLE_PIN 41 + +#define E1_STEP_PIN 49 +#define E1_DIR_PIN 47 +#define E1_ENABLE_PIN 48 + +// +// Temperature Sensors +// +#define TEMP_0_PIN 8 +#define TEMP_1_PIN 9 +#define TEMP_BED_PIN 10 + +// +// Heaters / Fans +// +#define HEATER_0_PIN 2 +#define HEATER_1_PIN 3 +#define HEATER_BED_PIN 4 +#ifndef FAN_PIN + #define FAN_PIN 7 +#endif + +// +// Misc. Functions +// +#define SDSS 53 +#define LED_PIN 13 +#define PS_ON_PIN 12 +#define SUICIDE_PIN 54 // Must be enabled at startup to keep power flowing +#define KILL_PIN -1 + +#if HAS_WIRED_LCD + + #define BEEPER_PIN 18 + + #if IS_NEWPANEL + + #if ENABLED(MKS_MINI_12864) + #define DOGLCD_A0 5 + #define DOGLCD_CS 21 + #define BTN_EN1 40 + #define BTN_EN2 42 + #elif ENABLED(FYSETC_MINI_12864) + // Disconnect EXP2-1 and EXP2-2, otherwise future firmware upload won't work. + #define DOGLCD_A0 20 + #define DOGLCD_CS 17 + + #define NEOPIXEL_PIN 21 + #define BTN_EN1 42 + #define BTN_EN2 40 + + #define LCD_RESET_PIN 16 + + #define DEFAULT_LCD_CONTRAST 220 + + #define LCD_BACKLIGHT_PIN -1 + #else + #define LCD_PINS_RS 20 + #define LCD_PINS_ENABLE 17 + #define LCD_PINS_D4 16 + #define LCD_PINS_D5 21 + #define LCD_PINS_D6 5 + #define LCD_PINS_D7 6 + #define BTN_EN1 42 + #define BTN_EN2 40 + #endif + + #define BTN_ENC 19 + #define SD_DETECT_PIN 38 + + #else // !IS_NEWPANEL + + #define SHIFT_CLK_PIN 38 + #define SHIFT_LD_PIN 42 + #define SHIFT_OUT_PIN 40 + #define SHIFT_EN_PIN 17 + + #define LCD_PINS_RS 16 + #define LCD_PINS_ENABLE 5 + #define LCD_PINS_D4 6 + #define LCD_PINS_D5 21 + #define LCD_PINS_D6 20 + #define LCD_PINS_D7 19 + + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder + #endif + + #define SD_DETECT_PIN -1 + + #endif // !IS_NEWPANEL + +#endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/mega/pins_GT2560_REV_A_PLUS.h b/Marlin/src/pins/mega/pins_GT2560_REV_A_PLUS.h new file mode 100644 index 0000000..7e2ce20 --- /dev/null +++ b/Marlin/src/pins/mega/pins_GT2560_REV_A_PLUS.h @@ -0,0 +1,34 @@ +/** + * 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 + +/** + * Geeetech GT2560 Revision A+ board pin assignments + */ + +#define BOARD_INFO_NAME "GT2560 Rev.A+" + +#include "pins_GT2560_REV_A.h" + +#if DISABLED(BLTOUCH) + #define SERVO0_PIN 32 +#endif diff --git a/Marlin/src/pins/mega/pins_GT2560_V3.h b/Marlin/src/pins/mega/pins_GT2560_V3.h new file mode 100644 index 0000000..606debd --- /dev/null +++ b/Marlin/src/pins/mega/pins_GT2560_V3.h @@ -0,0 +1,185 @@ +/** + * 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 + +/** + * GT2560 RevB + GT2560 V3.0 + GT2560 V3.1 + GT2560 V4.0 pin assignment + */ + +#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) + #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" +#endif + +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "GT2560 V3.0" +#endif + +// +// Servos +// +#define SERVO0_PIN 11 //13 untested 3Dtouch + +// +// Limit Switches +// +#ifndef X_STOP_PIN + #ifndef X_MIN_PIN + #define X_MIN_PIN 24 + #endif + #ifndef X_MAX_PIN + #define X_MAX_PIN 22 + #endif +#endif +#ifndef Y_STOP_PIN + #ifndef Y_MIN_PIN + #define Y_MIN_PIN 28 + #endif + #ifndef Y_MAX_PIN + #define Y_MAX_PIN 26 + #endif +#endif +#ifndef Z_STOP_PIN + #ifndef Z_MIN_PIN + #define Z_MIN_PIN 30 + #endif + #ifndef Z_MAX_PIN + #define Z_MAX_PIN 32 + #endif +#endif + +// +// Z Probe (when not Z_MIN_PIN) +// +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN 32 +#endif + +// +// Runout Sensor +// +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN 66 +#endif +#ifndef FIL_RUNOUT2_PIN + #define FIL_RUNOUT2_PIN 67 +#endif + +// +// Power Recovery +// +#define POWER_LOSS_PIN 69 // Pin to detect power loss +#define POWER_LOSS_STATE LOW + +// +// Steppers +// +#define X_STEP_PIN 37 +#define X_DIR_PIN 39 +#define X_ENABLE_PIN 35 + +#define Y_STEP_PIN 31 +#define Y_DIR_PIN 33 +#define Y_ENABLE_PIN 29 + +#define Z_STEP_PIN 25 +#define Z_DIR_PIN 23 +#define Z_ENABLE_PIN 27 + +#define E0_STEP_PIN 46 +#define E0_DIR_PIN 44 +#define E0_ENABLE_PIN 12 + +#define E1_STEP_PIN 49 +#define E1_DIR_PIN 47 +#define E1_ENABLE_PIN 48 + +#define E2_STEP_PIN 43 +#define E2_DIR_PIN 45 +#define E2_ENABLE_PIN 41 + +// +// Temperature Sensors +// +#define TEMP_0_PIN 11 // Analog Input +#define TEMP_1_PIN 9 // Analog Input +#define TEMP_2_PIN 8 // Analog Input +#define TEMP_BED_PIN 10 // Analog Input + +// +// Heaters / Fans +// +#define HEATER_0_PIN 10 +#define HEATER_1_PIN 3 +#define HEATER_2_PIN 2 +#define HEATER_BED_PIN 4 +#define FAN_PIN 9 +#define FAN1_PIN 8 +#define FAN2_PIN 7 + +// +// Misc. Functions +// +#define SD_DETECT_PIN 38 +#define SDSS 53 +#define LED_PIN 13 // Use 6 (case light) for external LED. 13 is internal (yellow) LED. +#define PS_ON_PIN 12 +#define SUICIDE_PIN 54 // This pin must be enabled at boot to keep power flowing + +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 6 // 21 +#endif + +// +// LCD Controller +// +#define BEEPER_PIN 18 + +#ifndef LCD_PINS_RS + #define LCD_PINS_RS 20 +#endif +#ifndef LCD_PINS_ENABLE + #define LCD_PINS_ENABLE 17 +#endif +#ifndef LCD_PINS_D4 + #define LCD_PINS_D4 16 +#endif +#ifndef LCD_PINS_D5 + #define LCD_PINS_D5 21 +#endif +#ifndef LCD_PINS_D6 + #define LCD_PINS_D6 5 +#endif +#ifndef LCD_PINS_D7 + #define LCD_PINS_D7 36 +#endif + +#if IS_NEWPANEL + #ifndef BTN_EN1 + #define BTN_EN1 42 + #endif + #ifndef BTN_EN2 + #define BTN_EN2 40 + #endif + #ifndef BTN_ENC + #define BTN_ENC 19 + #endif +#endif diff --git a/Marlin/src/pins/mega/pins_GT2560_V3_A20.h b/Marlin/src/pins/mega/pins_GT2560_V3_A20.h new file mode 100644 index 0000000..c445f5b --- /dev/null +++ b/Marlin/src/pins/mega/pins_GT2560_V3_A20.h @@ -0,0 +1,41 @@ +/** + * 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 + +/** + * Geeetech A20M pin assignment + */ + +#define LCD_PINS_RS 5 +#define LCD_PINS_ENABLE 36 +#define LCD_PINS_D4 21 +#define LCD_PINS_D7 6 + +#define SPEAKER // The speaker can produce tones + +#if IS_NEWPANEL + #define BTN_EN1 16 + #define BTN_EN2 17 + #define BTN_ENC 19 +#endif + +#include "pins_GT2560_V3.h" diff --git a/Marlin/src/pins/mega/pins_GT2560_V3_MC2.h b/Marlin/src/pins/mega/pins_GT2560_V3_MC2.h new file mode 100644 index 0000000..26721df --- /dev/null +++ b/Marlin/src/pins/mega/pins_GT2560_V3_MC2.h @@ -0,0 +1,35 @@ +/** + * 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 + +/***************************************************************** + * GT2560 V3.0 pin assignment (for Mecreator 2) + *****************************************************************/ + +#define BOARD_INFO_NAME "GT2560 V3.0 (MC2)" + +#define X_MIN_PIN 22 +#define X_MAX_PIN 24 +#define Y_MIN_PIN 26 +#define Y_MAX_PIN 28 + +#include "pins_GT2560_V3.h" diff --git a/Marlin/src/pins/mega/pins_HJC2560C_REV2.h b/Marlin/src/pins/mega/pins_HJC2560C_REV2.h new file mode 100644 index 0000000..d507d20 --- /dev/null +++ b/Marlin/src/pins/mega/pins_HJC2560C_REV2.h @@ -0,0 +1,173 @@ +/** + * 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 + +/** + * HJC2560-C Rev2.x pin assignments + */ + +#if NOT_TARGET(__AVR_ATmega2560__) + #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" +#endif + +#define DEFAULT_MACHINE_NAME "ADIMLab Gantry v2" +#define BOARD_INFO_NAME "HJC2560-C" + +// +// Servos +// +//#ifndef SERVO0_PIN +// #define SERVO0_PIN 11 +//#endif + +// +// Limit Switches +// +#define X_STOP_PIN 22 +#define Y_STOP_PIN 26 +#define Z_STOP_PIN 29 +//#define EXP_STOP_PIN 28 + +// +// Steppers +// +#define X_STEP_PIN 25 +#define X_DIR_PIN 23 +#define X_ENABLE_PIN 27 + +#define Y_STEP_PIN 32 +#define Y_DIR_PIN 33 +#define Y_ENABLE_PIN 31 + +#define Z_STEP_PIN 35 +#define Z_DIR_PIN 36 +#define Z_ENABLE_PIN 34 + +#define E0_STEP_PIN 42 +#define E0_DIR_PIN 43 +#define E0_ENABLE_PIN 37 + +#define E1_STEP_PIN 49 +#define E1_DIR_PIN 47 +#define E1_ENABLE_PIN 48 + +#define MOTOR_CURRENT_PWM_XY_PIN 44 +#define MOTOR_CURRENT_PWM_Z_PIN 45 +#define MOTOR_CURRENT_PWM_E_PIN 46 +// Motor current PWM conversion, PWM value = MotorCurrentSetting * 255 / range +#ifndef MOTOR_CURRENT_PWM_RANGE + #define MOTOR_CURRENT_PWM_RANGE 2000 +#endif +#define DEFAULT_PWM_MOTOR_CURRENT { 1300, 1300, 1250 } + +// +// Temperature Sensors +// +#define TEMP_0_PIN 8 // Analog Input +#define TEMP_1_PIN 9 // Analog Input +#define TEMP_BED_PIN 10 // Analog Input + +// +// Heaters / Fans +// +#define HEATER_0_PIN 2 +#define HEATER_1_PIN 3 +#define HEATER_BED_PIN 4 + +#ifndef FAN_PIN + #define FAN_PIN 7 //默认不使用PWM_FAN冷却喷嘴,如果需要,则取消注释 +#endif + +// +// Misc. Functions +// +#define SDSS 53 +#define SD_DETECT_PIN 39 +//#define LED_PIN 8 + +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 8 // 8 默认挤出机风扇作为Case LED,如果需要PWM FAN,则需要将FAN_PIN置为7,LED_PIN置为8 +#endif + +//#define SAFETY_TRIGGERED_PIN 28 // PIN to detect the safety circuit has triggered +//#define MAIN_VOLTAGE_MEASURE_PIN 14 // ANALOG PIN to measure the main voltage, with a 100k - 4k7 resitor divider. + +// +// M3/M4/M5 - Spindle/Laser Control +// +#if ENABLED(SPINDLE_LASER_ENABLE) + #define SPINDLE_DIR_PIN 16 + #define SPINDLE_LASER_ENABLE_PIN 17 // Pin should have a pullup! + #define SPINDLE_LASER_PWM_PIN 9 // Hardware PWM +#endif + +// +// LCD / Controller +// +#if HAS_WIRED_LCD + + #define BEEPER_PIN 18 + + #if IS_NEWPANEL + + #define LCD_PINS_RS 20 // LCD_CS + #define LCD_PINS_ENABLE 15 // LCD_SDA + #define LCD_PINS_D4 14 // LCD_SCK + + #if ENABLED(HJC_LCD_SMART_CONTROLLER) + #define LCD_BACKLIGHT_PIN 5 // LCD_Backlight + //#ifndef LCD_CONTRAST_PIN + // #define LCD_CONTRAST_PIN 5 // LCD_Contrast + //#endif + #ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN 24 // Filament runout + #endif + #else + #define LCD_PINS_D5 21 + #define LCD_PINS_D6 5 + #define LCD_PINS_D7 6 + #endif + + #define BTN_EN1 41 + #define BTN_EN2 40 + #define BTN_ENC 19 + + #define SD_DETECT_PIN 39 + + #else + + // Buttons attached to a shift register + #define SHIFT_CLK_PIN 38 + #define SHIFT_LD_PIN 42 + #define SHIFT_OUT_PIN 40 + #define SHIFT_EN_PIN 17 + + #define LCD_PINS_RS 16 + #define LCD_PINS_ENABLE 5 + #define LCD_PINS_D4 6 + #define LCD_PINS_D5 21 + #define LCD_PINS_D6 20 + #define LCD_PINS_D7 19 + + #endif // !IS_NEWPANEL + +#endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/mega/pins_INTAMSYS40.h b/Marlin/src/pins/mega/pins_INTAMSYS40.h new file mode 100644 index 0000000..be5f461 --- /dev/null +++ b/Marlin/src/pins/mega/pins_INTAMSYS40.h @@ -0,0 +1,151 @@ +/** + * 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 + +/** + * Intamsys Funmat HT V4.0 Mainboard + * 4988 Drivers Tested + * 2208 version exists and may or may not work + */ + +#if NOT_TARGET(__AVR_ATmega2560__) + #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" +#endif + +#define BOARD_INFO_NAME "Intamsys 4.0" + +// +// Servos +// +#define SERVO0_PIN 12 // Uses High Temp Present Jumper Pin + +// +// Limit Switches +// +#define X_STOP_PIN 22 +#define Y_STOP_PIN 26 +#define Z_MIN_PIN 29 +#define Z_MAX_PIN 69 + +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN 69 +#endif + +#define FIL_RUNOUT_PIN 10 + +// +// Steppers +// +#define X_STEP_PIN 25 +#define X_DIR_PIN 23 +#define X_ENABLE_PIN 27 // 44 + +#define Y_STEP_PIN 32 // 33 +#define Y_DIR_PIN 33 // 31, 32 +#define Y_ENABLE_PIN 31 // 32 + +#define Z_STEP_PIN 35 // 35 +#define Z_DIR_PIN 36 +#define Z_ENABLE_PIN 34 // 34 + +#define E0_STEP_PIN 42 +#define E0_DIR_PIN 43 +#define E0_ENABLE_PIN 37 + +#define E1_STEP_PIN 49 +#define E1_DIR_PIN 47 +#define E1_ENABLE_PIN 48 + +#define MOTOR_CURRENT_PWM_X_PIN 11 +#define MOTOR_CURRENT_PWM_Y_PIN 44 +#define MOTOR_CURRENT_PWM_Z_PIN 45 +#define MOTOR_CURRENT_PWM_E_PIN 46 + +// Motor current PWM conversion, PWM value = MotorCurrentSetting * 255 / range +#ifndef MOTOR_CURRENT_PWM_RANGE + #define MOTOR_CURRENT_PWM_RANGE 2000 +#endif +#define DEFAULT_PWM_MOTOR_CURRENT { 1300, 1300, 1250 } + +// +// Temperature Sensors +// +#define TEMP_0_PIN 8 // Analog Input D62 +#define TEMP_BED_PIN 10 // Analog Input D64 + +#define TEMP_CHAMBER_PIN 9 // Analog Input D63 + +// +// Heaters / Fans +// +#define HEATER_0_PIN 2 // PWM +#define HEATER_BED_PIN 4 // PWM +#define HEATER_CHAMBER_PIN 3 // PWM +#define FAN_PIN 7 // PWM + +// +// Misc. Functions +// +#define SDSS 53 +#define SD_DETECT_PIN 39 + +#if ENABLED(CASE_LIGHT_ENABLE) + #define CASE_LIGHT_PIN 8 +#endif + +#if ENABLED(PSU_CONTROL) + #define PS_ON_PIN 38 // UPS Module +#endif + +// +// LCD Controller +// + +#define BEEPER_PIN 18 + +#if HAS_WIRED_LCD + #define LCD_PINS_RS 20 + #define LCD_PINS_ENABLE 30 + #define LCD_PINS_D4 14 + #define LCD_PINS_D5 21 + #define LCD_PINS_D6 5 + #define LCD_PINS_D7 6 + #define BTN_EN1 40 + #define BTN_EN2 41 + #define BTN_ENC 19 +#endif + +///////////////////// SPARE HEADERS ////////////// + +/** + * J25 + * 1 D54 + * 2 D55 + * 3 D56 + * 4 D57 + * 5 D58 + * 6 D59 + * 7 D60 + * 8 D61 + +Hotend High Temp Connected : D12 +*/ diff --git a/Marlin/src/pins/mega/pins_LEAPFROG.h b/Marlin/src/pins/mega/pins_LEAPFROG.h new file mode 100644 index 0000000..9e6802b --- /dev/null +++ b/Marlin/src/pins/mega/pins_LEAPFROG.h @@ -0,0 +1,92 @@ +/** + * 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 + +/** + * Leapfrog Driver board pin assignments + */ + +#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) + #error "Oops! Select 'Mega 1280' or 'Mega 2560' in 'Tools > Board.'" +#endif + +#define BOARD_INFO_NAME "Leapfrog" + +// +// Limit Switches +// +#define X_MIN_PIN 47 +#define X_MAX_PIN 2 +#define Y_MIN_PIN 48 +#define Y_MAX_PIN 15 +#define Z_MIN_PIN 49 +#define Z_MAX_PIN -1 + +// +// Steppers +// +#define X_STEP_PIN 28 +#define X_DIR_PIN 63 +#define X_ENABLE_PIN 29 + +#define Y_STEP_PIN 14 // A6 +#define Y_DIR_PIN 15 // A0 +#define Y_ENABLE_PIN 39 + +#define Z_STEP_PIN 31 // A2 +#define Z_DIR_PIN 32 // A6 +#define Z_ENABLE_PIN 30 // A1 + +#define E0_STEP_PIN 34 // 34 +#define E0_DIR_PIN 35 // 35 +#define E0_ENABLE_PIN 33 // 33 + +#define E1_STEP_PIN 37 // 37 +#define E1_DIR_PIN 40 // 40 +#define E1_ENABLE_PIN 36 // 36 + +// +// Temperature Sensors +// +#define TEMP_0_PIN 13 // Analog Input (D27) +#define TEMP_1_PIN 15 // Analog Input (1) +#define TEMP_BED_PIN 14 // Analog Input (1,2 or I2C) + +// +// Heaters / Fans +// +#define HEATER_0_PIN 9 +#define HEATER_1_PIN 8 // 12 +#define HEATER_2_PIN 11 // 13 +#define HEATER_BED_PIN 10 // 14/15 + +#define FAN_PIN 7 + +// +// Misc. Functions +// +#define SDSS 11 +#define LED_PIN 13 +#define SOL1_PIN 16 +#define SOL2_PIN 17 + +/* Unused (1) (2) (3) 4 5 6 7 8 9 10 11 12 13 (14) (15) (16) 17 (18) (19) (20) (21) (22) (23) 24 (25) (26) (27) 28 (29) (30) (31) */ diff --git a/Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h b/Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h new file mode 100644 index 0000000..9c316aa --- /dev/null +++ b/Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h @@ -0,0 +1,115 @@ +/** + * 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 + +/** + * Leapfrog Xeed Driver board pin assignments + * + * This board is used by other Leapfrog printers in addition to the Xeed, + * such as the Creatr HS and Bolt. The pin assignments vary wildly between + * printer models. As such this file is currently specific to the Xeed. + */ + +#if NOT_TARGET(__AVR_ATmega2560__) + #error "Oops! Select 'Mega 2560' in 'Tools > Board.'" +#endif + +#define BOARD_INFO_NAME "Leapfrog Xeed 2015" + +// +// Limit Switches +// +#define X_STOP_PIN 47 // 'X Min' +#define Y_STOP_PIN 48 // 'Y Min' +#define Z_STOP_PIN 49 // 'Z Min' + +// +// Steppers +// The Xeed utilizes three Z-axis motors, which use the X, Y, and Z stepper connectors +// on the board. The X and Y steppers use external drivers, attached to signal-level +// Y-axis and X-axis connectors on the board, which map to distinct CPU pins from +// the on-board X/Y stepper drivers. +// + +// X-axis signal-level connector +#define X_STEP_PIN 65 +#define X_DIR_PIN 64 +#define X_ENABLE_PIN 66 // Not actually used on Xeed, could be repurposed + +// Y-axis signal-level connector +#define Y_STEP_PIN 23 +#define Y_DIR_PIN 22 +#define Y_ENABLE_PIN 24 // Not actually used on Xeed, could be repurposed + +// ZMOT connector (Front Right Z Motor) +#define Z_STEP_PIN 31 +#define Z_DIR_PIN 32 +#define Z_ENABLE_PIN 30 + +// XMOT connector (Rear Z Motor) +#define Z2_STEP_PIN 28 +#define Z2_DIR_PIN 63 +#define Z2_ENABLE_PIN 29 + +// YMOT connector (Front Left Z Motor) +#define Z3_STEP_PIN 14 +#define Z3_DIR_PIN 15 +#define Z3_ENABLE_PIN 39 + +// EMOT2 connector +#define E0_STEP_PIN 37 +#define E0_DIR_PIN 40 +#define E0_ENABLE_PIN 36 + +// EMOT connector +#define E1_STEP_PIN 34 +#define E1_DIR_PIN 35 +#define E1_ENABLE_PIN 33 + +// +// Filament runout +// +#define FIL_RUNOUT_PIN 42 // ROT2 Connector +#define FIL_RUNOUT2_PIN 44 // ROT1 Connector + +// +// Temperature Sensors +// +#define TEMP_0_PIN 15 // T3 Connector +#define TEMP_1_PIN 13 // T1 Connector +#define TEMP_BED_PIN 14 // BED Connector (Between T1 and T3) + +// +// Heaters / Fans +// +#define HEATER_0_PIN 8 // Misc Connector, pins 3 and 4 (Out2) +#define HEATER_1_PIN 9 // Misc Connector, pins 5 and 6 (Out3) +#define HEATER_BED_PIN 6 // Misc Connector, pins 9(-) and 10(+) (OutA) + +#define FAN_PIN 10 // Misc Connector, pins 7(-) and 8 (+) (Out4) + +#define LED_PIN 13 + +#define SOL1_PIN 7 // Misc Connector, pins 1(-) and 2(+) (Out1) + +// Door Closed Sensor +//#define DOOR_PIN 45 // HM1 Connector diff --git a/Marlin/src/pins/mega/pins_MEGACONTROLLER.h b/Marlin/src/pins/mega/pins_MEGACONTROLLER.h new file mode 100644 index 0000000..938ad82 --- /dev/null +++ b/Marlin/src/pins/mega/pins_MEGACONTROLLER.h @@ -0,0 +1,167 @@ +/** + * 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 + +/** + * Mega controller pin assignments + */ + +#if NOT_TARGET(__AVR_ATmega2560__) + #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" +#elif HOTENDS > 2 || E_STEPPERS > 2 + #error "Mega Controller supports up to 2 hotends / E-steppers. Comment out this line to continue." +#endif + +#define BOARD_INFO_NAME "Mega Controller" + +// +// Servos +// +#define SERVO0_PIN 30 +#define SERVO1_PIN 31 +#define SERVO2_PIN 32 +#define SERVO3_PIN 33 + +// +// Limit Switches +// +#define X_MIN_PIN 43 +#define X_MAX_PIN 42 +#define Y_MIN_PIN 38 +#define Y_MAX_PIN 41 +#define Z_MIN_PIN 40 +#define Z_MAX_PIN 37 + +// +// Z Probe (when not Z_MIN_PIN) +// +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN 37 +#endif + +// +// Steppers +// +#define X_STEP_PIN 62 // A8 +#define X_DIR_PIN 63 // A9 +#define X_ENABLE_PIN 61 // A7 + +#define Y_STEP_PIN 65 // A11 +#define Y_DIR_PIN 66 // A12 +#define Y_ENABLE_PIN 64 // A10 + +#define Z_STEP_PIN 68 // A14 +#define Z_DIR_PIN 69 // A15 +#define Z_ENABLE_PIN 67 // A13 + +#define E0_STEP_PIN 23 +#define E0_DIR_PIN 24 +#define E0_ENABLE_PIN 22 + +#define E1_STEP_PIN 26 +#define E1_DIR_PIN 27 +#define E1_ENABLE_PIN 25 + +// +// Temperature Sensors +// +#if TEMP_SENSOR_0 == -1 + #define TEMP_0_PIN 4 // Analog Input +#else + #define TEMP_0_PIN 0 // Analog Input +#endif + +#if TEMP_SENSOR_1 == -1 + #define TEMP_1_PIN 5 // Analog Input +#else + #define TEMP_1_PIN 2 // Analog Input +#endif + +#define TEMP_2_PIN 3 // Analog Input + +#if TEMP_SENSOR_BED == -1 + #define TEMP_BED_PIN 6 // Analog Input +#else + #define TEMP_BED_PIN 1 // Analog Input +#endif + +// +// Heaters / Fans +// +#define HEATER_0_PIN 29 +#define HEATER_1_PIN 34 +#define HEATER_BED_PIN 28 + +#ifndef FAN_PIN + #define FAN_PIN 39 +#endif +#define FAN1_PIN 35 +#define FAN2_PIN 36 + +#ifndef CONTROLLER_FAN_PIN + #define CONTROLLER_FAN_PIN FAN2_PIN +#endif + +#define FAN_SOFT_PWM + +// +// Misc. Functions +// +#define SDSS 53 +#define LED_PIN 13 + +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 2 +#endif + +// +// LCD / Controller +// +#if ENABLED(MINIPANEL) + + #define BEEPER_PIN 46 + // Pins for DOGM SPI LCD Support + #define DOGLCD_A0 47 + #define DOGLCD_CS 45 + #define LCD_BACKLIGHT_PIN 44 // backlight LED on PA3 + + #define KILL_PIN 12 + // GLCD features + // Uncomment screen orientation + //#define LCD_SCREEN_ROT_90 + //#define LCD_SCREEN_ROT_180 + //#define LCD_SCREEN_ROT_270 + + #define BTN_EN1 48 + #define BTN_EN2 11 + #define BTN_ENC 10 + + #define SD_DETECT_PIN 49 + +#endif // MINIPANEL + +// +// M3/M4/M5 - Spindle/Laser Control +// +#define SPINDLE_LASER_PWM_PIN 6 // Hardware PWM +#define SPINDLE_LASER_ENA_PIN 7 // Pullup! +#define SPINDLE_DIR_PIN 8 diff --git a/Marlin/src/pins/mega/pins_MEGATRONICS.h b/Marlin/src/pins/mega/pins_MEGATRONICS.h new file mode 100644 index 0000000..f813366 --- /dev/null +++ b/Marlin/src/pins/mega/pins_MEGATRONICS.h @@ -0,0 +1,134 @@ +/** + * 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 + +/** + * MegaTronics pin assignments + */ + +#if NOT_TARGET(__AVR_ATmega2560__) + #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" +#endif + +#define BOARD_INFO_NAME "Megatronics" +// +// Limit Switches +// +#define X_MIN_PIN 41 +#define X_MAX_PIN 37 +#define Y_MIN_PIN 14 +#define Y_MAX_PIN 15 +#define Z_MIN_PIN 18 +#define Z_MAX_PIN 19 + +// +// Z Probe (when not Z_MIN_PIN) +// +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN 19 +#endif + +// +// Steppers +// +#define X_STEP_PIN 26 +#define X_DIR_PIN 28 +#define X_ENABLE_PIN 24 + +#define Y_STEP_PIN 60 // A6 +#define Y_DIR_PIN 61 // A7 +#define Y_ENABLE_PIN 22 + +#define Z_STEP_PIN 54 // A0 +#define Z_DIR_PIN 55 // A1 +#define Z_ENABLE_PIN 56 // A2 + +#define E0_STEP_PIN 31 +#define E0_DIR_PIN 32 +#define E0_ENABLE_PIN 38 + +#define E1_STEP_PIN 34 +#define E1_DIR_PIN 36 +#define E1_ENABLE_PIN 30 + +// +// Temperature Sensors +// +#if TEMP_SENSOR_0 == -1 + #define TEMP_0_PIN 8 // Analog Input +#else + #define TEMP_0_PIN 13 // Analog Input +#endif +#define TEMP_1_PIN 15 // Analog Input +#define TEMP_BED_PIN 14 // Analog Input + +// +// Heaters / Fans +// +#define HEATER_0_PIN 9 +#define HEATER_1_PIN 8 +#define HEATER_BED_PIN 10 + +#ifndef FAN_PIN + #define FAN_PIN 7 // IO pin. Buffer needed +#endif + +// +// Misc. Functions +// +#define SDSS 53 +#define LED_PIN 13 +#define PS_ON_PIN 12 + +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 2 +#endif + +// +// LCD / Controller +// +#define BEEPER_PIN 33 + +#if IS_ULTRA_LCD && IS_NEWPANEL + + #define LCD_PINS_RS 16 + #define LCD_PINS_ENABLE 17 + #define LCD_PINS_D4 23 + #define LCD_PINS_D5 25 + #define LCD_PINS_D6 27 + #define LCD_PINS_D7 29 + + // Buttons directly attached to AUX-2 + #define BTN_EN1 59 + #define BTN_EN2 64 + #define BTN_ENC 43 + + #define SD_DETECT_PIN -1 // RAMPS doesn't use this + +#endif // IS_ULTRA_LCD && IS_NEWPANEL + +// +// M3/M4/M5 - Spindle/Laser Control +// +#define SPINDLE_LASER_PWM_PIN 3 // Hardware PWM +#define SPINDLE_LASER_ENA_PIN 4 // Pullup! +#define SPINDLE_DIR_PIN 11 diff --git a/Marlin/src/pins/mega/pins_MEGATRONICS_2.h b/Marlin/src/pins/mega/pins_MEGATRONICS_2.h new file mode 100644 index 0000000..ef4605e --- /dev/null +++ b/Marlin/src/pins/mega/pins_MEGATRONICS_2.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 <https://www.gnu.org/licenses/>. + * + */ +#pragma once + +/** + * MegaTronics v2.0 pin assignments + */ + +#if NOT_TARGET(__AVR_ATmega2560__) + #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" +#endif + +#define BOARD_INFO_NAME "Megatronics v2.0" +// +// Limit Switches +// +#define X_MIN_PIN 37 +#define X_MAX_PIN 40 +#define Y_MIN_PIN 41 +#define Y_MAX_PIN 38 +#define Z_MIN_PIN 18 +#define Z_MAX_PIN 19 + +// +// Z Probe (when not Z_MIN_PIN) +// +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN 19 +#endif + +// +// Steppers +// +#define X_STEP_PIN 26 +#define X_DIR_PIN 27 +#define X_ENABLE_PIN 25 + +#define Y_STEP_PIN 4 // A6 +#define Y_DIR_PIN 54 // A0 +#define Y_ENABLE_PIN 5 + +#define Z_STEP_PIN 56 // A2 +#define Z_DIR_PIN 60 // A6 +#define Z_ENABLE_PIN 55 // A1 + +#define E0_STEP_PIN 35 +#define E0_DIR_PIN 36 +#define E0_ENABLE_PIN 34 + +#define E1_STEP_PIN 29 +#define E1_DIR_PIN 39 +#define E1_ENABLE_PIN 28 + +#define E2_STEP_PIN 23 // ? schematic says 24 +#define E2_DIR_PIN 24 // ? schematic says 23 +#define E2_ENABLE_PIN 22 + +// +// Temperature Sensors +// +#if TEMP_SENSOR_0 == -1 + #define TEMP_0_PIN 4 // Analog Input +#else + #define TEMP_0_PIN 13 // Analog Input +#endif + +#if TEMP_SENSOR_1 == -1 + #define TEMP_1_PIN 8 // Analog Input +#else + #define TEMP_1_PIN 15 // Analog Input +#endif + +#if TEMP_SENSOR_BED == -1 + #define TEMP_BED_PIN 8 // Analog Input +#else + #define TEMP_BED_PIN 14 // Analog Input +#endif + +// +// Heaters / Fans +// +#define HEATER_0_PIN 9 +#define HEATER_1_PIN 8 +#define HEATER_BED_PIN 10 + +#ifndef FAN_PIN + #define FAN_PIN 7 +#endif +#define FAN1_PIN 6 + +// +// Misc. Functions +// +#define SDSS 53 +#define LED_PIN 13 +#define PS_ON_PIN 12 + +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 2 +#endif + +// +// M3/M4/M5 - Spindle/Laser Control +// +#define SPINDLE_LASER_PWM_PIN 3 // Hardware PWM +#define SPINDLE_LASER_ENA_PIN 16 // Pullup! +#define SPINDLE_DIR_PIN 11 + +// +// LCD / Controller +// +#define BEEPER_PIN 64 + +#if HAS_WIRED_LCD + + #define LCD_PINS_RS 14 + #define LCD_PINS_ENABLE 15 + #define LCD_PINS_D4 30 + #define LCD_PINS_D5 31 + #define LCD_PINS_D6 32 + #define LCD_PINS_D7 33 + + #if IS_NEWPANEL + // Buttons are directly attached using keypad + #define BTN_EN1 61 + #define BTN_EN2 59 + #define BTN_ENC 43 + #else + // Buttons attached to shift register of reprapworld keypad v1.1 + #define SHIFT_CLK_PIN 63 + #define SHIFT_LD_PIN 42 + #define SHIFT_OUT_PIN 17 + #define SHIFT_EN_PIN 17 + #endif + +#endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/mega/pins_MEGATRONICS_3.h b/Marlin/src/pins/mega/pins_MEGATRONICS_3.h new file mode 100644 index 0000000..9f85d46 --- /dev/null +++ b/Marlin/src/pins/mega/pins_MEGATRONICS_3.h @@ -0,0 +1,198 @@ +/** + * 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 + +/** + * MegaTronics v3.0 / v3.1 / v3.2 pin assignments + */ + +#if NOT_TARGET(__AVR_ATmega2560__) + #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" +#endif + +#if MB(MEGATRONICS_32) + #define BOARD_INFO_NAME "Megatronics v3.2" +#elif MB(MEGATRONICS_31) + #define BOARD_INFO_NAME "Megatronics v3.1" +#else + #define BOARD_INFO_NAME "Megatronics v3.0" +#endif + +// +// Servos +// +#define SERVO0_PIN 46 // AUX3-6 +#define SERVO1_PIN 47 // AUX3-5 +#define SERVO2_PIN 48 // AUX3-4 +#define SERVO3_PIN 49 // AUX3-3 + +// +// Limit Switches +// +#define X_MIN_PIN 37 // No INT +#define X_MAX_PIN 40 // No INT +#define Y_MIN_PIN 41 // No INT +#define Y_MAX_PIN 38 // No INT +#define Z_MIN_PIN 18 // No INT +#define Z_MAX_PIN 19 // No INT + +// +// Z Probe (when not Z_MIN_PIN) +// +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN 19 +#endif + +// +// Steppers +// +#define X_STEP_PIN 58 +#define X_DIR_PIN 57 +#define X_ENABLE_PIN 59 + +#define Y_STEP_PIN 5 +#define Y_DIR_PIN 17 +#define Y_ENABLE_PIN 4 + +#define Z_STEP_PIN 16 +#define Z_DIR_PIN 11 +#define Z_ENABLE_PIN 3 + +#define E0_STEP_PIN 28 +#define E0_DIR_PIN 27 +#define E0_ENABLE_PIN 29 + +#define E1_STEP_PIN 25 +#define E1_DIR_PIN 24 +#define E1_ENABLE_PIN 26 + +#define E2_STEP_PIN 22 +#define E2_DIR_PIN 60 +#define E2_ENABLE_PIN 23 + +// +// Temperature Sensors +// +#if TEMP_SENSOR_0 == -1 + #define TEMP_0_PIN 11 // Analog Input +#else + #define TEMP_0_PIN 15 // Analog Input +#endif +#if TEMP_SENSOR_1 == -1 + #define TEMP_1_PIN 10 // Analog Input +#else + #define TEMP_1_PIN 13 // Analog Input +#endif +#if TEMP_SENSOR_2 == -1 + #define TEMP_2_PIN 9 // Analog Input +#else + #define TEMP_2_PIN 12 // Analog Input +#endif +#if TEMP_SENSOR_BED == -1 + #define TEMP_BED_PIN 8 // Analog Input +#else + #define TEMP_BED_PIN 14 // Analog Input +#endif + +// +// Heaters / Fans +// +#define HEATER_0_PIN 2 +#define HEATER_1_PIN 9 +#define HEATER_2_PIN 8 +#define HEATER_BED_PIN 10 + +#ifndef FAN_PIN + #define FAN_PIN 6 +#endif +#define FAN1_PIN 7 + +// +// Misc. Functions +// +#define SDSS 53 +#define LED_PIN 13 +#define PS_ON_PIN 12 + +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 45 // Try the keypad connector +#endif + +// +// LCD / Controller +// +#define BEEPER_PIN 61 + +#define BTN_EN1 44 +#define BTN_EN2 45 +#define BTN_ENC 33 + +#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) + + #define LCD_PINS_RS 56 // CS chip select / SS chip slave select + #define LCD_PINS_ENABLE 51 // SID (MOSI) + #define LCD_PINS_D4 52 // SCK (CLK) clock + #define SD_DETECT_PIN 35 + +#else + + #define LCD_PINS_RS 32 + #define LCD_PINS_ENABLE 31 + #define LCD_PINS_D4 14 + #define LCD_PINS_D5 30 + #define LCD_PINS_D6 39 + #define LCD_PINS_D7 15 + + #define SHIFT_CLK_PIN 43 + #define SHIFT_LD_PIN 35 + #define SHIFT_OUT_PIN 34 + #define SHIFT_EN_PIN 44 + + #if MB(MEGATRONICS_31, MEGATRONICS_32) + #define SD_DETECT_PIN 56 + #endif + +#endif + +// +// M3/M4/M5 - Spindle/Laser Control +// +#if DISABLED(REPRAPWORLD_KEYPAD) // try to use the keypad connector first + #define SPINDLE_LASER_PWM_PIN 44 // Hardware PWM + #define SPINDLE_LASER_ENA_PIN 43 // Pullup! + #define SPINDLE_DIR_PIN 42 +#elif EXTRUDERS <= 2 + // Hijack the last extruder so that we can get the PWM signal off the Y breakout + // Move Y to the E2 plug. This makes dual Y steppers harder + #undef Y_ENABLE_PIN // 4 + #undef Y_STEP_PIN // 5 + #undef Y_DIR_PIN // 17 + #undef E2_ENABLE_PIN // 23 + #undef E2_STEP_PIN // 22 + #undef E2_DIR_PIN // 60 + #define Y_ENABLE_PIN 23 + #define Y_STEP_PIN 22 + #define Y_DIR_PIN 60 + #define SPINDLE_LASER_PWM_PIN 4 // Hardware PWM + #define SPINDLE_LASER_ENA_PIN 17 // Pullup! + #define SPINDLE_DIR_PIN 5 +#endif diff --git a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h new file mode 100644 index 0000000..b260a27 --- /dev/null +++ b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h @@ -0,0 +1,304 @@ +/** + * 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 + +/** + * Mightyboard Rev.E pin assignments + * also works for Rev D boards. It's all rev E despite what the silk screen says + */ + +/** + * Rev B 2 JAN 2017 + * + * Added pin definitions for: + * M3, M4 & M5 spindle control commands + * case light + * + * Corrected pin assignment for EX2_HEAT_PIN pin. Changed it from 9 to 11. The port + * number (B5) agrees with the schematic but B5 is assigned to logical pin 11. + */ + +#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) + #error "Oops! Select 'Mega 1280' or 'Mega 2560' in 'Tools > Board.'" +#endif + +#define BOARD_INFO_NAME "Mightyboard" +#define DEFAULT_MACHINE_NAME "MB Replicator" + +// +// Servos +// +#define SERVO0_PIN 36 // C1 (1280-EX1) +#define SERVO1_PIN 37 // C0 (1280-EX2) +#define SERVO2_PIN 40 // G1 (1280-EX3) +#define SERVO3_PIN 41 // G0 (1280-EX4) + +// +// Limit Switches +// +#define X_MIN_PIN 49 // L0 +#define X_MAX_PIN 48 // L1 +#define Y_MIN_PIN 47 // L2 +#define Y_MAX_PIN 46 // L3 +#define Z_MIN_PIN 43 // L6 +#define Z_MAX_PIN 42 // L7 + +// +// Z Probe (when not Z_MIN_PIN) +// +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN 42 +#endif + +// +// Filament Runout Pins +// +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN 49 +#endif +#ifndef FIL_RUNOUT2_PIN + #define FIL_RUNOUT2_PIN 47 +#endif + +// +// Steppers +// +#define X_STEP_PIN 55 // F1 +#define X_DIR_PIN 54 // F0 +#define X_ENABLE_PIN 56 // F2 + +#define Y_STEP_PIN 59 // F5 +#define Y_DIR_PIN 58 // F4 +#define Y_ENABLE_PIN 60 // F6 + +#define Z_STEP_PIN 63 // K1 +#define Z_DIR_PIN 62 // K0 +#define Z_ENABLE_PIN 64 // K2 + +#define E0_STEP_PIN 25 // A3 +#define E0_DIR_PIN 24 // A2 +#define E0_ENABLE_PIN 26 // A4 + +#define E1_STEP_PIN 29 // A7 +#define E1_DIR_PIN 28 // A6 +#define E1_ENABLE_PIN 39 // G2 + +// +// I2C Digipots - MCP4018 +// Address 5E (2F << 1) +// Set from 0 - 127 with stop bit. +// (Ex. 3F << 1 | 1) +// +#define DIGIPOTS_I2C_SCL 76 // J5 +#define DIGIPOTS_I2C_SDA_X 57 // F3 +#define DIGIPOTS_I2C_SDA_Y 61 // F7 +#define DIGIPOTS_I2C_SDA_Z 65 // K3 +#define DIGIPOTS_I2C_SDA_E0 27 // A5 +#define DIGIPOTS_I2C_SDA_E1 77 // J6 + +#ifndef DIGIPOT_I2C_ADDRESS_A + #define DIGIPOT_I2C_ADDRESS_A 0x2F // unshifted slave address (5E <- 2F << 1) +#endif +#define DIGIPOT_ENABLE_I2C_PULLUPS // MightyBoard doesn't have hardware I2C pin pull-ups. + +// +// Temperature Sensors +// +// K7 - 69 / ADC15 - 15 +#define TEMP_BED_PIN 15 + +// SPI for Max6675 or Max31855 Thermocouple +// Uses a separate SPI bus +// +// 3 E5 DO (SO) +// 5 E3 CS1 +// 2 E4 CS2 +// 78 E2 SCK +// +#define THERMO_SCK_PIN 78 // E2 +#define THERMO_DO_PIN 3 // E5 +#define THERMO_CS1_PIN 5 // E3 +#define THERMO_CS2_PIN 2 // E4 + +#define MAX6675_SS_PIN THERMO_CS1_PIN +#define MAX6675_SS2_PIN THERMO_CS2_PIN +#define MAX6675_SCK_PIN THERMO_SCK_PIN +#define MAX6675_DO_PIN THERMO_DO_PIN + +// +// Augmentation for auto-assigning plugs +// +// Two thermocouple connectors allows for either +// 2 extruders or 1 extruder and a heated bed. +// With no heated bed, an additional 24V fan is possible. +// + +// Labels from the schematic: +#define EX1_HEAT_PIN 6 // H3 +#define EX1_FAN_PIN 7 // H4 +#define EX2_HEAT_PIN 11 // B5 +#define EX2_FAN_PIN 12 // B6 +#define HBP_PIN 45 // L4 +#define EXTRA_FET_PIN 44 // L5 + +#if HAS_MULTI_HOTEND + #if TEMP_SENSOR_BED + #define IS_EEB + #else + #define IS_EEF + #endif +#elif TEMP_SENSOR_BED + #define IS_EFB +#else + #define IS_EFF +#endif + +// +// Heaters / Fans (24V) +// +#define HEATER_0_PIN EX1_HEAT_PIN + +#if ENABLED(IS_EFB) // Hotend, Fan, Bed + #define HEATER_BED_PIN HBP_PIN +#elif ENABLED(IS_EEF) // Hotend, Hotend, Fan + #define HEATER_1_PIN EX2_HEAT_PIN +#elif ENABLED(IS_EEB) // Hotend, Hotend, Bed + #define HEATER_1_PIN EX2_HEAT_PIN + #define HEATER_BED_PIN HBP_PIN +#elif ENABLED(IS_EFF) // Hotend, Fan, Fan + #define FAN1_PIN HBP_PIN +#endif + +#ifndef FAN_PIN + #if EITHER(IS_EFB, IS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan + #define FAN_PIN EX2_HEAT_PIN + #elif EITHER(IS_EEF, IS_SF) // Hotend, Hotend, Fan or Spindle, Fan + #define FAN_PIN HBP_PIN + #else + #define FAN_PIN EXTRA_FET_PIN + #endif +#endif + +#ifndef CONTROLLER_FAN_PIN + #define CONTROLLER_FAN_PIN EX2_FAN_PIN +#endif + +// +// Misc. Functions +// +#define LED_PIN 13 // B7 +#define CUTOFF_RESET_PIN 16 // H1 +#define CUTOFF_TEST_PIN 17 // H0 +#define CUTOFF_SR_CHECK_PIN 70 // G4 (TOSC1) + +// +// LCD / Controller +// +#if HAS_WIRED_LCD + + #if IS_RRD_FG_SC + + #define LCD_PINS_RS 33 // C4: LCD-STROBE + #define LCD_PINS_ENABLE 72 // J2: LEFT + #define LCD_PINS_D4 35 // C2: LCD-CLK + #define LCD_PINS_D5 32 // C5: RLED + #define LCD_PINS_D6 34 // C3: LCD-DATA + #define LCD_PINS_D7 31 // C6: GLED + + #define BTN_EN2 75 // J4, UP + #define BTN_EN1 73 // J3, DOWN + //STOP button connected as KILL_PIN + #define KILL_PIN 14 // J1, RIGHT + //KILL - not connected + + #define BEEPER_PIN 8 // H5, SD_WP + + //on board leds + #define STAT_LED_RED_LED SERVO0_PIN // C1 (1280-EX1, DEBUG2) + #define STAT_LED_BLUE_PIN SERVO1_PIN // C0 (1280-EX2, DEBUG3) + + #else + // Replicator uses a 3-wire SR controller with HD44780 + #define SR_DATA_PIN 34 // C3 + #define SR_CLK_PIN 35 // C2 + #define SR_STROBE_PIN 33 // C4 + + #define BTN_UP 75 // J4 + #define BTN_DWN 73 // J3 + #define BTN_LFT 72 // J2 + #define BTN_RT 14 // J1 + + // Disable encoder + #undef BTN_EN1 + #undef BTN_EN2 + + #define BEEPER_PIN 4 // G5 + + #define STAT_LED_RED_PIN 32 // C5 + #define STAT_LED_BLUE_PIN 31 // C6 (Actually green) + + #endif + + #define BTN_CENTER 15 // J0 + #define BTN_ENC BTN_CENTER + +#endif // HAS_WIRED_LCD + +// +// SD Card +// +#define SDSS 53 // B0 +#define SD_DETECT_PIN 9 // H6 + +// +// TMC 220x +// +#if HAS_TMC_UART + /** + * TMC220x stepper drivers + * + * Hardware serial communication ports. + * If undefined software serial is used according to the pins below + */ + #define X_HARDWARE_SERIAL Serial2 + #define Y_HARDWARE_SERIAL Serial1 + + /** + * Software serial + */ + + #define X_SERIAL_TX_PIN 16 + #define X_SERIAL_RX_PIN 17 + + #define Y_SERIAL_TX_PIN 18 + #define Y_SERIAL_RX_PIN 19 + + #define Z_SERIAL_TX_PIN 41 + #define Z_SERIAL_RX_PIN 66 + + #define E0_SERIAL_TX_PIN 40 + #define E0_SERIAL_RX_PIN 67 + + #define E1_SERIAL_TX_PIN 37 + #define E1_SERIAL_RX_PIN 68 + +#endif diff --git a/Marlin/src/pins/mega/pins_MINITRONICS.h b/Marlin/src/pins/mega/pins_MINITRONICS.h new file mode 100644 index 0000000..bbe7464 --- /dev/null +++ b/Marlin/src/pins/mega/pins_MINITRONICS.h @@ -0,0 +1,142 @@ +/** + * 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 + +/** + * Minitronics v1.0/1.1 pin assignments + */ + +/** + * Rev B 2 JAN 2017 + * + * Added pin definitions for M3, M4 & M5 spindle control commands + */ + +#if NOT_TARGET(__AVR_ATmega1281__) + #error "Oops! Select 'Minitronics' in 'Tools > Board.'" +#elif HOTENDS > 2 || E_STEPPERS > 2 + #error "Minitronics supports up to 2 hotends / E-steppers. Comment out this line to continue." +#endif + +#define BOARD_INFO_NAME "Minitronics v1.0/1.1" +// +// Limit Switches +// +#define X_MIN_PIN 5 +#define X_MAX_PIN 2 +#define Y_MIN_PIN 2 +#define Y_MAX_PIN 15 +#define Z_MIN_PIN 6 +#define Z_MAX_PIN -1 + +// +// Steppers +// +#define X_STEP_PIN 48 +#define X_DIR_PIN 47 +#define X_ENABLE_PIN 49 + +#define Y_STEP_PIN 39 // A6 +#define Y_DIR_PIN 40 // A0 +#define Y_ENABLE_PIN 38 + +#define Z_STEP_PIN 42 // A2 +#define Z_DIR_PIN 43 // A6 +#define Z_ENABLE_PIN 41 // A1 + +#define E0_STEP_PIN 45 +#define E0_DIR_PIN 44 +#define E0_ENABLE_PIN 27 + +#define E1_STEP_PIN 36 +#define E1_DIR_PIN 35 +#define E1_ENABLE_PIN 37 + +// +// Temperature Sensors +// +#define TEMP_0_PIN 7 // Analog Input +#define TEMP_1_PIN 6 // Analog Input +#define TEMP_BED_PIN 6 // Analog Input + +// +// Heaters / Fans +// +#define HEATER_0_PIN 7 // EXTRUDER 1 +#define HEATER_1_PIN 8 // EXTRUDER 2 +#define HEATER_BED_PIN 3 // BED + +#ifndef FAN_PIN + #define FAN_PIN 9 +#endif + +// +// Misc. Functions +// +#define SDSS 16 +#define LED_PIN 46 + +// +// LCD / Controller +// +#define BEEPER_PIN -1 + +#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) + + #define LCD_PINS_RS 15 // CS chip select /SS chip slave select + #define LCD_PINS_ENABLE 11 // SID (MOSI) + #define LCD_PINS_D4 10 // SCK (CLK) clock + + #define BTN_EN1 18 + #define BTN_EN2 17 + #define BTN_ENC 25 + + #define SD_DETECT_PIN 30 + +#else + + #define LCD_PINS_RS -1 + #define LCD_PINS_ENABLE -1 + + // Buttons are directly attached using keypad + #define BTN_EN1 -1 + #define BTN_EN2 -1 + #define BTN_ENC -1 + + #define SD_DETECT_PIN -1 // Minitronics doesn't use this +#endif + +// +// M3/M4/M5 - Spindle/Laser Control +// +#if HAS_CUTTER // assumes we're only doing CNC work (no 3D printing) + #undef HEATER_BED_PIN + #undef TEMP_BED_PIN // need to free up some pins but also need to + #undef TEMP_0_PIN // re-assign them (to unused pins) because Marlin + #undef TEMP_1_PIN // requires the presence of certain pins or else it + #define HEATER_BED_PIN 4 // won't compile + #define TEMP_BED_PIN 50 + #define TEMP_0_PIN 51 + #define SPINDLE_LASER_ENA_PIN 52 // using A6 because it already has a pullup + #define SPINDLE_LASER_PWM_PIN 3 // WARNING - LED & resistor pull up to +12/+24V stepper voltage + #define SPINDLE_DIR_PIN 53 +#endif diff --git a/Marlin/src/pins/mega/pins_OVERLORD.h b/Marlin/src/pins/mega/pins_OVERLORD.h new file mode 100644 index 0000000..18bb1f2 --- /dev/null +++ b/Marlin/src/pins/mega/pins_OVERLORD.h @@ -0,0 +1,144 @@ +/** + * 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 + +/** + * Dreammaker Overlord v1.1 pin assignments + */ + +#if NOT_TARGET(__AVR_ATmega2560__) + #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" +#elif HOTENDS > 2 || E_STEPPERS > 2 + #error "Overlord Controller supports up to 2 hotends / E-steppers. Comment out this line to continue." +#endif + +#define BOARD_INFO_NAME "OVERLORD" +#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME + +// +// Limit Switches +// +#define X_STOP_PIN 24 +#define Y_STOP_PIN 28 +#define Z_MIN_PIN 46 +#define Z_MAX_PIN 32 + +// +// Z Probe (when not Z_MIN_PIN) +// +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN 46 // JP4, Tfeed1 +#endif + +#if ENABLED(FILAMENT_RUNOUT_SENSOR) + #define FIL_RUNOUT_PIN 44 // JP3, Tfeed2 +#endif + +// +// Steppers +// +#define X_STEP_PIN 25 +#define X_DIR_PIN 23 +#define X_ENABLE_PIN 27 + +#define Y_STEP_PIN 31 +#define Y_DIR_PIN 33 +#define Y_ENABLE_PIN 29 + +#define Z_STEP_PIN 37 +#define Z_DIR_PIN 39 +#define Z_ENABLE_PIN 35 + +#define E0_STEP_PIN 43 +#define E0_DIR_PIN 45 +#define E0_ENABLE_PIN 41 + +#define E1_STEP_PIN 49 +#define E1_DIR_PIN 47 +#define E1_ENABLE_PIN 48 + +// +// Temperature Sensors +// +#define TEMP_0_PIN 8 // Analog Input +#define TEMP_1_PIN 9 // Analog Input - Redundant temp sensor +#define TEMP_2_PIN 12 // Analog Input +#define TEMP_3_PIN 14 // Analog Input +#define TEMP_BED_PIN 10 // Analog Input + +// +// Heaters / Fans +// +#define HEATER_0_PIN 2 +#define HEATER_1_PIN 3 +#define HEATER_BED_PIN 4 + +#define FAN_PIN 7 // material cooling fan + +// +// SD Card +// +#define SDSS 53 +#define SD_DETECT_PIN 38 + +// +// Misc. Functions +// +#define LED_PIN 13 // On PCB status led +#define PS_ON_PIN 12 // For stepper/heater/fan power. Active HIGH. +#define POWER_LOSS_PIN 34 // Power check - whether hotends/steppers/fans have power + +#if ENABLED(BATTERY_STATUS_AVAILABLE) + #undef BATTERY_STATUS_PIN + #define BATTERY_STATUS_PIN 26 // Status of power loss battery, whether it is charged (low) or charging (high) +#endif +#if ENABLED(INPUT_VOLTAGE_AVAILABLE) + #undef VOLTAGE_DETECTION_PIN + #define VOLTAGE_DETECTION_PIN 11 // Analog Input - ADC Voltage level of main input +#endif + +// +// LCD / Controller +// +#if HAS_MARLINUI_U8GLIB + // OVERLORD OLED pins + #define LCD_PINS_RS 20 + #define LCD_PINS_D5 21 + #define LCD_PINS_ENABLE 15 + #define LCD_PINS_D4 14 + #define LCD_PINS_D6 5 + #define LCD_PINS_D7 6 + #ifndef LCD_RESET_PIN + #define LCD_RESET_PIN 5 // LCD_PINS_D6 + #endif +#endif + +#if IS_NEWPANEL + #define BTN_ENC 16 // Enter Pin + #define BTN_UP 19 // Button UP Pin + #define BTN_DWN 17 // Button DOWN Pin +#endif + +// Additional connectors/pins on the Overlord V1.X board +#define PCB_VERSION_PIN 22 +#define APPROACH_PIN 11 // JP7, Tpd +#define GATE_PIN 36 // Threshold, JP6, Tg diff --git a/Marlin/src/pins/mega/pins_PICA.h b/Marlin/src/pins/mega/pins_PICA.h new file mode 100644 index 0000000..ff4d3e8 --- /dev/null +++ b/Marlin/src/pins/mega/pins_PICA.h @@ -0,0 +1,153 @@ +/** + * 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/>. + * + */ + +/** + * Arduino Mega with PICA pin assignments + * + * PICA is Power, Interface, and Control Adapter and is open source hardware. + * See https://github.com/mjrice/PICA for schematics etc. + * + * Applies to PICA, PICA_REVB + */ + +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "PICA" +#endif + +/* +// Note that these are the "pins" that correspond to the analog inputs on the arduino mega. +// These are not the same as the physical pin numbers + AD0 = 54; AD1 = 55; AD2 = 56; AD3 = 57; + AD4 = 58; AD5 = 59; AD6 = 60; AD7 = 61; + AD8 = 62; AD9 = 63; AD10 = 64; AD11 = 65; + AD12 = 66; AD13 = 67; AD14 = 68; AD15 = 69; +*/ + +#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) + #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." +#endif + +// +// Servos +// +#define SERVO0_PIN 3 +#define SERVO1_PIN 4 +#define SERVO2_PIN 5 +// +// Limit Switches +// +#define X_MIN_PIN 14 +#define X_MAX_PIN 15 +#define Y_MIN_PIN 16 +#define Y_MAX_PIN 17 +#define Z_MIN_PIN 23 +#define Z_MAX_PIN 22 + +// +// Steppers +// +#define X_STEP_PIN 55 +#define X_DIR_PIN 54 +#define X_ENABLE_PIN 60 + +#define Y_STEP_PIN 57 +#define Y_DIR_PIN 56 +#define Y_ENABLE_PIN 61 + +#define Z_STEP_PIN 59 +#define Z_DIR_PIN 58 +#define Z_ENABLE_PIN 62 + +#define E0_STEP_PIN 67 +#define E0_DIR_PIN 24 +#define E0_ENABLE_PIN 26 + +#define E1_STEP_PIN 68 +#define E1_DIR_PIN 28 +#define E1_ENABLE_PIN 27 + +// +// Temperature Sensors +// +#define TEMP_0_PIN 9 // Analog Input +#define TEMP_1_PIN 10 +#define TEMP_BED_PIN 10 +#define TEMP_2_PIN 11 +#define TEMP_3_PIN 12 + +// +// Heaters / Fans +// +#ifndef HEATER_0_PIN + #define HEATER_0_PIN 10 // E0 +#endif +#ifndef HEATER_1_PIN + #define HEATER_1_PIN 2 // E1 +#endif +#define HEATER_BED_PIN 8 // HEAT-BED + +#ifndef FAN_PIN + #define FAN_PIN 9 +#endif +#ifndef FAN_2_PIN + #define FAN_2_PIN 7 +#endif + +#define SDPOWER_PIN -1 +#define LED_PIN -1 +#define PS_ON_PIN -1 +#define KILL_PIN -1 + +#define SSR_PIN 6 + +// SPI for Max6675 or Max31855 Thermocouple +#if DISABLED(SDSUPPORT) + #define MAX6675_SS_PIN 66 // Don't use 53 if using Display/SD card +#else + #define MAX6675_SS_PIN 66 // Don't use 49 (SD_DETECT_PIN) +#endif + +// +// SD Support +// +#define SD_DETECT_PIN 49 +#define SDSS 53 + +// +// LCD / Controller +// +#define BEEPER_PIN 29 + +#if HAS_WIRED_LCD + #define LCD_PINS_RS 33 + #define LCD_PINS_ENABLE 30 + #define LCD_PINS_D4 35 + #define LCD_PINS_D5 32 + #define LCD_PINS_D6 37 + #define LCD_PINS_D7 36 + + #define BTN_EN1 47 + #define BTN_EN2 48 + #define BTN_ENC 31 + + #define LCD_SDSS 53 +#endif diff --git a/Marlin/src/pins/mega/pins_PICAOLD.h b/Marlin/src/pins/mega/pins_PICAOLD.h new file mode 100644 index 0000000..f53a4cd --- /dev/null +++ b/Marlin/src/pins/mega/pins_PICAOLD.h @@ -0,0 +1,28 @@ +/** + * 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/>. + * + */ + +#define HEATER_0_PIN 9 // E0 +#define HEATER_1_PIN 10 // E1 +#define FAN_PIN 11 +#define FAN2_PIN 12 + +#include "pins_PICA.h" diff --git a/Marlin/src/pins/mega/pins_SILVER_GATE.h b/Marlin/src/pins/mega/pins_SILVER_GATE.h new file mode 100644 index 0000000..41cbe5e --- /dev/null +++ b/Marlin/src/pins/mega/pins_SILVER_GATE.h @@ -0,0 +1,99 @@ +/** + * 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(__AVR_ATmega1281__, __AVR_ATmega2561__) + #error "Oops! Select 'Silvergate' in 'Tools > Board.'" +#endif + +#define BOARD_INFO_NAME "Silver Gate" + +#define X_STEP_PIN 43 +#define X_DIR_PIN 44 +#define X_ENABLE_PIN 42 +#define X_MIN_PIN 31 +#define X_MAX_PIN 34 + +#define Y_STEP_PIN 40 +#define Y_DIR_PIN 41 +#define Y_ENABLE_PIN 39 +#define Y_MIN_PIN 32 +#define Y_MAX_PIN 35 + +#define Z_STEP_PIN 13 +#define Z_DIR_PIN 38 +#define Z_ENABLE_PIN 14 +#define Z_MIN_PIN 33 +#define Z_MAX_PIN 36 + +#define E0_STEP_PIN 27 +#define E0_DIR_PIN 37 +#define E0_ENABLE_PIN 45 + +#define SDSS 16 + +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN 34 // X_MAX unless overridden +#endif + +#ifndef FAN_PIN + #define FAN_PIN 5 +#endif + +#define HEATER_0_PIN 7 + +#ifndef E0_AUTO_FAN_PIN + #define E0_AUTO_FAN_PIN 3 +#endif + +#define CONTROLLER_FAN_PIN 2 + +#define TEMP_0_PIN 7 // Analog Input + +#define HEATER_BED_PIN 8 +#define TEMP_BED_PIN 6 + +#if HAS_MARLINUI_U8GLIB + #if ENABLED(U8GLIB_ST7920) // SPI GLCD 12864 ST7920 + #define LCD_PINS_RS 30 + #define LCD_PINS_ENABLE 20 + #define LCD_PINS_D4 25 + #define BEEPER_PIN 29 + #define BTN_EN1 19 + #define BTN_EN2 22 + #define BTN_ENC 24 + #define LCD_BACKLIGHT_PIN 6 + #if ENABLED(SILVER_GATE_GLCD_CONTROLLER) + #define KILL_PIN 21 + #define HOME_PIN 28 + #endif + #endif +#endif + +#define SD_DETECT_PIN 15 + +#define STAT_LED_RED_PIN 23 +#define STAT_LED_BLUE_PIN 26 + +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN 51 +#endif diff --git a/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h b/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h new file mode 100644 index 0000000..715e823 --- /dev/null +++ b/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h @@ -0,0 +1,111 @@ +/** + * 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 + +/** + * Wanhao 0ne+ pin assignments + */ + +#if NOT_TARGET(__AVR_ATmega2560__) + #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" +#endif + +#define BOARD_INFO_NAME "Wanhao i3 Mini 0ne+" +#define DEFAULT_MACHINE_NAME "i3 Mini" +#define BOARD_WEBSITE_URL "tinyurl.com/yyxw7se7" + +// +// Limit Switches +// +#define X_STOP_PIN 19 +#define Y_STOP_PIN 18 +#define Z_STOP_PIN 38 + +// +// Z Probe (when not Z_MIN_PIN) +// +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN 38 +#endif + +// +// Steppers +// +#define X_STEP_PIN 22 +#define X_DIR_PIN 23 +#define X_ENABLE_PIN 57 + +#define Y_STEP_PIN 25 +#define Y_DIR_PIN 26 +#define Y_ENABLE_PIN 24 + +#define Z_STEP_PIN 29 +#define Z_DIR_PIN 39 +#define Z_ENABLE_PIN 28 + +#define E0_STEP_PIN 55 +#define E0_DIR_PIN 56 +#define E0_ENABLE_PIN 54 + +// +// Temperature Sensors +// +#define TEMP_0_PIN 13 +#define TEMP_BED_PIN 14 + +// +// Heaters / Fans +// +#define HEATER_0_PIN 4 +#define HEATER_BED_PIN 44 +#define FAN_PIN 12 // IO pin. Buffer needed + +// +// SD Card +// +#define SD_DETECT_PIN 83 +#define SDSS 53 + +// +// Misc. Functions +// +#define BEEPER_PIN 37 +#define KILL_PIN 64 + +// +// LCD / Controller (Integrated MINIPANEL) +// +#if ENABLED(MINIPANEL) + #define DOGLCD_A0 40 + #define DOGLCD_CS 41 + #define LCD_BACKLIGHT_PIN 65 // Backlight LED on A11/D65 + #define LCD_RESET_PIN 27 + + #define BTN_EN1 2 + #define BTN_EN2 3 + #define BTN_ENC 5 + + // This display has adjustable contrast + #define LCD_CONTRAST_MIN 0 + #define LCD_CONTRAST_MAX 255 + #define LCD_CONTRAST_INIT LCD_CONTRAST_MAX +#endif |