Skip to content

Commit

Permalink
📌 RAMPS Plus EXP1/2 and RAMPS AUX 1-2
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jan 18, 2022
1 parent df69d72 commit a746122
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 60 deletions.
110 changes: 65 additions & 45 deletions Marlin/src/pins/ramps/pins_RAMPS.h
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,28 @@
#define E_MUX2_PIN 44 // E1_CS_PIN
#endif

//
// AUX1 : 5V GND D2 D1
// 5V GND A3 A4

#define AUX1_05_PIN 57 // (A3)
#define AUX1_06_PIN 2
#define AUX1_07_PIN 58 // (A4)
#define AUX1_08_PIN 1

//
// AUX2 : GND A9 D40 D42 A11
// VCC A5 A10 D44 A12

#define AUX2_03_PIN 59 // (A5)
#define AUX2_04_PIN 63 // (A9)
#define AUX2_05_PIN 64 // (A10)
#define AUX2_06_PIN 40
#define AUX2_07_PIN 44
#define AUX2_08_PIN 42
#define AUX2_09_PIN 66 // (A12)
#define AUX2_10_PIN 65 // (A11)

//
// AUX3 : GND D52 D50 5V
// NC D53 D51 D49
Expand Down Expand Up @@ -507,12 +529,12 @@

#elif BOTH(IS_NEWPANEL, PANEL_ONE)

#define LCD_PINS_RS 40
#define LCD_PINS_ENABLE 42
#define LCD_PINS_D4 65
#define LCD_PINS_D5 66
#define LCD_PINS_D6 44
#define LCD_PINS_D7 64
#define LCD_PINS_RS AUX2_06_PIN
#define LCD_PINS_ENABLE AUX2_08_PIN
#define LCD_PINS_D4 AUX2_10_PIN
#define LCD_PINS_D5 AUX2_09_PIN
#define LCD_PINS_D6 AUX2_07_PIN
#define LCD_PINS_D7 AUX2_05_PIN

#elif ENABLED(TFTGLCD_PANEL_SPI)

Expand All @@ -533,12 +555,12 @@
#elif ENABLED(ZONESTAR_LCD)

#error "CAUTION! ZONESTAR_LCD on RAMPS requires wiring modifications. It plugs into AUX2 but GND and 5V need to be swapped. Comment out this line to continue."
#define LCD_PINS_RS 64
#define LCD_PINS_ENABLE 44
#define LCD_PINS_D4 63
#define LCD_PINS_D5 40
#define LCD_PINS_D6 42
#define LCD_PINS_D7 65
#define LCD_PINS_RS AUX2_05_PIN
#define LCD_PINS_ENABLE AUX2_07_PIN
#define LCD_PINS_D4 AUX2_04_PIN
#define LCD_PINS_D5 AUX2_06_PIN
#define LCD_PINS_D6 AUX2_08_PIN
#define LCD_PINS_D7 AUX2_10_PIN

#else

Expand Down Expand Up @@ -570,8 +592,8 @@
// Buttons attached to a shift register
// Not wired yet
//#define SHIFT_CLK_PIN 38
//#define SHIFT_LD_PIN 42
//#define SHIFT_OUT_PIN 40
//#define SHIFT_LD_PIN AUX2_08_PIN
//#define SHIFT_OUT_PIN AUX2_06_PIN
//#define SHIFT_EN_PIN EXP1_08_PIN
#endif

Expand Down Expand Up @@ -612,10 +634,10 @@

#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)

#define BTN_EN1 64
#define BTN_EN2 59
#define BTN_ENC 63
#define SD_DETECT_PIN 42
#define BTN_EN1 AUX2_05_PIN
#define BTN_EN2 AUX2_03_PIN
#define BTN_ENC AUX2_04_PIN
#define SD_DETECT_PIN AUX2_08_PIN

#elif ENABLED(LCD_I2C_PANELOLU2)

Expand All @@ -627,26 +649,26 @@

#elif ENABLED(LCD_I2C_VIKI)

#define BTN_EN1 40 // https://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42.
#define BTN_EN2 42
#define BTN_EN1 AUX2_06_PIN // https://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains AUX2-06 and AUX2-08.
#define BTN_EN2 AUX2_08_PIN
#define BTN_ENC -1

#define LCD_SDSS SDSS
#define SD_DETECT_PIN EXP2_04_PIN

#elif ANY(VIKI2, miniVIKI)

#define DOGLCD_CS 45
#define DOGLCD_A0 44
#define DOGLCD_CS AUX4_05_PIN
#define DOGLCD_A0 AUX2_07_PIN
#define LCD_SCREEN_ROT_180

#define BEEPER_PIN EXP2_06_PIN
#define STAT_LED_RED_PIN 32
#define STAT_LED_RED_PIN AUX4_03_PIN
#define STAT_LED_BLUE_PIN EXP1_09_PIN

#define BTN_EN1 22
#define BTN_EN2 7
#define BTN_ENC 39
#define BTN_ENC AUX4_08_PIN

#define SD_DETECT_PIN -1 // Pin 49 for display SD interface, 72 for easy adapter board
#define KILL_PIN EXP2_08_PIN
Expand Down Expand Up @@ -723,19 +745,18 @@

#elif ENABLED(MINIPANEL)

#define BEEPER_PIN 42
// not connected to a pin
#define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
#define BEEPER_PIN AUX2_08_PIN
#define LCD_BACKLIGHT_PIN AUX2_10_PIN

