From 8da2e98985aa90add66579921f16505defd80292 Mon Sep 17 00:00:00 2001 From: AnHardt Date: Sat, 31 Oct 2015 02:05:09 +0100 Subject: [PATCH] Split RAMPS 1.3 an 1.4 (PR#2741) because of hardware differences on the SERVO0_PIN --- Marlin/Makefile | 24 ++++++++++++++++++++++++ Marlin/boards.h | 15 ++++++++++----- Marlin/pins.h | 6 ++++++ Marlin/pins_RAMPS_13.h | 22 +++++++++++++++++++--- 4 files changed, 59 insertions(+), 8 deletions(-) diff --git a/Marlin/Makefile b/Marlin/Makefile index 37435cad17..68b0de0ba1 100644 --- a/Marlin/Makefile +++ b/Marlin/Makefile @@ -98,6 +98,30 @@ MCU ?= atmega2560 else ifeq ($(HARDWARE_MOTHERBOARD),34) HARDWARE_VARIANT ?= arduino MCU ?= atmega2560 +else ifeq ($(HARDWARE_MOTHERBOARD),35) +HARDWARE_VARIANT ?= arduino +MCU ?= atmega2560 +else ifeq ($(HARDWARE_MOTHERBOARD),36) +HARDWARE_VARIANT ?= arduino +MCU ?= atmega2560 +else ifeq ($(HARDWARE_MOTHERBOARD),38) +HARDWARE_VARIANT ?= arduino +MCU ?= atmega2560 +else ifeq ($(HARDWARE_MOTHERBOARD),43) +HARDWARE_VARIANT ?= arduino +MCU ?= atmega2560 +else ifeq ($(HARDWARE_MOTHERBOARD),44) +HARDWARE_VARIANT ?= arduino +MCU ?= atmega2560 +else ifeq ($(HARDWARE_MOTHERBOARD),45) +HARDWARE_VARIANT ?= arduino +MCU ?= atmega2560 +else ifeq ($(HARDWARE_MOTHERBOARD),46) +HARDWARE_VARIANT ?= arduino +MCU ?= atmega2560 +else ifeq ($(HARDWARE_MOTHERBOARD),48) +HARDWARE_VARIANT ?= arduino +MCU ?= atmega2560 #Gen6 else ifeq ($(HARDWARE_MOTHERBOARD),5) diff --git a/Marlin/boards.h b/Marlin/boards.h index f6bbc9d673..0355dbf017 100644 --- a/Marlin/boards.h +++ b/Marlin/boards.h @@ -10,13 +10,18 @@ #define BOARD_CHEAPTRONIC 2 // Cheaptronic v1.0 #define BOARD_SETHI 20 // Sethi 3D_1 #define BOARD_RAMPS_OLD 3 // MEGA/RAMPS up to 1.2 -#define BOARD_RAMPS_13_EFB 33 // RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed) -#define BOARD_RAMPS_13_EEB 34 // RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed) -#define BOARD_RAMPS_13_EFF 35 // RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Fan) -#define BOARD_RAMPS_13_EEF 36 // RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Fan) -#define BOARD_RAMPS_13_SF 38 // RAMPS 1.3 / 1.4 (Power outputs: Spindle, Controller Fan) +#define BOARD_RAMPS_13_EFB 33 // RAMPS 1.3 (Power outputs: Extruder, Fan, Bed) +#define BOARD_RAMPS_13_EEB 34 // RAMPS 1.3 (Power outputs: Extruder0, Extruder1, Bed) +#define BOARD_RAMPS_13_EFF 35 // RAMPS 1.3 (Power outputs: Extruder, Fan, Fan) +#define BOARD_RAMPS_13_EEF 36 // RAMPS 1.3 (Power outputs: Extruder0, Extruder1, Fan) +#define BOARD_RAMPS_13_SF 38 // RAMPS 1.3 (Power outputs: Spindle, Controller Fan) #define BOARD_FELIX2 37 // Felix 2.0+ Electronics Board (RAMPS like) #define BOARD_RIGIDBOARD 42 // Invent-A-Part RigidBoard +#define BOARD_RAMPS_14_EFB 43 // RAMPS 1.4 (Power outputs: Extruder, Fan, Bed) +#define BOARD_RAMPS_14_EEB 44 // RAMPS 1.4 (Power outputs: Extruder0, Extruder1, Bed) +#define BOARD_RAMPS_14_EFF 45 // RAMPS 1.4 (Power outputs: Extruder, Fan, Fan) +#define BOARD_RAMPS_14_EEF 46 // RAMPS 1.4 (Power outputs: Extruder0, Extruder1, Fan) +#define BOARD_RAMPS_14_SF 48 // RAMPS 1.4 (Power outputs: Spindle, Controller Fan) #define BOARD_GEN6 5 // Gen6 #define BOARD_GEN6_DELUXE 51 // Gen6 deluxe #define BOARD_SANGUINOLOLU_11 6 // Sanguinololu < 1.2 diff --git a/Marlin/pins.h b/Marlin/pins.h index b02074f84a..8846b428f0 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -38,6 +38,12 @@ #include "pins_RAMPS_13_EFB.h" #elif MB(RAMPS_13_EEB) || MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF) || MB(RAMPS_13_SF) #include "pins_RAMPS_13.h" +#elif MB(RAMPS_14_EFB) + #define IS_RAMPS_14 + #include "pins_RAMPS_13_EFB.h" +#elif MB(RAMPS_14_EEB) || MB(RAMPS_14_EFF) || MB(RAMPS_14_EEF) || MB(RAMPS_14_SF) + #define IS_RAMPS_14 + #include "pins_RAMPS_13.h" #elif MB(GEN6) #include "pins_GEN6.h" #elif MB(GEN6_DELUXE) diff --git a/Marlin/pins_RAMPS_13.h b/Marlin/pins_RAMPS_13.h index 5a3b0b12d1..dde95a2ede 100644 --- a/Marlin/pins_RAMPS_13.h +++ b/Marlin/pins_RAMPS_13.h @@ -1,5 +1,5 @@ /** - * Arduino Mega with RAMPS v1.3 pin assignments + * Arduino Mega with RAMPS v1.3 v1.4 pin assignments * * Applies to the following boards: * @@ -8,8 +8,18 @@ * RAMPS_13_EFF (Extruder, Fan, Fan) * RAMPS_13_EEF (Extruder, Extruder, Fan) * RAMPS_13_SF (Spindle, Controller Fan) + * + * RAMPS_14_EFB (Extruder, Fan, Bed) + * RAMPS_14_EEB (Extruder, Extruder, Bed) + * RAMPS_14_EFF (Extruder, Fan, Fan) + * RAMPS_14_EEF (Extruder, Extruder, Fan) + * RAMPS_14_SF (Spindle, Controller Fan) * * Other pins_MYBOARD.h files may override these defaults + * + * Differences between + * RAMPS_13 | RAMPS_14 + * 7 | 11 */ #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) @@ -18,7 +28,11 @@ #define LARGE_FLASH true -#define SERVO0_PIN 11 +#ifdef IS_RAMPS_14 + #define SERVO0_PIN 11 +#else + #define SERVO0_PIN 7 // RAMPS_13 // Will conflict with BTN_EN2 on LCD_I2C_VIKI +#endif #define SERVO1_PIN 6 #define SERVO2_PIN 5 #define SERVO3_PIN 4 @@ -154,7 +168,9 @@ #define KILL_PIN 41 #elif ENABLED(LCD_I2C_VIKI) #define BTN_EN1 22 // reverse if the encoder turns the wrong way. - #define BTN_EN2 7 + #define BTN_EN2 7 // http://files.panucatt.com/datasheets/viki_wiring_diagram.pdf + // tells about 40/42. + // 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13. #define BTN_ENC -1 #define LCD_SDSS 53 #define SD_DETECT_PIN 49