#define DOGLCD_A0 44
#define DOGLCD_CS 66
#define DOGLCD_A0 AUX2_07_PIN
#define DOGLCD_CS AUX2_09_PIN

#define BTN_EN1 40
#define BTN_EN2 63
#define BTN_ENC 59
#define BTN_EN1 AUX2_06_PIN
#define BTN_EN2 AUX2_04_PIN
#define BTN_ENC AUX2_03_PIN

#define SD_DETECT_PIN EXP2_04_PIN
#define KILL_PIN 64
#define SD_DETECT_PIN AUX3_07_PIN
#define KILL_PIN AUX2_05_PIN

#elif ENABLED(ZONESTAR_LCD)

Expand Down Expand Up @@ -764,11 +785,10 @@

#define BEEPER_PIN EXP2_06_PIN

// Buttons are directly attached to AUX-2
#if ENABLED(PANEL_ONE)
#define BTN_EN1 59 // AUX2 PIN 3
#define BTN_EN2 63 // AUX2 PIN 4
#define BTN_ENC EXP2_04_PIN
#if ENABLED(PANEL_ONE) // Buttons connect directly to AUX-2
#define BTN_EN1 AUX2_03_PIN
#define BTN_EN2 AUX2_04_PIN
#define BTN_ENC AUX3_07_PIN
#else
#define BTN_EN1 EXP1_10_PIN
#define BTN_EN2 EXP1_09_PIN
Expand All @@ -781,17 +801,17 @@
#endif // HAS_WIRED_LCD

#if IS_RRW_KEYPAD && !HAS_ADC_BUTTONS
#define SHIFT_OUT_PIN 40
#define SHIFT_CLK_PIN 44
#define SHIFT_LD_PIN 42
#define SHIFT_OUT_PIN AUX2_06_PIN
#define SHIFT_CLK_PIN AUX2_07_PIN
#define SHIFT_LD_PIN AUX2_08_PIN
#ifndef BTN_EN1
#define BTN_EN1 64
#define BTN_EN1 AUX2_05_PIN
#endif
#ifndef BTN_EN2
#define BTN_EN2 59
#define BTN_EN2 AUX2_03_PIN
#endif
#ifndef BTN_ENC
#define BTN_ENC 63
#define BTN_ENC AUX2_04_PIN
#endif
#endif

Expand Down
47 changes: 32 additions & 15 deletions Marlin/src/pins/ramps/pins_RAMPS_PLUS.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@

/**
* Arduino Mega with RAMPS v1.4Plus, also known as 3DYMY version, pin assignments
* The differences to the RAMPS v1.4 are:
* - Swap heater E0 with E1
* - Swap pins 8 and 10. Bed/Fan/Hotend as labeled on the board are on pins 8/9/10.
* - Change pins 16->42, 17->44 and 29->53 used for display.
*
* Applies to the following boards:
*
Expand All @@ -35,6 +31,11 @@
* RAMPS_PLUS_EFF (Extruder, Fan, Fan)
* RAMPS_PLUS_EEF (Extruder, Extruder, Fan)
* RAMPS_PLUS_SF (Spindle, Controller Fan)
*
* Differences from RAMPS v1.4:
* - Swap heater E0 with E1
* - Swap pins 8 and 10. Bed/Fan/Hotend as labeled on the board are on pins 8/9/10.
* - Change EXP1/2 pins
*/

#include "env_validate.h"
Expand Down Expand Up @@ -62,15 +63,31 @@
#define E1_ENABLE_PIN 24
#define E1_CS_PIN -1

#include "pins_RAMPS.h"
/** ------ ------
* 37 |10 9 | 35 (MISO) 50 |10 9 | 52 (SCK)
* 31 | 8 7 | 41 29 | 8 7 | 53
* 33 6 5 | 23 25 6 5 | 51 (MOSI)
* 42 | 4 3 | 44 49 | 4 3 | 27
* GND | 2 1 | 5V GND | 2 1 | --
* ------ ------
* EXP1 EXP2
*/
#define EXP1_03_PIN 44
#define EXP1_04_PIN 42
#define EXP1_05_PIN 23
#define EXP1_06_PIN 33
#define EXP1_07_PIN 41
#define EXP1_08_PIN 31
#define EXP1_09_PIN 35
#define EXP1_10_PIN 37

#if IS_ULTRA_LCD && NONE(REPRAPWORLD_GRAPHICAL_LCD, CR10_STOCKDISPLAY) && !BOTH(IS_NEWPANEL, PANEL_ONE)
#if DISABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306)
#undef LCD_PINS_RS
#define LCD_PINS_RS 42 // 3DYMY boards pin 16 -> 42
#undef LCD_PINS_ENABLE
#define LCD_PINS_ENABLE 44 // 3DYMY boards pin 17 -> 44
#endif
#undef LCD_PINS_D7
#define LCD_PINS_D7 53 // 3DYMY boards pin 29 -> 53
#endif
#define EXP2_03_PIN 27
#define EXP2_04_PIN 49
#define EXP2_05_PIN 51
#define EXP2_06_PIN 25
#define EXP2_07_PIN 53
#define EXP2_08_PIN 29
#define EXP2_09_PIN 52
#define EXP2_10_PIN 50

#include "pins_RAMPS.h"

0 comments on commit a746122

Please sign in to comment.