From aa7d5714867df05348ca63ad113ea9cf7ccc3271 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 22 Jan 2024 17:32:01 -0600 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20LCD=20pins=20migration=20p?= =?UTF-8?q?recursor=20(#26719)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Preliminary changes for #25650 --- Marlin/src/HAL/DUE/HAL_SPI.cpp | 2 +- Marlin/src/HAL/DUE/inc/SanityCheck.h | 4 +- Marlin/src/HAL/DUE/spi_pins.h | 2 +- Marlin/src/HAL/LINUX/spi_pins.h | 3 - Marlin/src/HAL/LPC1768/spi_pins.h | 4 +- Marlin/src/HAL/NATIVE_SIM/spi_pins.h | 3 - Marlin/src/MarlinCore.cpp | 2 +- Marlin/src/inc/Conditionals_LCD.h | 2 +- Marlin/src/inc/Conditionals_post.h | 12 - Marlin/src/lcd/dogm/marlinui_DOGM.cpp | 3 - Marlin/src/lcd/dogm/marlinui_DOGM.h | 7 +- Marlin/src/module/settings.cpp | 2 +- Marlin/src/pins/esp32/pins_ENWI_ESPNP.h | 4 +- Marlin/src/pins/esp32/pins_MKS_TINYBEE.h | 4 +- Marlin/src/pins/esp32/pins_PANDA_common.h | 2 +- Marlin/src/pins/linux/pins_RAMPS_LINUX.h | 144 +++-- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h | 5 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 4 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h | 2 +- Marlin/src/pins/lpc1768/pins_MKS_SBASE.h | 132 ++-- Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h | 59 +- Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h | 126 ++-- .../src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h | 4 +- .../src/pins/lpc1769/pins_COHESION3D_REMIX.h | 114 ++-- Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h | 3 + Marlin/src/pins/mega/pins_MEGACONTROLLER.h | 48 +- Marlin/src/pins/mega/pins_PICA.h | 67 ++- Marlin/src/pins/pins.h | 5 + Marlin/src/pins/pins_lcd.h | 45 ++ Marlin/src/pins/pins_postprocess.h | 9 + Marlin/src/pins/rambo/pins_EINSY_RETRO.h | 62 +- Marlin/src/pins/ramps/pins_FYSETC_F6_13.h | 102 ++-- Marlin/src/pins/ramps/pins_RAMPS.h | 292 ++++----- Marlin/src/pins/ramps/pins_RAMPS_PLUS.h | 52 +- Marlin/src/pins/ramps/pins_TRIGORILLA_14.h | 44 +- Marlin/src/pins/ramps/pins_TT_OSCAR.h | 84 ++- Marlin/src/pins/ramps/pins_ZRIB_V53.h | 12 +- Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h | 2 +- Marlin/src/pins/sam/pins_RAMPS_FD_V1.h | 5 +- Marlin/src/pins/sam/pins_RURAMPS4D_11.h | 24 +- Marlin/src/pins/samd/pins_RAMPS_144.h | 568 ++++++++++++------ Marlin/src/pins/sanguino/pins_ANET_10.h | 32 +- .../src/pins/sanguino/pins_MELZI_CREALITY.h | 165 +++-- Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h | 7 +- Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h | 8 +- Marlin/src/pins/sanguino/pins_MELZI_V2.h | 2 + .../src/pins/sanguino/pins_SANGUINOLOLU_11.h | 126 ++-- Marlin/src/pins/sanguino/pins_ZMIB_V2.h | 8 +- Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h | 4 +- Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h | 16 +- .../pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h | 4 +- .../pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h | 10 +- .../stm32f1/pins_BTT_SKR_MINI_E3_common.h | 43 +- .../src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V4.h | 12 + Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h | 4 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h | 40 +- .../pins/stm32f1/pins_MKS_ROBIN_E3_common.h | 13 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h | 6 +- .../src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 146 +++-- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h | 156 +++-- Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h | 64 +- .../pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h | 5 +- .../stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h | 4 +- .../pins/stm32f4/pins_BTT_SKR_V2_0_common.h | 4 +- Marlin/src/pins/stm32f4/pins_FYSETC_S6.h | 2 +- Marlin/src/pins/stm32f4/pins_LERDGE_K.h | 1 - Marlin/src/pins/stm32f4/pins_LERDGE_X.h | 1 - .../src/pins/stm32f4/pins_MKS_MONSTER8_V2.h | 4 +- Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h | 4 +- .../src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h | 4 +- .../src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h | 4 +- Marlin/src/pins/stm32f4/pins_RUMBA32_common.h | 50 +- .../src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h | 4 +- Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h | 4 +- .../pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h | 4 +- .../pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h | 4 +- .../pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h | 4 +- .../pins/stm32g0/pins_BTT_MANTA_M8P_V1_0.h | 4 +- .../pins/stm32g0/pins_BTT_MANTA_M8P_V1_1.h | 4 +- .../pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h | 20 +- .../pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h | 4 +- .../pins/stm32h7/pins_BTT_SKR_SE_BX_common.h | 2 +- .../pins/stm32h7/pins_BTT_SKR_V3_0_common.h | 8 +- 84 files changed, 1886 insertions(+), 1197 deletions(-) create mode 100644 Marlin/src/pins/pins_lcd.h diff --git a/Marlin/src/HAL/DUE/HAL_SPI.cpp b/Marlin/src/HAL/DUE/HAL_SPI.cpp index 63ebf164f2b1..c2fabb0d49b1 100644 --- a/Marlin/src/HAL/DUE/HAL_SPI.cpp +++ b/Marlin/src/HAL/DUE/HAL_SPI.cpp @@ -42,7 +42,7 @@ // Public functions // ------------------------ -#if ANY(DUE_SOFTWARE_SPI, FORCE_SOFT_SPI) +#if ANY(SOFTWARE_SPI, FORCE_SOFT_SPI) // ------------------------ // Software SPI diff --git a/Marlin/src/HAL/DUE/inc/SanityCheck.h b/Marlin/src/HAL/DUE/inc/SanityCheck.h index a8f5de8298d1..1eaa2fbd8c73 100644 --- a/Marlin/src/HAL/DUE/inc/SanityCheck.h +++ b/Marlin/src/HAL/DUE/inc/SanityCheck.h @@ -72,10 +72,10 @@ #if HAS_MEDIA && HAS_DRIVER(TMC2130) #if ENABLED(TMC_USE_SW_SPI) - #if DISABLED(DUE_SOFTWARE_SPI) && (_IS_HW_SPI(MOSI) || _IS_HW_SPI(MISO) || _IS_HW_SPI(SCK)) + #if DISABLED(SOFTWARE_SPI) && (_IS_HW_SPI(MOSI) || _IS_HW_SPI(MISO) || _IS_HW_SPI(SCK)) #error "DUE hardware SPI is required but is incompatible with TMC2130 software SPI. Either disable TMC_USE_SW_SPI or use separate pins for the two SPIs." #endif - #elif ENABLED(DUE_SOFTWARE_SPI) + #elif ENABLED(SOFTWARE_SPI) #error "DUE software SPI is required but is incompatible with TMC2130 hardware SPI. Enable TMC_USE_SW_SPI to fix." #endif #endif diff --git a/Marlin/src/HAL/DUE/spi_pins.h b/Marlin/src/HAL/DUE/spi_pins.h index cec22c2c374a..41ac7a8b5826 100644 --- a/Marlin/src/HAL/DUE/spi_pins.h +++ b/Marlin/src/HAL/DUE/spi_pins.h @@ -48,7 +48,7 @@ #define SD_MOSI_PIN 75 #else // defaults - #define DUE_SOFTWARE_SPI + #define SOFTWARE_SPI #ifndef SD_SCK_PIN #define SD_SCK_PIN 52 #endif diff --git a/Marlin/src/HAL/LINUX/spi_pins.h b/Marlin/src/HAL/LINUX/spi_pins.h index 7bd2498be748..607b96428152 100644 --- a/Marlin/src/HAL/LINUX/spi_pins.h +++ b/Marlin/src/HAL/LINUX/spi_pins.h @@ -21,9 +21,6 @@ */ #pragma once -#include "../../core/macros.h" -#include "../../inc/MarlinConfigPre.h" - #if ALL(HAS_MARLINUI_U8GLIB, HAS_MEDIA) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_EN == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) #define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently // needed due to the speed and mode required for communicating with each device being different. diff --git a/Marlin/src/HAL/LPC1768/spi_pins.h b/Marlin/src/HAL/LPC1768/spi_pins.h index babe8a11d719..295d6462fd91 100644 --- a/Marlin/src/HAL/LPC1768/spi_pins.h +++ b/Marlin/src/HAL/LPC1768/spi_pins.h @@ -21,9 +21,7 @@ */ #pragma once -#include "../../core/macros.h" - -#if ALL(HAS_MEDIA, HAS_MARLINUI_U8GLIB) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_EN == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) +#if ALL(HAS_MARLINUI_U8GLIB, HAS_MEDIA) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_EN == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) #define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently // needed due to the speed and mode required for communicating with each device being different. // This requirement can be removed if the SPI access to these devices is updated to use diff --git a/Marlin/src/HAL/NATIVE_SIM/spi_pins.h b/Marlin/src/HAL/NATIVE_SIM/spi_pins.h index 9b1bae9a5836..d9911bf56ce4 100644 --- a/Marlin/src/HAL/NATIVE_SIM/spi_pins.h +++ b/Marlin/src/HAL/NATIVE_SIM/spi_pins.h @@ -21,9 +21,6 @@ */ #pragma once -#include "../../core/macros.h" -#include "../../inc/MarlinConfigPre.h" - #if ALL(HAS_MARLINUI_U8GLIB, HAS_MEDIA) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_EN == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) #define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently // needed due to the speed and mode required for communicating with each device being different. diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 91496b1c5c50..53a74871efbb 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -1063,7 +1063,7 @@ inline void tmc_standby_setup() { * - Init the buzzer, possibly a custom timer * - Init more optional hardware: * • Color LED illumination - * • Neopixel illumination + * • NeoPixel illumination * • Controller Fan * • Creality DWIN LCD (show boot image) * • Tare the Probe if possible diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 2c7420045531..64056d40f90d 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -575,7 +575,7 @@ #define MKS_MINI_12864 #endif -// MKS_MINI_12864_V3 , BTT_MINI_12864 and BEEZ_MINI_12864 have identical pinouts to FYSETC_MINI_12864_2_1 +// MKS_MINI_12864_V3 , BTT_MINI_12864 and BEEZ_MINI_12864 are nearly identical to FYSETC_MINI_12864_2_1 #if ANY(MKS_MINI_12864_V3, BTT_MINI_12864, BEEZ_MINI_12864) #define FYSETC_MINI_12864_2_1 #endif diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index a344d6183d8f..49562cb856f2 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -3215,18 +3215,6 @@ #undef SOUND_ON_DEFAULT #endif -/** - * Make sure DOGLCD_SCK and DOGLCD_MOSI are defined. - */ -#if HAS_MARLINUI_U8GLIB - #ifndef DOGLCD_SCK - #define DOGLCD_SCK SD_SCK_PIN - #endif - #ifndef DOGLCD_MOSI - #define DOGLCD_MOSI SD_MOSI_PIN - #endif -#endif - /** * Z_CLEARANCE_FOR_HOMING / Z_CLEARANCE_BETWEEN_PROBES */ diff --git a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp index 1b53bb4bbe66..08e197ebb503 100644 --- a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp +++ b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp @@ -311,9 +311,6 @@ void MarlinUI::init_lcd() { #if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306, FYSETC_242_OLED_12864, ZONESTAR_12864OLED, K3D_242_OLED_CONTROLLER) SET_OUTPUT(LCD_PINS_DC); - #ifndef LCD_RESET_PIN - #define LCD_RESET_PIN LCD_PINS_RS - #endif #endif #if PIN_EXISTS(LCD_RESET) diff --git a/Marlin/src/lcd/dogm/marlinui_DOGM.h b/Marlin/src/lcd/dogm/marlinui_DOGM.h index d23df6e2a370..59df915f496e 100644 --- a/Marlin/src/lcd/dogm/marlinui_DOGM.h +++ b/Marlin/src/lcd/dogm/marlinui_DOGM.h @@ -40,13 +40,16 @@ #ifdef __SAMD21__ #define U8G_CLASS U8GLIB_ST7920_128X64_4X_HAL #else + // Hardware SPI on DUE #define U8G_CLASS U8GLIB_ST7920_128X64_4X #endif #define U8G_PARAM LCD_PINS_RS #elif (LCD_PINS_D4 == SD_SCK_PIN) && (LCD_PINS_EN == SD_MOSI_PIN) + // Hardware SPI shared with SD Card #define U8G_CLASS U8GLIB_ST7920_128X64_4X_HAL #define U8G_PARAM LCD_PINS_RS #else + // Software SPI #define U8G_CLASS U8GLIB_ST7920_128X64_4X #define U8G_PARAM LCD_PINS_D4, LCD_PINS_EN, LCD_PINS_RS #endif @@ -97,7 +100,7 @@ #define SMART_RAMPS MB(RAMPS_SMART_EFB, RAMPS_SMART_EEB, RAMPS_SMART_EFF, RAMPS_SMART_EEF, RAMPS_SMART_SF) #define U8G_CLASS U8GLIB_64128N_2X_HAL // 4 stripes (HW-SPI) - #if (SMART_RAMPS && defined(__SAM3X8E__)) || DOGLCD_SCK != SD_SCK_PIN || DOGLCD_MOSI != SD_MOSI_PIN + #if (SMART_RAMPS && defined(__SAM3X8E__)) || (defined(DOGLCD_SCK) && (DOGLCD_SCK != -1 && DOGLCD_SCK != SD_SCK_PIN)) || (defined(DOGLCD_MOSI) && (DOGLCD_MOSI != -1 && DOGLCD_MOSI != SD_MOSI_PIN)) #define FORCE_SOFT_SPI // SW-SPI #endif @@ -230,7 +233,7 @@ #if ENABLED(FORCE_SOFT_SPI) #define U8G_PARAM DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0 // SW-SPI #else - #define U8G_PARAM DOGLCD_CS, DOGLCD_A0 // HW-SPI + #define U8G_PARAM DOGLCD_CS, DOGLCD_A0 // HW-SPI #endif #endif diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index 6a20488f6dfb..34f840e8e3b4 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -702,7 +702,7 @@ void MarlinSettings::postprocess() { if (oldpos != current_position) report_current_position(); - // Moved as last update due to interference with Neopixel init + // Moved as last update due to interference with NeoPixel init TERN_(HAS_LCD_CONTRAST, ui.refresh_contrast()); TERN_(HAS_LCD_BRIGHTNESS, ui.refresh_brightness()); TERN_(HAS_BACKLIGHT_TIMEOUT, ui.refresh_backlight_timeout()); diff --git a/Marlin/src/pins/esp32/pins_ENWI_ESPNP.h b/Marlin/src/pins/esp32/pins_ENWI_ESPNP.h index 65f734c7605d..578ccfa849f5 100644 --- a/Marlin/src/pins/esp32/pins_ENWI_ESPNP.h +++ b/Marlin/src/pins/esp32/pins_ENWI_ESPNP.h @@ -112,8 +112,8 @@ // #define FAN_SOFT_PWM_REQUIRED // check if needed -// Neopixel Rings -#define NEOPIXEL_PIN 14 +// NeoPixel Rings +#define BOARD_NEOPIXEL_PIN 14 #define NEOPIXEL2_PIN 27 // SPI diff --git a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h index 5ad4e525c09d..9164d60ab4f0 100644 --- a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h +++ b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h @@ -128,7 +128,7 @@ * ------ ------ * (BEEPER) 149 | 1 2 | 13 (BTN_ENC) (SPI MISO) 19 | 1 2 | 18 (SPI SCK) * (LCD_EN) 21 | 3 4 | 4 (LCD_RS) (BTN_EN1) 14 | 3 4 | 5 (SPI CS) - * (LCD_D4) 0 5 6 | 16 (LCD_D5) (BTN_EN2) 12 5 6 | 23 (SPI MOSI) + * (LCD_D4) 0 | 5 6 16 (LCD_D5) (BTN_EN2) 12 | 5 6 23 (SPI MOSI) * (LCD_D6) 15 | 7 8 | 17 (LCD_D7) (SPI_DET) 34 | 7 8 | RESET * GND | 9 10 | 5V GND | 9 10 | 3.3V * ------ ------ @@ -159,6 +159,8 @@ //#define SD_MOSI_PIN EXP2_06_PIN // uses esp32 default 23 //#define SD_MISO_PIN EXP2_01_PIN // uses esp32 default 19 //#define SD_SCK_PIN EXP2_02_PIN // uses esp32 default 18 + +// TODO: Migrate external SD Card to pins/lcd #define SDSS EXP2_04_PIN #define SD_DETECT_PIN EXP2_07_PIN // IO34 default is SD_DET signal (Jump to SDDET) #define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers diff --git a/Marlin/src/pins/esp32/pins_PANDA_common.h b/Marlin/src/pins/esp32/pins_PANDA_common.h index b24babd96b53..2cc954940e47 100644 --- a/Marlin/src/pins/esp32/pins_PANDA_common.h +++ b/Marlin/src/pins/esp32/pins_PANDA_common.h @@ -86,7 +86,7 @@ * (EN1) 33 | 3 4 | (5 SDSS?) (EN) 26 | 3 4 | 27 (RS) * (EN2) 32 5 6 | (23 MOSI?) (D4) 14 | 5 6 -- * (SDDET 2?) | 7 8 | (RESET) -- | 7 8 | -- - * -- | 9 10 | -- (GND) | 9 10 | (5V) + * -- | 9 10 | -- GND | 9 10 | 5V * ------ ------ * EXP2 EXP1 */ diff --git a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h index 272c7d2ed2e1..ea6e4a4bee68 100644 --- a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h +++ b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h @@ -193,7 +193,7 @@ // #define SDSS 53 #define LED_PIN 13 -#define NEOPIXEL_PIN 71 +#define BOARD_NEOPIXEL_PIN 71 #ifndef FILWIDTH_PIN #define FILWIDTH_PIN 5 // Analog Input on AUX2 @@ -371,6 +371,34 @@ #endif #endif +/** Faux Expansion Headers + * ------ ------ + * (BEEP) 37 | 1 2 | 35 (ENC) (MISO) 50 | 1 2 | 52 (SCK) + * (LCD_EN) 17 | 3 4 | 16 (LCD_RS) (EN1) 31 | 3 4 | 53 (SDSS) + * (LCD_D4) 23 5 6 | 25 (LCD_D5) (EN2) 33 5 6 | 51 (MOSI) + * (LCD_D6) 27 | 7 8 | 29 (LCD_D7) (SD_DET) 49 | 7 8 | 41 (KILL) + * -- | 9 10 | -- -- | 9 10 | -- + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_01_PIN 37 // BEEPER +#define EXP1_02_PIN 35 // ENC +#define EXP1_03_PIN 17 // LCD_EN +#define EXP1_04_PIN 16 // LCD_RS +#define EXP1_05_PIN 23 // LCD_D4 +#define EXP1_06_PIN 25 // LCD_D5 +#define EXP1_07_PIN 27 // LCD_D6 +#define EXP1_08_PIN 29 // LCD_D7 + +#define EXP2_01_PIN 50 // MISO +#define EXP2_02_PIN 52 // SCK +#define EXP2_03_PIN 31 // EN1 +#define EXP2_04_PIN 53 // SDSS +#define EXP2_05_PIN 33 // EN2 +#define EXP2_06_PIN 51 // MOSI +#define EXP2_07_PIN 49 // SD_DET +#define EXP2_08_PIN 41 // KILL + ////////////////////////// // LCDs and Controllers // ////////////////////////// @@ -385,10 +413,11 @@ #define TFT_MOSI_PIN SD_MOSI_PIN #define LCD_USE_DMA_SPI + #define BEEPER_PIN 42 + + #define BTN_ENC 59 #define BTN_EN1 40 #define BTN_EN2 63 - #define BTN_ENC 59 - #define BEEPER_PIN 42 #define TOUCH_CS_PIN 33 @@ -473,9 +502,9 @@ // #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - #define LCD_PINS_RS 49 // CS chip select /SS chip slave select - #define LCD_PINS_EN 51 // SID (MOSI) - #define LCD_PINS_D4 52 // SCK (CLK) clock + #define LCD_PINS_RS EXP2_07_PIN // CS chip select /SS chip slave select + #define LCD_PINS_EN EXP2_06_PIN // SID (MOSI) + #define LCD_PINS_D4 EXP2_02_PIN // SCK (CLK) clock #elif ALL(IS_NEWPANEL, PANEL_ONE) @@ -490,12 +519,12 @@ #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS 27 - #define LCD_PINS_EN 29 - #define LCD_PINS_D4 25 + #define LCD_PINS_RS EXP1_07_PIN + #define LCD_PINS_EN EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN #if !IS_NEWPANEL - #define BEEPER_PIN 37 + #define BEEPER_PIN EXP1_01_PIN #endif #elif ENABLED(ZONESTAR_LCD) @@ -510,38 +539,28 @@ #else #if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306) - #define LCD_PINS_DC 25 // Set as output on init - #define LCD_PINS_RS 27 // Pull low for 1s to init + #define LCD_PINS_DC EXP1_06_PIN // Set as output on init + #define LCD_PINS_RS EXP1_07_PIN // Pull low for 1s to init // DOGM SPI LCD Support - #define DOGLCD_CS 16 - #define DOGLCD_MOSI 17 - #define DOGLCD_SCK 23 + #define DOGLCD_CS EXP1_04_PIN + #define DOGLCD_MOSI EXP1_03_PIN + #define DOGLCD_SCK EXP1_05_PIN #define DOGLCD_A0 LCD_PINS_DC #else - #define LCD_PINS_RS 16 - #define LCD_PINS_EN 17 - #define LCD_PINS_D4 23 - #define LCD_PINS_D5 25 - #define LCD_PINS_D6 27 + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_EN EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_07_PIN #endif - #define LCD_PINS_D7 29 + #define LCD_PINS_D7 EXP1_08_PIN #if !IS_NEWPANEL - #define BEEPER_PIN 33 + #define BEEPER_PIN EXP2_05_PIN #endif #endif - - #if !IS_NEWPANEL - // 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_EN_PIN 17 - #endif - #endif // @@ -551,19 +570,19 @@ #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) - #define BEEPER_PIN 37 + #define BEEPER_PIN EXP1_01_PIN #if ENABLED(CR10_STOCKDISPLAY) - #define BTN_EN1 17 - #define BTN_EN2 23 + #define BTN_EN1 EXP1_03_PIN + #define BTN_EN2 EXP1_05_PIN #else - #define BTN_EN1 31 - #define BTN_EN2 33 + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN #endif - #define BTN_ENC 35 - #define SD_DETECT_PIN 49 - #define KILL_PIN 41 + #define BTN_ENC EXP1_02_PIN + #define SD_DETECT_PIN EXP2_07_PIN + #define KILL_PIN EXP2_08_PIN #if ENABLED(BQ_LCD_SMART_CONTROLLER) #define LCD_BACKLIGHT_PIN 39 @@ -613,34 +632,34 @@ #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) - #define DOGLCD_CS 29 - #define DOGLCD_A0 27 + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_A0 EXP1_07_PIN - #define BEEPER_PIN 23 - #define LCD_BACKLIGHT_PIN 33 + #define BEEPER_PIN EXP1_05_PIN + #define LCD_BACKLIGHT_PIN EXP2_05_PIN - #define BTN_EN1 35 - #define BTN_EN2 37 - #define BTN_ENC 31 + #define BTN_EN1 EXP1_02_PIN + #define BTN_EN2 EXP1_01_PIN + #define BTN_ENC EXP2_03_PIN #define LCD_SDSS SDSS - #define SD_DETECT_PIN 49 - #define KILL_PIN 41 + #define SD_DETECT_PIN EXP2_07_PIN + #define KILL_PIN EXP2_08_PIN #elif ENABLED(MKS_MINI_12864) - #define DOGLCD_A0 27 - #define DOGLCD_CS 25 + #define DOGLCD_A0 EXP1_07_PIN + #define DOGLCD_CS EXP1_06_PIN - #define BEEPER_PIN 37 + #define BEEPER_PIN EXP1_01_PIN // not connected to a pin #define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65 - #define BTN_EN1 31 - #define BTN_EN2 33 - #define BTN_ENC 35 + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN + #define BTN_ENC EXP1_02_PIN - #define SD_DETECT_PIN 49 + #define SD_DETECT_PIN EXP2_07_PIN #define KILL_PIN 64 //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 @@ -673,7 +692,6 @@ #else - // Beeper on AUX-4 #define BEEPER_PIN 33 // Buttons are directly attached to AUX-2 @@ -689,15 +707,15 @@ #define BTN_EN2 63 // AUX2 PIN 4 #define BTN_ENC 49 // AUX3 PIN 7 #else - #define BTN_EN1 37 - #define BTN_EN2 35 - #define BTN_ENC 31 - #define SD_DETECT_PIN 41 + #define BTN_EN1 EXP1_01_PIN + #define BTN_EN2 EXP1_02_PIN + #define BTN_ENC EXP2_03_PIN + #define SD_DETECT_PIN EXP2_08_PIN #endif #if ENABLED(G3D_PANEL) - #define SD_DETECT_PIN 49 - #define KILL_PIN 41 + #define SD_DETECT_PIN EXP2_07_PIN + #define KILL_PIN EXP2_08_PIN #endif #endif diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h index 687ca340b3a8..63496c407daa 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h @@ -292,9 +292,10 @@ * ------ ------ * LCD LCD */ + #define BTN_ENC EXP1_03_PIN #define BTN_EN1 EXP1_05_PIN #define BTN_EN2 EXP1_07_PIN - #define BTN_ENC EXP1_03_PIN + #define DOGLCD_CS EXP1_08_PIN #define DOGLCD_A0 EXP1_06_PIN #define DOGLCD_SCK EXP1_04_PIN @@ -457,8 +458,6 @@ #define DOGLCD_SCK EXP2_02_PIN #define DOGLCD_MOSI EXP2_06_PIN - #define LCD_BACKLIGHT_PIN -1 - #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems // results in LCD soft SPI mode 3, SD soft SPI mode 0 diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h index 956f9a798103..ea340a9f9f36 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -598,8 +598,8 @@ // // NeoPixel LED // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN P1_24 +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN P1_24 #endif /** diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h index ee3934a4ef2d..94ce0b097b7b 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h @@ -112,7 +112,7 @@ // LCD / Controller // #if !defined(BEEPER_PIN) && HAS_WIRED_LCD && DISABLED(LCD_USE_I2C_BUZZER) - #define BEEPER_PIN P1_30 // (37) not 5V tolerant + #define BEEPER_PIN P1_30 // (EXP1-1) Not 5V-tolerant #endif // diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h index 1e45286fbf85..335d6b9d23e7 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h @@ -117,31 +117,25 @@ // Note: These pins are all digitally shared with the EXP1/EXP2 Connector. // Using them with an LCD connected or configured will lead to hangs & crashes. // - -// 5V -// NC -// GND -#define PIN_P0_17 P0_17 -#define PIN_P0_16 P0_16 -#define PIN_P0_15 P0_15 +//#define PIN_P0_17 P0_17 // 5V +//#define PIN_P0_16 P0_16 // NC +//#define PIN_P0_15 P0_15 // GND // // Connector J8 // - -// GND -#define PIN_P1_22 P1_22 -#define PIN_P1_23 P1_23 // PWM Capable -#define PIN_P2_12 P2_12 // Interrupt Capable -#define PIN_P2_11 P2_11 // Interrupt Capable +#define PIN_P1_22 P1_22 // GND +#define PIN_P1_23 P1_23 // PWM-capable +#define PIN_P2_12 P2_12 // Interrupt-capable +#define PIN_P2_11 P2_11 // Interrupt-capable // // Průša i3 MMU1 (Multi Material Multiplexer) Support // #if HAS_PRUSA_MMU1 - #define E_MUX0_PIN P1_23 // J8-3 - #define E_MUX1_PIN P2_12 // J8-4 - #define E_MUX2_PIN P2_11 // J8-5 + #define E_MUX0_PIN PIN_P1_23 // J8-3 + #define E_MUX1_PIN PIN_P2_12 // J8-4 + #define E_MUX2_PIN PIN_P2_11 // J8-5 #endif // @@ -177,21 +171,19 @@ #if SD_CONNECTION_IS(CUSTOM_CABLE) /** - * A custom cable is needed. See the README file in the - * Marlin\src\config\examples\Mks\Sbase directory - * P0.27 is on EXP2 and the on-board SD card's socket. That means it can't be - * used as the SD_DETECT for the LCD's SD card. + * A custom cable is needed. + * See https://github.com/MarlinFirmware/Configurations/blob/release-2.1/config/examples/Mks/Sbase/README.md + * P0.27 is on EXP2 and the on-board SD card socket so it can't be used as SD_DETECT for the LCD SD card. * - * The best solution is to use the custom cable to connect the LCD's SD_DETECT - * to a pin NOT on EXP2. + * The best solution is to use the custom cable to connect the LCD SD_DETECT to a pin NOT on EXP2. * - * If you can't find a pin to use for the LCD's SD_DETECT then comment out - * SD_DETECT_PIN entirely and remove that wire from the the custom cable. + * If you can't find a pin to use for the LCD SD_DETECT then comment out SD_DETECT_PIN and remove that wire + * from the the custom cable. */ - #define SD_DETECT_PIN P2_11 // J8-5 (moved from EXP2 P0.27) - #define SD_SCK_PIN P1_22 // J8-2 (moved from EXP2 P0.7) - #define SD_MISO_PIN P1_23 // J8-3 (moved from EXP2 P0.8) - #define SD_MOSI_PIN P2_12 // J8-4 (moved from EXP2 P0.9) + #define SD_DETECT_PIN PIN_P2_11 // J8-5 (moved from EXP2 P0.27) + #define SD_SCK_PIN PIN_P1_22 // J8-2 (moved from EXP2 P0.7) + #define SD_MISO_PIN PIN_P1_23 // J8-3 (moved from EXP2 P0.8) + #define SD_MOSI_PIN PIN_P2_12 // J8-4 (moved from EXP2 P0.9) #define SD_SS_PIN P0_28 #define SOFTWARE_SPI // With a custom cable we need software SPI because the // selected pins are not on a hardware SPI controller @@ -212,17 +204,28 @@ #endif /** - * Smart LCD adapter - * - * The Smart LCD adapter can be used for the two 10 pin LCD controllers such as - * REPRAP_DISCOUNT_SMART_CONTROLLER. It can't be used for controllers that use - * DOGLCD_A0, DOGLCD_CS, LCD_PINS_D5, LCD_PINS_D6 or LCD_PINS_D7. A custom cable - * is needed to pick up 5V for the EXP1 connection. - * - * SD card on the LCD uses the same SPI signals as the LCD. This results in garbage/lines - * on the LCD display during accesses of the SD card. The menus/code has been arranged so - * that the garbage/lines are erased immediately after the SD card accesses are completed. + * ------ ------ + * 1.31 | 1 2 | 1.30 0.08 | 1 2 | 0.07 + * 0.18 | 3 4 | 0.16 3.25 | 3 4 | 0.28 + * 0.15 | 5 6 -- 3.26 | 5 6 0.09 + * -- | 7 8 | -- 0.27 | 7 8 | RESET + * GND | 9 10 | 5V GND | 9 10 | -- + * ------ ------ + * EXP1 EXP2 */ +#define EXP1_01_PIN P1_31 +#define EXP1_02_PIN P1_30 +#define EXP1_03_PIN P0_18 +#define EXP1_04_PIN P0_16 +#define EXP1_05_PIN P0_15 + +#define EXP2_01_PIN P0_08 +#define EXP2_02_PIN P0_07 +#define EXP2_03_PIN P3_25 +#define EXP2_04_PIN P0_28 +#define EXP2_05_PIN P3_26 +#define EXP2_06_PIN P0_09 +#define EXP2_07_PIN P0_27 // // LCD / Controller @@ -230,23 +233,22 @@ #if IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) - #define TFTGLCD_CS P3_25 // EXP2.3 + #define TFTGLCD_CS EXP2_03_PIN #endif - #if SD_CONNECTION_IS(LCD) - #define SD_DETECT_PIN P0_28 // EXP2.4 + #define SD_DETECT_PIN EXP2_04_PIN #endif #elif HAS_WIRED_LCD - #define BEEPER_PIN P1_31 // EXP1.1 - #define BTN_ENC P1_30 // EXP1.2 - #define BTN_EN1 P3_26 // EXP2.5 - #define BTN_EN2 P3_25 // EXP2.3 - #define LCD_PINS_RS P0_16 // EXP1.4 - #define LCD_SDSS P0_28 // EXP2.4 - #define LCD_PINS_EN P0_18 // EXP1.3 - #define LCD_PINS_D4 P0_15 // EXP1.5 + #define BEEPER_PIN EXP1_01_PIN + #define BTN_ENC EXP1_02_PIN + #define BTN_EN1 EXP2_05_PIN + #define BTN_EN2 EXP2_03_PIN + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_SDSS EXP2_04_PIN + #define LCD_PINS_EN EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN #if ANY(VIKI2, miniVIKI) #define DOGLCD_SCK SD_SCK_PIN #define DOGLCD_MOSI SD_MOSI_PIN @@ -264,9 +266,9 @@ * Pins 6, 7 & 8 on EXP2 are no connects. That means a second special * cable will be needed if the RGB LEDs are to be active. */ - #define DOGLCD_CS P0_18 // EXP1.3 (LCD_EN on FYSETC schematic) - #define DOGLCD_A0 P0_16 // EXP1.4 (LCD_A0 on FYSETC schematic) - #define DOGLCD_SCK P2_11 // J8-5 (SCK on FYSETC schematic) + #define DOGLCD_CS EXP1_03_PIN // LCD_EN + #define DOGLCD_A0 EXP1_04_PIN // LCD_A0 + #define DOGLCD_SCK PIN_P2_11 // J8-5 (SCK on FYSETC schematic) #define DOGLCD_MOSI P4_28 // J8-6 (MOSI on FYSETC schematic) //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems @@ -274,16 +276,16 @@ #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN P2_12 // J8-4 (LCD_D6 on FYSETC schematic) + #define RGB_LED_R_PIN PIN_P2_12 // J8-4 (LCD_D6 on FYSETC schematic) #endif #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN P1_23 // J8-3 (LCD_D5 on FYSETC schematic) + #define RGB_LED_G_PIN PIN_P1_23 // J8-3 (LCD_D5 on FYSETC schematic) #endif #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN P1_22 // J8-2 (LCD_D7 on FYSETC schematic) + #define RGB_LED_B_PIN PIN_P1_22 // J8-2 (LCD_D7 on FYSETC schematic) #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN P2_12 + #define NEOPIXEL_PIN PIN_P2_12 #endif #elif ENABLED(MINIPANEL) @@ -300,10 +302,10 @@ #if HAS_DRIVER(TMC2130) // J8 - #define X_CS_PIN P1_22 - #define Y_CS_PIN P1_23 - #define Z_CS_PIN P2_12 - #define E0_CS_PIN P2_11 + #define X_CS_PIN PIN_P1_22 + #define Y_CS_PIN PIN_P1_23 + #define Z_CS_PIN PIN_P2_12 + #define E0_CS_PIN PIN_P2_11 #define E1_CS_PIN P4_28 // Hardware SPI is on EXP2. See if you can make it work: @@ -330,13 +332,13 @@ * Worst case you may have to give up the LCD * RX pins need to be interrupt capable */ - #define X_SERIAL_TX_PIN P1_22 // J8-2 - #define X_SERIAL_RX_PIN P2_12 // J8-4 Interrupt Capable + #define X_SERIAL_TX_PIN PIN_P1_22 // J8-2 + #define X_SERIAL_RX_PIN PIN_P2_12 // J8-4 Interrupt Capable - #define Y_SERIAL_TX_PIN P1_23 // J8-3 - #define Y_SERIAL_RX_PIN P2_11 // J8-5 Interrupt Capable + #define Y_SERIAL_TX_PIN PIN_P1_23 // J8-3 + #define Y_SERIAL_RX_PIN PIN_P2_11 // J8-5 Interrupt Capable - #define Z_SERIAL_TX_PIN P2_12 // J8-4 + #define Z_SERIAL_TX_PIN PIN_P2_12 // J8-4 #define Z_SERIAL_RX_PIN P0_25 // TH3 #define E0_SERIAL_TX_PIN P4_28 // J8-6 diff --git a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h index f3b134cd36f4..84c2eca91984 100644 --- a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h +++ b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h @@ -167,7 +167,7 @@ #define TEMP_2_PIN P0_26_A3 // A3 - (63) - J5-3 & AUX-2 #define TEMP_3_PIN P1_30_A4 // A4 - (37) - BUZZER_PIN //#define TEMP_4_PIN P1_31_A5 // A5 - (49) - SD_DETECT_PIN -//#define ?? P0_03_A6 // A6 - ( 0) - RXD0 - J4-4 & AUX-1 +//#define PIN_P0_03 P0_03_A6 // A6 - ( 0) - RXD0 - J4-4 & AUX-1 #define FILWIDTH_PIN P0_02_A7 // A7 - ( 1) - TXD0 - J4-5 & AUX-1 // @@ -293,14 +293,13 @@ #if ENABLED(CR10_STOCKDISPLAY) // Re-Arm can support Creality stock display without SD card reader and single cable on EXP3. - // Re-Arm J3 pins 1 (p1.31) & 2 (P3.26) are not used. Stock cable will need to have one + // Re-Arm J3 pins 1 (P1.31) & 2 (P3.26) are not used. Stock cable will need to have one // 10-pin IDC connector trimmed or replaced with a 12-pin IDC connector to fit J3. - // Requires REVERSE_ENCODER_DIRECTION in Configuration.h #define BEEPER_PIN P2_11 // J3-3 & AUX-4 - #define BTN_EN1 P0_16 // J3-7 & AUX-4 - #define BTN_EN2 P1_23 // J3-5 & AUX-4 + #define BTN_EN1 P1_23 // J3-5 & AUX-4 + #define BTN_EN2 P0_16 // J3-7 & AUX-4 #define BTN_ENC P3_25 // J3-4 & AUX-4 #define LCD_PINS_RS P0_15 // J3-9 & AUX-4 (CS) @@ -325,8 +324,8 @@ #elif HAS_WIRED_LCD #if ENABLED(FYSETC_MINI_12864) - #define BEEPER_PIN P1_01 - #define BTN_ENC P1_04 + #define BEEPER_PIN P1_01 // (79) J12-12 + #define BTN_ENC P1_04 // (77) J12-10 #else #define BEEPER_PIN P1_30 // (37) not 5V tolerant #define BTN_ENC P2_11 // (35) J3-3 & AUX-4 @@ -367,14 +366,14 @@ #else #if ENABLED(FYSETC_MINI_12864) - #define DOGLCD_SCK P0_15 - #define DOGLCD_MOSI P0_18 + #define DOGLCD_SCK P0_15 // (52) (SCK) J3-9 & AUX-3 + #define DOGLCD_MOSI P0_18 // (51) (MOSI) J3-10 & AUX-3 // EXP1 on LCD adapter is not usable - using Ethernet connector instead - #define DOGLCD_CS P1_09 - #define DOGLCD_A0 P1_14 - //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems - // results in LCD soft SPI mode 3, SD soft SPI mode 0 + #define DOGLCD_CS P1_09 // (74) J12-7 + #define DOGLCD_A0 P1_14 // (73) J12-6 + //#define FORCE_SOFT_SPI // Use this if Hardware SPI causes display problems. + // Results in LCD Software SPI mode 3, SD Software SPI mode 0. #define LCD_RESET_PIN P0_16 // Must be high or open for LCD to operate normally. @@ -396,24 +395,22 @@ #define DOGLCD_A0 P2_06 // (59) J3-8 & AUX-2 #endif - #define LCD_BACKLIGHT_PIN P0_16 //(16) J3-7 & AUX-4 - only used on DOGLCD controllers + #define LCD_BACKLIGHT_PIN P0_16 // (16) J3-7 & AUX-4 - only used on DOGLCD controllers #define LCD_PINS_EN P0_18 // (51) (MOSI) J3-10 & AUX-3 #define LCD_PINS_D4 P0_15 // (52) (SCK) J3-9 & AUX-3 #if IS_ULTIPANEL #define LCD_PINS_D5 P1_17 // (71) ENET_MDIO #define LCD_PINS_D6 P1_14 // (73) ENET_RX_ER #define LCD_PINS_D7 P1_10 // (75) ENET_RXD1 - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder #endif - #endif #endif #if ENABLED(MINIPANEL) //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 - #endif + #endif #endif // HAS_WIRED_LCD @@ -421,17 +418,17 @@ // Ethernet pins // #if !IS_ULTIPANEL - #define ENET_MDIO P1_17 // (71) J12-4 - #define ENET_RX_ER P1_14 // (73) J12-6 - #define ENET_RXD1 P1_10 // (75) J12-8 + #define ENET_MDIO P1_17 // (71) J12-4 + #define ENET_RX_ER P1_14 // (73) J12-6 + #define ENET_RXD1 P1_10 // (75) J12-8 #endif -#define ENET_MOC P1_16 // (70) J12-3 -#define REF_CLK P1_15 // (72) J12-5 -#define ENET_RXD0 P1_09 // (74) J12-7 -#define ENET_CRS P1_08 // (76) J12-9 -#define ENET_TX_EN P1_04 // (77) J12-10 -#define ENET_TXD0 P1_00 // (78) J12-11 -#define ENET_TXD1 P1_01 // (79) J12-12 +#define ENET_MOC P1_16 // (70) J12-3 +#define REF_CLK P1_15 // (72) J12-5 +#define ENET_RXD0 P1_09 // (74) J12-7 +#define ENET_CRS P1_08 // (76) J12-9 +#define ENET_TX_EN P1_04 // (77) J12-10 +#define ENET_TXD0 P1_00 // (78) J12-11 +#define ENET_TXD1 P1_01 // (79) J12-12 // // SD Support @@ -441,10 +438,10 @@ #endif #if SD_CONNECTION_IS(LCD) - #define SD_SCK_PIN P0_15 // (52) system defined J3-9 & AUX-3 - #define SD_MISO_PIN P0_17 // (50) system defined J3-10 & AUX-3 - #define SD_MOSI_PIN P0_18 // (51) system defined J3-10 & AUX-3 - #define SD_SS_PIN P1_23 // (53) system defined J3-5 & AUX-3 (Sometimes called SDSS) - CS used by Marlin + #define SD_SCK_PIN P0_15 // (52) System-defined J3-9 & AUX-3 + #define SD_MISO_PIN P0_17 // (50) System-defined J3-10 & AUX-3 + #define SD_MOSI_PIN P0_18 // (51) System-defined J3-10 & AUX-3 + #define SD_SS_PIN P1_23 // (53) System-defined J3-5 & AUX-3 (aka SDSS, CS) #elif SD_CONNECTION_IS(ONBOARD) #undef SD_DETECT_PIN #define SD_SCK_PIN P0_07 diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h index 92e97ca8753d..f1753d0e2b95 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h @@ -33,7 +33,7 @@ #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "Azteeg X5 MINI" #endif -#define BOARD_WEBSITE_URL "tiny.cc/x5_mini" +#define BOARD_WEBSITE_URL "panucatt.com" // // LED @@ -56,11 +56,11 @@ #define Z_STOP_PIN P1_28 #ifndef FIL_RUNOUT_PIN - #define FIL_RUNOUT_PIN P2_04 + #define FIL_RUNOUT_PIN _EXP1_09 #endif #ifndef FILWIDTH_PIN - #define FILWIDTH_PIN P0_25_A2 // Analog Input (P0_25) + #define FILWIDTH_PIN _EXP1_04 // Analog Input (P0_25) #endif // @@ -109,6 +109,47 @@ #endif #define FAN1_PIN P1_25 +// +// Headers V1.1 - V3.0 +// +//#define _EXP1_01 -1 // GND +#define _EXP1_02 P1_03 +//#define _EXP1_03 -1 // 3.3V +#define _EXP1_04 P0_25_A2 +#define _EXP1_05 P0_27 // SDA0 +#define _EXP1_06 P4_29 +#define _EXP1_07 P0_28 // SCL0 +#define _EXP1_08 P2_08 +#define _EXP1_09 P2_04 +#define _EXP1_10 P1_22 + +#define _EXP2_01 P1_31 +#define _EXP2_02 P3_26 +#define _EXP2_03 P2_11 +#define _EXP2_04 P3_25 +#define _EXP2_05 P1_23 +#define _EXP2_06 P0_17 +#define _EXP2_07 P0_16 +#define _EXP2_08 P2_06 +#define _EXP2_09 P0_15 +#define _EXP2_10 P0_18 + +// +// Only V2.0 +// +//#define _J7_01 -1 // 3.3V +//#define _J7_02 -1 // GND +#define _J7_03 P1_16 +#define _J7_04 P1_17 +#define _J7_05 P1_15 +#define _J7_06 P0_14 +#define _J7_07 P1_09 +#define _J7_08 P1_10 +#define _J7_09 P1_08 +#define _J7_10 P1_04 +#define _J7_11 P1_00 +#define _J7_12 P1_01 + // // Display // @@ -121,61 +162,60 @@ // 10-pin IDC connector trimmed or replaced with a 12-pin IDC connector to fit J3. // Requires REVERSE_ENCODER_DIRECTION in Configuration.h - #define BEEPER_PIN P2_11 // J3-3 & AUX-4 + #define BEEPER_PIN _EXP2_03 - #define BTN_EN1 P0_16 // J3-7 & AUX-4 - #define BTN_EN2 P1_23 // J3-5 & AUX-4 - #define BTN_ENC P3_25 // J3-4 & AUX-4 + #define BTN_EN1 _EXP2_07 + #define BTN_EN2 _EXP2_05 + #define BTN_ENC _EXP2_04 - #define LCD_PINS_RS P0_15 // J3-9 & AUX-4 (CS) - #define LCD_PINS_EN P0_18 // J3-10 & AUX-3 (SID, MOSI) - #define LCD_PINS_D4 P2_06 // J3-8 & AUX-3 (SCK, CLK) + #define LCD_PINS_RS _EXP2_09 + #define LCD_PINS_EN _EXP2_10 + #define LCD_PINS_D4 _EXP2_08 #else - #define BTN_EN1 P3_26 // (31) J3-2 & AUX-4 - #define BTN_EN2 P3_25 // (33) J3-4 & AUX-4 - #define BTN_ENC P2_11 // (35) J3-3 & AUX-4 + #define BTN_EN1 _EXP2_02 + #define BTN_EN2 _EXP2_04 + #define BTN_ENC _EXP2_03 - #define SD_DETECT_PIN P1_31 // (49) not 5V tolerant J3-1 & AUX-3 - #define KILL_PIN P1_22 // (41) J5-4 & AUX-4 - #define LCD_PINS_RS P0_16 // (16) J3-7 & AUX-4 - #define LCD_SDSS P0_16 // (16) J3-7 & AUX-4 - #define LCD_BACKLIGHT_PIN P0_16 // (16) J3-7 & AUX-4 - only used on DOGLCD controllers - #define LCD_PINS_EN P0_18 // (51) (MOSI) J3-10 & AUX-3 - #define LCD_PINS_D4 P0_15 // (52) (SCK) J3-9 & AUX-3 + #define SD_DETECT_PIN _EXP2_01 + #define KILL_PIN _EXP1_10 + #define LCD_PINS_RS _EXP2_07 + #define LCD_SDSS _EXP2_07 + #define LCD_BACKLIGHT_PIN _EXP2_07 + #define LCD_PINS_EN _EXP2_10 + #define LCD_PINS_D4 _EXP2_09 - #define DOGLCD_A0 P2_06 // (59) J3-8 & AUX-2 + #define DOGLCD_A0 _EXP2_08 #if IS_RRW_KEYPAD - #define SHIFT_OUT_PIN P0_18 // (51) (MOSI) J3-10 & AUX-3 - #define SHIFT_CLK_PIN P0_15 // (52) (SCK) J3-9 & AUX-3 - #define SHIFT_LD_PIN P1_31 // (49) not 5V tolerant J3-1 & AUX-3 + #define SHIFT_OUT_PIN _EXP2_10 + #define SHIFT_CLK_PIN _EXP2_09 + #define SHIFT_LD_PIN _EXP2_01 #elif !IS_NEWPANEL - //#define SHIFT_OUT_PIN P2_11 // (35) J3-3 & AUX-4 - //#define SHIFT_CLK_PIN P3_26 // (31) J3-2 & AUX-4 - //#define SHIFT_LD_PIN P3_25 // (33) J3-4 & AUX-4 - //#define SHIFT_EN_PIN P1_22 // (41) J5-4 & AUX-4 + //#define SHIFT_OUT_PIN _EXP2_03 + //#define SHIFT_CLK_PIN _EXP2_02 + //#define SHIFT_LD_PIN _EXP2_04 + //#define SHIFT_EN_PIN _EXP1_10 #endif #if ANY(VIKI2, miniVIKI) - #define BEEPER_PIN P1_30 // (37) may change if cable changes - #define DOGLCD_CS P0_26 // (63) J5-3 & AUX-2 + #define BEEPER_PIN P1_30 + #define DOGLCD_CS P0_26 #define DOGLCD_SCK SD_SCK_PIN #define DOGLCD_MOSI SD_MOSI_PIN - #define STAT_LED_BLUE_PIN P0_26 // (63) may change if cable changes - #define STAT_LED_RED_PIN P1_21 // ( 6) may change if cable changes + #define STAT_LED_BLUE_PIN P0_26 + #define STAT_LED_RED_PIN P1_21 - //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 #else #if IS_ULTIPANEL - #define LCD_PINS_D5 P1_17 // (71) ENET_MDIO - #define LCD_PINS_D6 P1_14 // (73) ENET_RX_ER - #define LCD_PINS_D7 P1_10 // (75) ENET_RXD1 + #define LCD_PINS_D5 P1_17 + #define LCD_PINS_D6 P1_14 + #define LCD_PINS_D7 P1_10 #endif - #define BEEPER_PIN P1_30 // (37) not 5V tolerant - #define DOGLCD_CS P0_16 // (16) + #define BEEPER_PIN P1_30 + #define DOGLCD_CS _EXP2_07 #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder @@ -183,7 +223,7 @@ #endif - #if ENABLED(MINIPANEL) + #if ANY(VIKI2, miniVIKI, MINIPANEL) //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 #endif @@ -199,10 +239,10 @@ #endif #if SD_CONNECTION_IS(LCD) - #define SD_SCK_PIN P0_15 - #define SD_MISO_PIN P0_17 - #define SD_MOSI_PIN P0_18 - #define SD_SS_PIN P1_23 + #define SD_SCK_PIN _EXP2_09 + #define SD_MISO_PIN _EXP2_06 + #define SD_MOSI_PIN _EXP2_10 + #define SD_SS_PIN _EXP2_05 #elif SD_CONNECTION_IS(ONBOARD) #undef SD_DETECT_PIN #define SD_SCK_PIN P0_07 diff --git a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h index 6d2018ef352b..f329636f2b30 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h @@ -87,8 +87,8 @@ #endif // LED driving pin -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN P1_24 +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN P1_24 #endif // diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h index 362aafe12e75..a6acde35ffe3 100644 --- a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h @@ -158,6 +158,37 @@ #define SPINDLE_DIR_PIN P2_06 // FET 4 #endif +/** ------ ------ + * (BEEPER) 1.31 | 1 2 | 1.30 (BTN_ENC) (MISO) 0.8 | 1 2 | 0.7 (SD_SCK) + * (EN) 0.18 | 3 4 | 0.16 (RS) (EN1) 3.26 | 3 4 | 0.28 (SD_CS2) + * (D4) 0.15 5 6 | -- (EN2) 3.25 5 6 | 0.9 (SD_MOSI) + * -- | 7 8 | 0.27 (D7) (SD_DET) 0.27 | 7 8 | 2.11 + * GND | 9 10 | 5V GND | 9 10 | -- + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_01_PIN P1_31 +#define EXP1_02_PIN P1_30 +#define EXP1_03_PIN P0_18 +#define EXP1_04_PIN P0_16 +#define EXP1_05_PIN P0_15 +#define EXP1_06_PIN -1 +#define EXP1_07_PIN -1 +#define EXP1_08_PIN P0_27 // (also on EXP2-7) +#define EXP1_09_PIN -1 +#define EXP1_10_PIN -1 + +#define EXP2_01_PIN P0_08 +#define EXP2_02_PIN P0_07 +#define EXP2_03_PIN P3_26 +#define EXP2_04_PIN P0_28 +#define EXP2_05_PIN P3_25 +#define EXP2_06_PIN P0_09 +#define EXP2_07_PIN P0_27 // (also on EXP1-8) +#define EXP2_08_PIN P2_11 +#define EXP2_09_PIN -1 +#define EXP2_10_PIN -1 + // // LCD / Controller // @@ -171,54 +202,54 @@ #if ENABLED(FYSETC_MINI_12864) - #define FORCE_SOFT_SPI // REQUIRED - results in LCD soft SPI mode 3 + #define FORCE_SOFT_SPI // REQUIRED. Results in LCD Software SPI mode 3 - #define BEEPER_PIN P1_31 // EXP1-1 - #define BTN_ENC P1_30 // EXP1-2 - #define DOGLCD_CS P0_18 // EXP1-3 - #define DOGLCD_A0 P0_16 // EXP1-4 - #define LCD_RESET_PIN P0_15 // EXP1-5 + #define BEEPER_PIN EXP1_01_PIN + #define BTN_ENC EXP1_02_PIN + #define DOGLCD_CS EXP1_03_PIN + #define DOGLCD_A0 EXP1_04_PIN + #define LCD_RESET_PIN EXP1_05_PIN // A custom cable is REQUIRED for EXP2 cable because the SCK & MOSI on the card's EXP2 are dedicated // to the onboard SD card. All required EXP2 signals come from the Ethernet connector. Pin 1 of this // connector is the one nearest the motor power connector. - #define DOGLCD_SCK P1_17 // EXP2-2 => Ethernet pin 5 (bottom, 3 from left) - #define BTN_EN2 P1_09 // EXP2-3 => Ethernet pin 9 (bottom, 5 from left) - #define BTN_EN1 P1_04 // EXP2-5 => Ethernet pin 11 (bottom, 6 from left) - #define DOGLCD_MOSI P1_01 // EXP2-6 => Ethernet pin 13 (bottom, 7 from left) + #define DOGLCD_SCK P1_17 // LCD2-2 => Ethernet pin 5 (bottom, 3 from left) + #define BTN_EN2 P1_09 // LCD2-3 => Ethernet pin 9 (bottom, 5 from left) + #define BTN_EN1 P1_04 // LCD2-5 => Ethernet pin 11 (bottom, 6 from left) + #define DOGLCD_MOSI P1_01 // LCD2-6 => Ethernet pin 13 (bottom, 7 from left) // A custom EXP1 cable is required colored LEDs. Pins 1-5, 9, 10 of the cable go to pins 1-5, 9, 10 // on the board's EXP1 connector. Pins 6, 7, and 8 of the EXP1 cable go to the Ethernet connector. // Rev 1.2 displays do NOT require the RGB LEDs. 2.0 and 2.1 displays do require RGB. #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN P1_16 // EXP1-6 => Ethernet pin 6 (top row, 3 from left) + #define RGB_LED_R_PIN P1_16 // LCD1-6 => Ethernet pin 6 (top row, 3 from left) #endif #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN P1_10 // EXP1-7 => Ethernet pin 10 (top row, 5 from left) + #define RGB_LED_G_PIN P1_10 // LCD1-7 => Ethernet pin 10 (top row, 5 from left) #endif #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN P1_00 // EXP1-8 => Ethernet pin 12 (top row, 6 from left) + #define RGB_LED_B_PIN P1_00 // LCD1-8 => Ethernet pin 12 (top row, 6 from left) #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN P1_16 // EXP1-6 => Ethernet pin 6 (top row, 3 from left) + #define NEOPIXEL_PIN P1_16 // LCD1-6 => Ethernet pin 6 (top row, 3 from left) #endif #elif HAS_WIRED_LCD - #define BEEPER_PIN P1_31 // EXP1-1 - //#define SD_DETECT_PIN P0_27 // EXP2-7 + #define BEEPER_PIN EXP1_01_PIN + //#define SD_DETECT_PIN EXP2_07_PIN - #define BTN_EN1 P3_26 // EXP2-5 - #define BTN_EN2 P3_25 // EXP2-3 - #define BTN_ENC P1_30 // EXP1-2 + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN + #define BTN_ENC EXP1_02_PIN - #define LCD_PINS_RS P0_16 // EXP1-4 - #define LCD_SDSS P0_28 // EXP2-4 - #define LCD_PINS_EN P0_18 // EXP1-3 - #define LCD_PINS_D4 P0_15 // EXP1-5 + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_SDSS EXP2_04_PIN + #define LCD_PINS_EN EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN - #define KILL_PIN P2_11 // EXP2-10 + #define KILL_PIN EXP2_08_PIN #endif // HAS_WIRED_LCD @@ -230,11 +261,11 @@ #endif #if SD_CONNECTION_IS(LCD) || SD_CONNECTION_IS(ONBOARD) - #define SD_SCK_PIN P0_07 // (52) system defined J3-9 & AUX-3 - #define SD_MISO_PIN P0_08 // (50) system defined J3-10 & AUX-3 - #define SD_MOSI_PIN P0_09 // (51) system defined J3-10 & AUX-3 + #define SD_SCK_PIN EXP2_02_PIN // (52) System-defined J3-9 & AUX-3 + #define SD_MISO_PIN EXP2_01_PIN // (50) System-defined J3-10 & AUX-3 + #define SD_MOSI_PIN EXP2_06_PIN // (51) System-defined J3-10 & AUX-3 #if SD_CONNECTION_IS(LCD) - #define SD_SS_PIN P1_23 // (53) system defined J3-5 & AUX-3 (Sometimes called SDSS) - CS used by Marlin + #define SD_SS_PIN P1_23 // (53) System-defined J3-5 & AUX-3 (Sometimes called SDSS) - CS used by Marlin #else #undef SD_DETECT_PIN #define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card @@ -257,30 +288,3 @@ //#define ENET_TX_EN P1_04 // Ethernet pin 11 (bottom, 6 from left) //#define ENET_TXD0 P1_00 // Ethernet pin 12 (top row, 6 from left) //#define ENET_TXD1 P1_01 // Ethernet pin 13 (bottom, 7 from left) - -/** - * EXP1 pins - * 1 - P1_31 - * 2 - P1_30 - * 3 - P0_18 - * 4 - P0_16 - * 5 - P0_15 - * 6 - N/C - * 7 - N/C - * 8 - P0_27 (also on EXP2-7) - * 9 - GND - * 10 - +5V - * - * - * EXP2 pins - * 1 - P0_08 - * 2 - P0_07 - * 3 - P3_26 - * 4 - P0_28 - * 5 - P3_25 - * 6 - P0_09 - * 7 - P0_27 (also on EXP1_8) - * 8 - P2_11 - * 9 - GND - * 10 - N/C - */ diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h index 4043f868cff3..613ba19e15ae 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h @@ -436,6 +436,9 @@ #endif // HAS_WIRED_LCD +// +// SD Card +// #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD #endif diff --git a/Marlin/src/pins/mega/pins_MEGACONTROLLER.h b/Marlin/src/pins/mega/pins_MEGACONTROLLER.h index 049917b6b689..3868f11c11b0 100644 --- a/Marlin/src/pins/mega/pins_MEGACONTROLLER.h +++ b/Marlin/src/pins/mega/pins_MEGACONTROLLER.h @@ -129,31 +129,59 @@ // // Misc. Functions // -#define SDSS 53 +#define SDSS MINI_06 #define LED_PIN 13 #ifndef CASE_LIGHT_PIN #define CASE_LIGHT_PIN 2 #endif +/** + * MegaController LCD/SD Connector + * + * SDD MOSI SDSS -- RESET -- LCDSS A0 KILL ENC + * 49 51 53 | 45 47 12 10 + * PL0 PB2 PB0 | PL4 PL2 PB6 PB4 + * ---------------------------------------------------------- + * | 2 4 6 8 10 12 14 16 18 20 | + * | 1 3 5 7 9 11 13 15 17 19 | + * ---------------------------------------------------------- + * | PB3 PB1 | | PL5 PL3 PL1 PB5 + * | 50 52 | | 44 46 48 11 + * 5V MISO SCK GND 3V3 -- BL BEEP EN1 EN2 + */ +#define MINI_02 49 // SD_DETECT +#define MINI_03 50 // MISO +#define MINI_04 51 // MOSI +#define MINI_05 52 // SCK +#define MINI_06 53 // SDSS +#define MINI_13 44 // BACKLIGHT +#define MINI_14 45 // LCDSS +#define MINI_15 46 // BEEP +#define MINI_16 47 // A0 +#define MINI_17 48 // EN1 +#define MINI_18 12 // KILL +#define MINI_19 11 // EN2 +#define MINI_20 10 // ENC + // // LCD / Controller // #if ENABLED(MINIPANEL) - #define BEEPER_PIN 46 + #define BEEPER_PIN MINI_15 - #define DOGLCD_A0 47 - #define DOGLCD_CS 45 - #define LCD_BACKLIGHT_PIN 44 // backlight LED on PA3 + #define DOGLCD_A0 MINI_16 + #define DOGLCD_CS MINI_14 + #define LCD_BACKLIGHT_PIN MINI_13 // backlight LED on PA3 - #define KILL_PIN 12 + #define KILL_PIN MINI_18 - #define BTN_EN1 48 - #define BTN_EN2 11 - #define BTN_ENC 10 + #define BTN_ENC MINI_20 + #define BTN_EN1 MINI_17 + #define BTN_EN2 MINI_19 - #define SD_DETECT_PIN 49 + #define SD_DETECT_PIN MINI_02 //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 diff --git a/Marlin/src/pins/mega/pins_PICA.h b/Marlin/src/pins/mega/pins_PICA.h index 5e9d607a7864..0a6478439c58 100644 --- a/Marlin/src/pins/mega/pins_PICA.h +++ b/Marlin/src/pins/mega/pins_PICA.h @@ -43,15 +43,6 @@ #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; -*/ - // // Servos // @@ -136,25 +127,53 @@ // // SD Support // -#define SD_DETECT_PIN 49 -#define SDSS 53 +#define SD_DETECT_PIN EXP2_07_PIN +#define SDSS EXP2_04_PIN + +/** PICA Expansion Headers + * ------ ------ + * (BEEP) 29 | 1 2 | 31 (ENC) (MISO) 50 | 1 2 | 52 (SCK) + * (LCD_EN) 30 | 3 4 | 33 (LCD_RS) (EN1) 47 | 3 4 | 53 (SDSS) + * (LCD_D4) 35 5 6 | 32 (LCD_D5) (EN2) 48 5 6 | 51 (MOSI) + * (LCD_D6) 37 | 7 8 | 36 (LCD_D7) (SDDET) 49 | 7 8 | 41 (KILL) + * GND | 9 10 | 5V -- | 9 10 | -- + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_01_PIN 29 // BEEPER +#define EXP1_02_PIN 31 // ENC +#define EXP1_03_PIN 30 // LCD_EN +#define EXP1_04_PIN 33 // LCD_RS +#define EXP1_05_PIN 35 // LCD_D4 +#define EXP1_06_PIN 32 // LCD_D5 +#define EXP1_07_PIN 37 // LCD_D6 +#define EXP1_08_PIN 36 // LCD_D7 + +#define EXP2_01_PIN 50 // MISO +#define EXP2_02_PIN 52 // SCK +#define EXP2_03_PIN 47 // EN1 +#define EXP2_04_PIN 53 // SDSS +#define EXP2_05_PIN 48 // EN2 +#define EXP2_06_PIN 51 // MOSI +#define EXP2_07_PIN 49 // SDDET +#define EXP2_08_PIN 41 // KILL // // LCD / Controller // -#define BEEPER_PIN 29 +#define BEEPER_PIN EXP1_01_PIN #if HAS_WIRED_LCD - #define LCD_PINS_RS 33 - #define LCD_PINS_EN 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 + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_EN EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_07_PIN + #define LCD_PINS_D7 EXP1_08_PIN + + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN + #define BTN_ENC EXP1_02_PIN + + #define LCD_SDSS EXP2_04_PIN #endif diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index d162881993ef..71d663d1eaf3 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -1053,6 +1053,11 @@ #endif +// +// LCD / Controller Pins based on board expansion headers with adapters +// +#include "pins_lcd.h" + // // Post-process pins according to configured settings // diff --git a/Marlin/src/pins/pins_lcd.h b/Marlin/src/pins/pins_lcd.h new file mode 100644 index 000000000000..e5cc88059754 --- /dev/null +++ b/Marlin/src/pins/pins_lcd.h @@ -0,0 +1,45 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * pins_lcd.h - Define LCD pins based on the EXP connector / adapter + */ + +/** + * Certain displays use LCD_PINS_RS as LCD_RESET_PIN + */ +#if !defined(LCD_RESET_PIN) && ANY(MKS_12864OLED, MKS_12864OLED_SSD1306, FYSETC_242_OLED_12864, ZONESTAR_12864OLED, K3D_242_OLED_CONTROLLER) + #define LCD_RESET_PIN LCD_PINS_RS +#endif + +/** + * Make sure DOGLCD_SCK and DOGLCD_MOSI are defined. + */ +#if HAS_MARLINUI_U8GLIB + #ifndef DOGLCD_SCK + #define DOGLCD_SCK SD_SCK_PIN + #endif + #ifndef DOGLCD_MOSI + #define DOGLCD_MOSI SD_MOSI_PIN + #endif +#endif diff --git a/Marlin/src/pins/pins_postprocess.h b/Marlin/src/pins/pins_postprocess.h index e97b6ceaa440..abe193d9794a 100644 --- a/Marlin/src/pins/pins_postprocess.h +++ b/Marlin/src/pins/pins_postprocess.h @@ -1723,3 +1723,12 @@ #undef DIAG_REMAPPED #undef _E_DIAG_EXISTS #undef E_DIAG_EXISTS + +// Get a NeoPixel pin from the LCD or board, if provided +#ifndef NEOPIXEL_PIN + #ifdef LCD_NEOPIXEL_PIN + #define NEOPIXEL_PIN LCD_NEOPIXEL_PIN + #elif defined(BOARD_NEOPIXEL_PIN) + #define NEOPIXEL_PIN BOARD_NEOPIXEL_PIN + #endif +#endif diff --git a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h index b4f09b7136b1..6d37fcf7df77 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h @@ -169,6 +169,36 @@ #define E_MUX2_PIN 78 // 84 in MK2 Firmware, with BEEPER as 78 #endif +// +// EXP Headers +// +#define EXP1_01_PIN 84 // PH2 +#define EXP1_02_PIN 9 // PH6 +#define EXP1_03_PIN 18 // TX1 +#define EXP1_04_PIN 82 // PD5 +#define EXP1_05_PIN 19 // RX1 +#define EXP1_06_PIN 70 // PG4 +#define EXP1_07_PIN 85 // PH7 +#define EXP1_08_PIN 71 // PG3 + +#define EXP2_01_PIN 50 // MISO +#define EXP2_02_PIN 52 // SCK +#define EXP2_03_PIN 72 // PJ2 +#define EXP2_04_PIN 53 // SDSS +#define EXP2_05_PIN 14 // TX3 +#define EXP2_06_PIN 51 // MOSI +#define EXP2_07_PIN 15 // RX3 +#define EXP2_08_PIN -1 // RESET + +#define EXP3_01_PIN 62 // PK0 (A8) +#define EXP3_02_PIN 76 // PJ5 +#define EXP3_03_PIN 20 // SDA +#define EXP3_04_PIN -1 // GND +#define EXP3_05_PIN 21 // SCL +#define EXP3_06_PIN 16 // RX2 +#define EXP3_07_PIN -1 // GND +#define EXP3_08_PIN 17 // TX2 + // // LCD / Controller // @@ -179,26 +209,26 @@ #if ANY(IS_ULTIPANEL, TOUCH_UI_ULTIPANEL, TOUCH_UI_FTDI_EVE) #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS 85 - #define LCD_PINS_EN 71 - #define LCD_PINS_D4 70 - #define BTN_EN1 18 - #define BTN_EN2 19 + #define LCD_PINS_RS EXP1_07_PIN + #define LCD_PINS_EN EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN + #define BTN_EN1 EXP1_03_PIN + #define BTN_EN2 EXP1_05_PIN #else - #define LCD_PINS_RS 82 - #define LCD_PINS_EN 18 // On 0.6b, use 61 - #define LCD_PINS_D4 19 // On 0.6b, use 59 - #define LCD_PINS_D5 70 - #define LCD_PINS_D6 85 - #define LCD_PINS_D7 71 - #define BTN_EN1 14 - #define BTN_EN2 72 + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_EN EXP1_03_PIN // On 0.6b, use 61 + #define LCD_PINS_D4 EXP1_05_PIN // On 0.6b, use 59 + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_07_PIN + #define LCD_PINS_D7 EXP1_08_PIN + #define BTN_EN1 EXP2_05_PIN + #define BTN_EN2 EXP2_03_PIN #endif - #define BTN_ENC 9 // AUX-2 - #define BEEPER_PIN 84 // AUX-4 + #define BTN_ENC EXP1_02_PIN // AUX-2 + #define BEEPER_PIN EXP1_01_PIN // AUX-4 - #define SD_DETECT_PIN 15 + #define SD_DETECT_PIN EXP2_07_PIN #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder diff --git a/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h b/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h index 824dbd9f2df8..08c40822fc76 100644 --- a/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h +++ b/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h @@ -192,7 +192,7 @@ // // Misc. Functions // -#define SDSS 53 +#define SDSS EXP2_04_PIN #define LED_PIN 13 #define KILL_PIN 41 @@ -201,80 +201,98 @@ #endif /** - * ----- ----- - * 5V/D41 | · · | GND 5V | · · | GND - * RESET | · · | D49 (SD_DETECT) (LCD_D7) D29 | · · | D27 (LCD_D6) - * (MOSI) D51 | · · D33 (BTN_EN2) (LCD_D5) D25 | · · D23 (LCD_D4) - * (SD_SS) D53 | · · | D31 (BTN_EN1) (LCD_RS) D16 | · · | D17 (LCD_EN) - * (SCK) D52 | · · | D50 (MISO) (BTN_ENC) D35 | · · | D37 (BEEPER) - * ----- ----- - * EXP2 EXP1 + * ------ ------ + * (BEEPER) D37 | 1 2 | D35 (BTN_ENC) (MISO) D50 | 1 2 | D52 (SCK) + * (LCD_EN) D17 | 3 4 | D16 (LCD_RS) (BTN_EN1) D31 | 3 4 | D53 (SD_SS) + * (LCD_D4) D23 5 6 | D25 (LCD_D5) (BTN_EN2) D33 5 6 | D51 (MOSI) + * (LCD_D6) D27 | 7 8 | D29 (LCD_D7) (SD_DETECT) D49 | 7 8 | RESET + * GND | 9 10 | 5V GND | 9 10 | 5V / D41 + * ------ ------ + * EXP1 EXP2 */ +#define EXP1_01_PIN 37 // BEEPER +#define EXP1_02_PIN 35 // ENC +#define EXP1_03_PIN 17 // LCD_EN +#define EXP1_04_PIN 16 // LCD_RS +#define EXP1_05_PIN 23 // LCD_D4 +#define EXP1_06_PIN 25 // LCD_D5 +#define EXP1_07_PIN 27 // LCD_D6 +#define EXP1_08_PIN 29 // LCD_D7 + +#define EXP2_01_PIN 50 // MISO +#define EXP2_02_PIN 52 // SCK +#define EXP2_03_PIN 31 // EN1 +#define EXP2_04_PIN 53 // SD_SS +#define EXP2_05_PIN 33 // EN2 +#define EXP2_06_PIN 51 // MOSI +#define EXP2_07_PIN 49 // SD_DETECT +#define EXP2_08_PIN -1 // RESET + // // LCDs and Controllers // -#define SD_DETECT_PIN 49 +#define SD_DETECT_PIN EXP2_07_PIN #if ENABLED(FYSETC_242_OLED_12864) - #define BTN_EN1 37 - #define BTN_EN2 29 - #define BTN_ENC 35 - #define BEEPER_PIN 31 - - #define LCD_PINS_DC 25 - #define LCD_PINS_RS 33 - #define DOGLCD_CS 16 - #define DOGLCD_MOSI 23 - #define DOGLCD_SCK 17 + #define BTN_EN1 EXP1_01_PIN + #define BTN_EN2 EXP1_08_PIN + #define BTN_ENC EXP1_02_PIN + #define BEEPER_PIN EXP2_03_PIN + + #define LCD_PINS_DC EXP1_06_PIN + #define LCD_PINS_RS EXP2_05_PIN + #define DOGLCD_CS EXP1_04_PIN + #define DOGLCD_MOSI EXP1_05_PIN + #define DOGLCD_SCK EXP1_03_PIN #define DOGLCD_A0 LCD_PINS_DC #undef KILL_PIN - #define NEOPIXEL_PIN 27 + #define BOARD_NEOPIXEL_PIN EXP1_07_PIN #else - #define BEEPER_PIN 37 + #define BEEPER_PIN EXP1_01_PIN #if ENABLED(FYSETC_MINI_12864) // // See https://wiki.fysetc.com/Mini12864_Panel/ // - #define DOGLCD_A0 16 - #define DOGLCD_CS 17 + #define DOGLCD_A0 EXP1_04_PIN + #define DOGLCD_CS EXP1_03_PIN #if ENABLED(FYSETC_GENERIC_12864_1_1) - #define LCD_BACKLIGHT_PIN 27 + #define LCD_BACKLIGHT_PIN EXP1_07_PIN #endif - #define LCD_RESET_PIN 23 // Must be high or open for LCD to operate normally. - // Seems to work best if left open. + #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. + // Seems to work best if left open. #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN 25 + #define RGB_LED_R_PIN EXP1_06_PIN #endif #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN 27 + #define RGB_LED_G_PIN EXP1_07_PIN #endif #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN 29 + #define RGB_LED_B_PIN EXP1_08_PIN #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN 25 + #define NEOPIXEL_PIN EXP1_06_PIN #endif #elif HAS_MARLINUI_U8GLIB || HAS_MARLINUI_HD44780 - #define LCD_PINS_RS 16 - #define LCD_PINS_EN 17 - #define LCD_PINS_D4 23 - #define LCD_PINS_D5 25 - #define LCD_PINS_D6 27 - #define LCD_PINS_D7 29 + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_EN EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_07_PIN + #define LCD_PINS_D7 EXP1_08_PIN #if ENABLED(MKS_MINI_12864) - #define DOGLCD_CS 25 - #define DOGLCD_A0 27 + #define DOGLCD_CS EXP1_06_PIN + #define DOGLCD_A0 EXP1_07_PIN #endif #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) @@ -284,9 +302,9 @@ #endif #if IS_NEWPANEL - #define BTN_EN1 31 - #define BTN_EN2 33 - #define BTN_ENC 35 + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN + #define BTN_ENC EXP1_02_PIN #endif #endif diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index 08c059477b05..a90366e11ce0 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -142,18 +142,18 @@ // // Steppers // -#define X_STEP_PIN 54 -#define X_DIR_PIN 55 +#define X_STEP_PIN 54 // (A0) +#define X_DIR_PIN 55 // (A1) #define X_ENABLE_PIN 38 #ifndef X_CS_PIN - #define X_CS_PIN 53 + #define X_CS_PIN AUX3_06 #endif #define Y_STEP_PIN 60 #define Y_DIR_PIN 61 -#define Y_ENABLE_PIN 56 +#define Y_ENABLE_PIN 56 // (A2) #ifndef Y_CS_PIN - #define Y_CS_PIN 49 + #define Y_CS_PIN AUX3_02 #endif #ifndef Z_STEP_PIN @@ -166,7 +166,7 @@ #define Z_ENABLE_PIN 62 #endif #ifndef Z_CS_PIN - #define Z_CS_PIN 40 + #define Z_CS_PIN AUX2_06 #endif #ifndef E0_STEP_PIN @@ -179,7 +179,7 @@ #define E0_ENABLE_PIN 24 #endif #ifndef E0_CS_PIN - #define E0_CS_PIN 42 + #define E0_CS_PIN AUX2_08 #endif #ifndef E1_STEP_PIN @@ -192,7 +192,7 @@ #define E1_ENABLE_PIN 30 #endif #ifndef E1_CS_PIN - #define E1_CS_PIN 44 + #define E1_CS_PIN AUX2_07 #endif // @@ -212,7 +212,7 @@ // SPI for MAX Thermocouple // #ifndef TEMP_0_CS_PIN - #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card (SDSS) or 49 (SD_DETECT_PIN) + #define TEMP_0_CS_PIN AUX2_09 // Don't use 53 if using Display/SD card (SDSS) or 49 (SD_DETECT_PIN) #endif // @@ -273,12 +273,12 @@ // Misc. Functions // #ifndef SDSS - #define SDSS AUX3_06_PIN + #define SDSS AUX3_06 #endif #define LED_PIN 13 #ifndef FILWIDTH_PIN - #define FILWIDTH_PIN 5 // Analog Input on AUX2 + #define FILWIDTH_PIN 5 // (A5) Analog Input AUX2_03 #endif // RAMPS 1.4 DIO 4 on the servos connector @@ -294,7 +294,7 @@ #if NUM_SERVOS <= 1 // Prefer the servo connector #define CASE_LIGHT_PIN 6 // Hardware PWM #elif HAS_FREE_AUX2_PINS - #define CASE_LIGHT_PIN 44 // Hardware PWM + #define CASE_LIGHT_PIN AUX2_07 // Hardware PWM #endif #endif @@ -303,15 +303,15 @@ // #if HAS_CUTTER && !defined(SPINDLE_LASER_ENA_PIN) #if NUM_SERVOS < 2 // Use servo connector if possible - #define SPINDLE_LASER_ENA_PIN 4 // Pullup or pulldown! #ifndef SPINDLE_LASER_PWM_PIN #define SPINDLE_LASER_PWM_PIN 6 // Hardware PWM #endif + #define SPINDLE_LASER_ENA_PIN 4 // Pullup or pulldown! #define SPINDLE_DIR_PIN 5 #elif HAS_FREE_AUX2_PINS - #define SPINDLE_LASER_PWM_PIN 44 // Hardware PWM - #define SPINDLE_LASER_ENA_PIN 40 // Pullup or pulldown! - #define SPINDLE_DIR_PIN 65 + #define SPINDLE_LASER_PWM_PIN AUX2_07 // Hardware PWM + #define SPINDLE_LASER_ENA_PIN AUX2_06 // Pullup or pulldown! + #define SPINDLE_DIR_PIN AUX2_10 #else #error "No auto-assignable Spindle/Laser pins available." #endif @@ -322,13 +322,13 @@ // #if HAS_TMC_SPI #ifndef TMC_SPI_MOSI - #define TMC_SPI_MOSI 66 + #define TMC_SPI_MOSI AUX2_09 #endif #ifndef TMC_SPI_MISO - #define TMC_SPI_MISO 44 + #define TMC_SPI_MISO AUX2_07 #endif #ifndef TMC_SPI_SCK - #define TMC_SPI_SCK 64 + #define TMC_SPI_SCK AUX2_05 #endif #endif @@ -356,10 +356,10 @@ //#define E4_HARDWARE_SERIAL Serial1 #ifndef X_SERIAL_TX_PIN - #define X_SERIAL_TX_PIN 40 + #define X_SERIAL_TX_PIN AUX2_06 #endif #ifndef X_SERIAL_RX_PIN - #define X_SERIAL_RX_PIN 63 + #define X_SERIAL_RX_PIN AUX2_04 #endif #ifndef X2_SERIAL_TX_PIN #define X2_SERIAL_TX_PIN -1 @@ -369,10 +369,10 @@ #endif #ifndef Y_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN 59 + #define Y_SERIAL_TX_PIN AUX2_03 #endif #ifndef Y_SERIAL_RX_PIN - #define Y_SERIAL_RX_PIN 64 + #define Y_SERIAL_RX_PIN AUX2_05 #endif #ifndef Y2_SERIAL_TX_PIN #define Y2_SERIAL_TX_PIN -1 @@ -382,10 +382,10 @@ #endif #ifndef Z_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN 42 + #define Z_SERIAL_TX_PIN AUX2_08 #endif #ifndef Z_SERIAL_RX_PIN - #define Z_SERIAL_RX_PIN 65 + #define Z_SERIAL_RX_PIN AUX2_10 #endif #ifndef Z2_SERIAL_TX_PIN #define Z2_SERIAL_TX_PIN -1 @@ -395,10 +395,10 @@ #endif #ifndef E0_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN 44 + #define E0_SERIAL_TX_PIN AUX2_07 #endif #ifndef E0_SERIAL_RX_PIN - #define E0_SERIAL_RX_PIN 66 + #define E0_SERIAL_RX_PIN AUX2_09 #endif #ifndef E1_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN -1 @@ -449,13 +449,13 @@ // #if HAS_PRUSA_MMU1 #ifndef E_MUX0_PIN - #define E_MUX0_PIN 40 // Z_CS_PIN + #define E_MUX0_PIN AUX2_06 // Z_CS_PIN #endif #ifndef E_MUX1_PIN - #define E_MUX1_PIN 42 // E0_CS_PIN + #define E_MUX1_PIN AUX2_08 // E0_CS_PIN #endif #ifndef E_MUX2_PIN - #define E_MUX2_PIN 44 // E1_CS_PIN + #define E_MUX2_PIN AUX2_07 // E1_CS_PIN #endif #endif @@ -465,10 +465,10 @@ // 1 3 5 7 // 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 +#define AUX1_05 57 // (A3) +#define AUX1_06 2 +#define AUX1_07 58 // (A4) +#define AUX1_08 1 // // AUX2 GND A9 D40 D42 A11 @@ -476,14 +476,14 @@ // 1 3 5 7 9 // 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) +#define AUX2_03 59 // (A5) +#define AUX2_04 63 // (A9) +#define AUX2_05 64 // (A10) +#define AUX2_06 40 +#define AUX2_07 44 +#define AUX2_08 42 +#define AUX2_09 66 // (A12) +#define AUX2_10 65 // (A11) // // AUX3 GND D52 D50 5V @@ -491,31 +491,31 @@ // 8 6 4 2 // NC D53 D51 D49 // -#define AUX3_02_PIN 49 -#define AUX3_03_PIN 50 -#define AUX3_04_PIN 51 -#define AUX3_05_PIN 52 -#define AUX3_06_PIN 53 +#define AUX3_02 49 +#define AUX3_03 50 +#define AUX3_04 51 +#define AUX3_05 52 +#define AUX3_06 53 // // AUX4 5V GND D32 D47 D45 D43 D41 D39 D37 D35 D33 D31 D29 D27 D25 D23 D17 D16 // -#define AUX4_03_PIN 32 -#define AUX4_04_PIN 47 -#define AUX4_05_PIN 45 -#define AUX4_06_PIN 43 -#define AUX4_07_PIN 41 -#define AUX4_08_PIN 39 -#define AUX4_09_PIN 37 -#define AUX4_10_PIN 35 -#define AUX4_11_PIN 33 -#define AUX4_12_PIN 31 -#define AUX4_13_PIN 29 -#define AUX4_14_PIN 27 -#define AUX4_15_PIN 25 -#define AUX4_16_PIN 23 -#define AUX4_17_PIN 17 -#define AUX4_18_PIN 16 +#define AUX4_03 32 +#define AUX4_04 47 +#define AUX4_05 45 +#define AUX4_06 43 +#define AUX4_07 41 +#define AUX4_08 39 +#define AUX4_09 37 +#define AUX4_10 35 +#define AUX4_11 33 +#define AUX4_12 31 +#define AUX4_13 29 +#define AUX4_14 27 +#define AUX4_15 25 +#define AUX4_16 23 +#define AUX4_17 17 +#define AUX4_18 16 /** * LCD adapters come in different variants. The socket keys can be @@ -523,60 +523,60 @@ */ #ifndef EXP1_08_PIN - #define EXP1_03_PIN AUX4_17_PIN - #define EXP1_04_PIN AUX4_18_PIN - #define EXP1_05_PIN AUX4_16_PIN - #define EXP1_06_PIN AUX4_15_PIN - #define EXP1_07_PIN AUX4_14_PIN - #define EXP1_08_PIN AUX4_13_PIN + #define EXP1_03_PIN AUX4_17 // 17 + #define EXP1_04_PIN AUX4_18 // 16 + #define EXP1_05_PIN AUX4_16 // 23 + #define EXP1_06_PIN AUX4_15 // 25 + #define EXP1_07_PIN AUX4_14 // 27 + #define EXP1_08_PIN AUX4_13 // 29 - #define EXP2_01_PIN AUX3_03_PIN - #define EXP2_02_PIN AUX3_05_PIN - #define EXP2_04_PIN AUX3_06_PIN - #define EXP2_06_PIN AUX3_04_PIN - #define EXP2_07_PIN AUX3_02_PIN + #define EXP2_01_PIN AUX3_03 // 50 (MISO) + #define EXP2_02_PIN AUX3_05 // 52 + #define EXP2_04_PIN AUX3_06 // 53 + #define EXP2_06_PIN AUX3_04 // 51 + #define EXP2_07_PIN AUX3_02 // 49 #if ENABLED(G3D_PANEL) /** Gadgets3D Smart Adapter - * ------ ------ - * 4-11 | 1 2 | 4-12 (MISO) 3-03 | 1 2 | 3-05 (SCK) - * 4-17 | 3 4 | 4-18 4-10 | 3 4 | 3-06 - * 4-16 5 6 | 4-15 4-09 5 6 | 3-04 (MOSI) - * 4-14 | 7 8 | 4-13 3-02 | 7 8 | 4-07 - * (GND) 4-02 | 9 10 | 4-01 (5V) -- | 9 10 | -- - * ------ ------ - * EXP1 EXP2 + * ------ ------ + * 33 4-11 | 1 2 | 4-12 31 (MISO) 50 3-03 | 1 2 | 3-05 52 (SCK) + * 17 4-17 | 3 4 | 4-18 16 35 4-10 | 3 4 | 3-06 53 + * 23 4-16 5 6 | 4-15 25 37 4-09 5 6 | 3-04 51 (MOSI) + * 27 4-14 | 7 8 | 4-13 29 49 3-02 | 7 8 | 4-07 41 + * (GND) 4-02 | 9 10 | 4-01 (5V) -- | 9 10 | -- + * ------ ------ + * EXP1 EXP2 */ - #define EXP1_01_PIN AUX4_11_PIN - #define EXP1_02_PIN AUX4_12_PIN + #define EXP1_01_PIN AUX4_11 // 33 + #define EXP1_02_PIN AUX4_12 // 31 - #define EXP2_03_PIN AUX4_10_PIN - #define EXP2_05_PIN AUX4_09_PIN - #define EXP2_08_PIN AUX4_07_PIN + #define EXP2_03_PIN AUX4_10 // 35 + #define EXP2_05_PIN AUX4_09 // 37 + #define EXP2_08_PIN AUX4_07 // 41 #else /** Smart Adapter (c) RRD * ------ ------ - * 4-09 | 1 2 | 4-10 (MISO) 3-03 | 1 2 | 3-05 (SCK) - * 4-17 | 3 4 | 4-18 4-12 | 3 4 | 3-06 - * 4-16 5 6 | 4-15 4-11 5 6 | 3-04 (MOSI) - * 4-14 | 7 8 | 4-13 3-02 | 7 8 | 4-07 + * 37 4-09 | 1 2 | 4-10 (MISO) 3-03 | 1 2 | 3-05 52 (SCK) + * 17 4-17 | 3 4 | 4-18 31 4-12 | 3 4 | 3-06 53 + * 23 4-16 5 6 | 4-15 33 4-11 5 6 | 3-04 51 (MOSI) + * 27 4-14 | 7 8 | 4-13 49 3-02 | 7 8 | 4-07 41 * (GND) 3-07 | 9 10 | 3-01 (5V) (GND) 3-07 | 9 10 | -- * ------ ------ * EXP1 EXP2 */ - #define EXP1_01_PIN AUX4_09_PIN - #define EXP1_02_PIN AUX4_10_PIN + #define EXP1_01_PIN AUX4_09 // 37 + #define EXP1_02_PIN AUX4_10 // 35 #if ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) - #define EXP2_03_PIN AUX4_11_PIN - #define EXP2_05_PIN AUX4_12_PIN + #define EXP2_03_PIN AUX4_11 // 33 + #define EXP2_05_PIN AUX4_12 // 31 #define EXP2_08_PIN -1 // RESET #else - #define EXP2_03_PIN AUX4_12_PIN - #define EXP2_05_PIN AUX4_11_PIN - #define EXP2_08_PIN AUX4_07_PIN + #define EXP2_03_PIN AUX4_12 // 31 + #define EXP2_05_PIN AUX4_11 // 33 + #define EXP2_08_PIN AUX4_07 // 41 #endif #endif @@ -587,7 +587,11 @@ // LCDs and Controllers // ////////////////////////// -#if HAS_WIRED_LCD && DISABLED(LCD_PINS_DEFINED) +#ifdef LCD_PINS_DEFINED + + // LCD pins already defined by including header + +#elif HAS_WIRED_LCD //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 @@ -602,12 +606,12 @@ #elif ALL(IS_NEWPANEL, PANEL_ONE) - #define LCD_PINS_RS AUX2_06_PIN - #define LCD_PINS_EN 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 + #define LCD_PINS_RS AUX2_06 + #define LCD_PINS_EN AUX2_08 + #define LCD_PINS_D4 AUX2_10 + #define LCD_PINS_D5 AUX2_09 + #define LCD_PINS_D6 AUX2_07 + #define LCD_PINS_D7 AUX2_05 #elif ENABLED(TFTGLCD_PANEL_SPI) @@ -631,12 +635,12 @@ #error "CAUTION! ZONESTAR_LCD on RAMPS requires wiring modifications. It plugs into AUX2 but GND and 5V need to be swapped. See 'pins_RAMPS.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" #endif - #define LCD_PINS_RS AUX2_05_PIN - #define LCD_PINS_EN 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 + #define LCD_PINS_RS AUX2_05 + #define LCD_PINS_EN AUX2_07 + #define LCD_PINS_D4 AUX2_04 + #define LCD_PINS_D5 AUX2_06 + #define LCD_PINS_D6 AUX2_08 + #define LCD_PINS_D7 AUX2_10 #elif ENABLED(AZSMZ_12864) @@ -672,8 +676,8 @@ // Buttons attached to a shift register // Not wired yet //#define SHIFT_CLK_PIN 38 - //#define SHIFT_LD_PIN AUX2_08_PIN - //#define SHIFT_OUT_PIN AUX2_06_PIN + //#define SHIFT_LD_PIN AUX2_08 + //#define SHIFT_OUT_PIN AUX2_06 //#define SHIFT_EN_PIN EXP1_03_PIN #endif @@ -707,30 +711,30 @@ #endif #if ENABLED(BQ_LCD_SMART_CONTROLLER) - #define LCD_BACKLIGHT_PIN AUX4_08_PIN + #define LCD_BACKLIGHT_PIN AUX4_08 #endif #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - #define BTN_EN1 AUX2_05_PIN - #define BTN_EN2 AUX2_03_PIN - #define BTN_ENC AUX2_04_PIN + #define BTN_EN1 AUX2_05 + #define BTN_EN2 AUX2_03 + #define BTN_ENC AUX2_04 #ifndef SD_DETECT_PIN - #define SD_DETECT_PIN AUX2_08_PIN + #define SD_DETECT_PIN AUX2_08 #endif #elif ENABLED(LCD_I2C_PANELOLU2) - #define BTN_EN1 AUX4_04_PIN - #define BTN_EN2 AUX4_06_PIN - #define BTN_ENC AUX4_03_PIN + #define BTN_EN1 AUX4_04 + #define BTN_EN2 AUX4_06 + #define BTN_ENC AUX4_03 #define LCD_SDSS SDSS #define KILL_PIN EXP2_08_PIN #elif ENABLED(LCD_I2C_VIKI) - #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_EN1 AUX2_06 // https://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains AUX2-06 and AUX2-08. + #define BTN_EN2 AUX2_08 #define BTN_ENC -1 #define LCD_SDSS SDSS @@ -740,19 +744,19 @@ #elif ANY(VIKI2, miniVIKI) - #define DOGLCD_CS AUX4_05_PIN - #define DOGLCD_A0 AUX2_07_PIN + #define DOGLCD_CS AUX4_05 + #define DOGLCD_A0 AUX2_07 #define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 #ifndef BEEPER_PIN #define BEEPER_PIN EXP2_05_PIN #endif - #define STAT_LED_RED_PIN AUX4_03_PIN + #define STAT_LED_RED_PIN AUX4_03 #define STAT_LED_BLUE_PIN EXP1_02_PIN #define BTN_EN1 22 #define BTN_EN2 7 - #define BTN_ENC AUX4_08_PIN + #define BTN_ENC AUX4_08 #ifndef SD_DETECT_PIN #define SD_DETECT_PIN -1 // Pin 49 for display SD interface, 72 for easy adapter board @@ -837,19 +841,19 @@ #ifndef BEEPER_PIN #define BEEPER_PIN AUX2_08_PIN #endif - #define LCD_BACKLIGHT_PIN AUX2_10_PIN + #define LCD_BACKLIGHT_PIN AUX2_10 - #define DOGLCD_A0 AUX2_07_PIN - #define DOGLCD_CS AUX2_09_PIN + #define DOGLCD_A0 AUX2_07 + #define DOGLCD_CS AUX2_09 - #define BTN_EN1 AUX2_06_PIN - #define BTN_EN2 AUX2_04_PIN - #define BTN_ENC AUX2_03_PIN + #define BTN_EN1 AUX2_06 + #define BTN_EN2 AUX2_04 + #define BTN_ENC AUX2_03 #ifndef SD_DETECT_PIN - #define SD_DETECT_PIN AUX3_02_PIN + #define SD_DETECT_PIN AUX3_02 #endif - #define KILL_PIN AUX2_05_PIN + #define KILL_PIN AUX2_05 #elif ENABLED(ZONESTAR_LCD) @@ -883,9 +887,9 @@ #endif #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_02_PIN + #define BTN_EN1 AUX2_03 + #define BTN_EN2 AUX2_04 + #define BTN_ENC AUX3_02 #else #define BTN_EN1 EXP1_01_PIN #define BTN_EN2 EXP1_02_PIN @@ -902,17 +906,17 @@ #endif // HAS_WIRED_LCD && !LCD_PINS_DEFINED #if IS_RRW_KEYPAD && !HAS_ADC_BUTTONS - #define SHIFT_OUT_PIN AUX2_06_PIN - #define SHIFT_CLK_PIN AUX2_07_PIN - #define SHIFT_LD_PIN AUX2_08_PIN + #define SHIFT_OUT_PIN AUX2_06 + #define SHIFT_CLK_PIN AUX2_07 + #define SHIFT_LD_PIN AUX2_08 #ifndef BTN_EN1 - #define BTN_EN1 AUX2_05_PIN + #define BTN_EN1 AUX2_05 #endif #ifndef BTN_EN2 - #define BTN_EN2 AUX2_03_PIN + #define BTN_EN2 AUX2_03 #endif #ifndef BTN_ENC - #define BTN_ENC AUX2_04_PIN + #define BTN_ENC AUX2_04 #endif #endif diff --git a/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h b/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h index f93c6919d960..a7f5a790094c 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h @@ -22,7 +22,7 @@ #pragma once /** - * Arduino Mega with RAMPS v1.4Plus, also known as 3DYMY version, pin assignments + * Arduino Mega with RAMPS v1.4Plus, aka 3DYMY version * ATmega2560, ATmega1280 * * Applies to the following boards: @@ -64,32 +64,32 @@ #define E1_ENABLE_PIN 24 #define E1_CS_PIN -1 -/** 3DYMY Expansion Headers - * ------ ------ - * 37 | 1 2 | 35 (MISO) 50 | 1 2 | 52 (SCK) - * 31 | 3 4 | 41 29 | 3 4 | 53 - * 33 5 6 | 23 25 5 6 | 51 (MOSI) - * 42 | 7 8 | 44 49 | 7 8 | 27 - * GND | 9 10 | 5V GND | 9 10 | -- - * ------ ------ - * EXP1 EXP2 +/** 3DYMY Expansion Headers + * ------ ------ + * (BEEP) 37 | 1 2 | 35 (ENC) (MISO) 50 | 1 2 | 52 (SCK) + * (LCD_EN) 31 | 3 4 | 41 (LCD_RS) (EN1) 29 | 3 4 | 53 (SDSS) + * (LCD_D4) 33 5 6 | 23 (LCD_D5) (EN2) 25 5 6 | 51 (MOSI) + * (LCD_D6) 42 | 7 8 | 44 (LCD_D7) (SD_DET) 49 | 7 8 | 27 (KILL) + * GND | 9 10 | 5V GND | 9 10 | -- + * ------ ------ + * EXP1 EXP2 */ -#define EXP1_01_PIN 37 -#define EXP1_02_PIN 35 -#define EXP1_03_PIN 31 -#define EXP1_04_PIN 41 -#define EXP1_05_PIN 33 -#define EXP1_06_PIN 23 -#define EXP1_07_PIN 42 -#define EXP1_08_PIN 44 +#define EXP1_01_PIN 37 // BEEPER +#define EXP1_02_PIN 35 // ENC +#define EXP1_03_PIN 31 // LCD_EN +#define EXP1_04_PIN 41 // LCD_RS +#define EXP1_05_PIN 33 // LCD_D4 +#define EXP1_06_PIN 23 // LCD_D5 +#define EXP1_07_PIN 42 // LCD_D6 +#define EXP1_08_PIN 44 // LCD_D7 -#define EXP2_01_PIN 50 -#define EXP2_02_PIN 52 -#define EXP2_03_PIN 29 -#define EXP2_04_PIN 53 -#define EXP2_05_PIN 25 -#define EXP2_06_PIN 51 -#define EXP2_07_PIN 49 -#define EXP2_08_PIN 27 +#define EXP2_01_PIN 50 // MISO +#define EXP2_02_PIN 52 // SCK +#define EXP2_03_PIN 29 // EN1 +#define EXP2_04_PIN 53 // SDSS +#define EXP2_05_PIN 25 // EN2 +#define EXP2_06_PIN 51 // MOSI +#define EXP2_07_PIN 49 // SD_DET +#define EXP2_08_PIN 27 // KILL #include "pins_RAMPS.h" diff --git a/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h b/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h index 7306272127e1..d3c921a5f654 100644 --- a/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h +++ b/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h @@ -75,33 +75,33 @@ * 5V 5V 5V 5V 5V 5V */ -/** Expansion Headers - * ------ ------ - * 37 | 1 2 | 35 (MISO) 50 | 1 2 | 52 (SCK) - * 17 | 3 4 | 16 31 | 3 4 | 53 - * 23 5 6 | 25 33 5 6 | 51 (MOSI) - * 27 | 7 8 | 29 49 | 7 8 | 41 - * (GND) | 9 10 | (5V) (GND) | 9 10 | RESET - * ------ ------ - * EXP1 EXP2 +/** Expansion Headers + * ------ ------ + * (BEEP) 37 | 1 2 | 35 (ENC) (MISO) 50 | 1 2 | 52 (SCK) + * (LCD_EN) 17 | 3 4 | 16 (LCD_RS) (EN1) 31 | 3 4 | 53 (SDSS) + * (LCD_D4) 23 5 6 | 25 (LCD_D5) (EN2) 33 5 6 | 51 (MOSI) + * (LCD_D6) 27 | 7 8 | 29 (LCD_D7) (SD_DET) 49 | 7 8 | 41 (KILL) + * GND | 9 10 | 5V GND | 9 10 | RESET + * ------ ------ + * EXP1 EXP2 */ -#define EXP1_01_PIN 37 -#define EXP1_02_PIN 35 -#define EXP1_03_PIN 17 -#define EXP1_04_PIN 16 -#define EXP1_05_PIN 23 -#define EXP1_06_PIN 25 -#define EXP1_07_PIN 27 -#define EXP1_08_PIN 29 +#define EXP1_01_PIN 37 // BEEPER +#define EXP1_02_PIN 35 // ENC +#define EXP1_03_PIN 17 // LCD_EN +#define EXP1_04_PIN 16 // LCD_RS +#define EXP1_05_PIN 23 // LCD_D4 +#define EXP1_06_PIN 25 // LCD_D5 +#define EXP1_07_PIN 27 // LCD_D6 +#define EXP1_08_PIN 29 // LCD_D7 #define EXP2_01_PIN 50 // MISO #define EXP2_02_PIN 52 // SCK -#define EXP2_03_PIN 31 -#define EXP2_04_PIN 53 -#define EXP2_05_PIN 33 +#define EXP2_03_PIN 31 // EN1 +#define EXP2_04_PIN 53 // SDSS +#define EXP2_05_PIN 33 // EN2 #define EXP2_06_PIN 51 // MOSI -#define EXP2_07_PIN 49 -#define EXP2_08_PIN 41 +#define EXP2_07_PIN 49 // SD_DET +#define EXP2_08_PIN 41 // KILL // // AnyCubic pin mappings diff --git a/Marlin/src/pins/ramps/pins_TT_OSCAR.h b/Marlin/src/pins/ramps/pins_TT_OSCAR.h index 1edeb6b8fedf..64f595f31232 100644 --- a/Marlin/src/pins/ramps/pins_TT_OSCAR.h +++ b/Marlin/src/pins/ramps/pins_TT_OSCAR.h @@ -21,7 +21,11 @@ */ #pragma once -// ATmega2560 +/** + * TT OSCAR by YM Tech.LTD + * + * ATmega2560 + */ #include "env_validate.h" @@ -73,12 +77,12 @@ #define Z_STEP_PIN 46 #define Z_DIR_PIN 48 #define Z_ENABLE_PIN 62 -#define Z_CS_PIN 53 +#define Z_CS_PIN 53 // EXP2-4 #define E0_STEP_PIN 26 #define E0_DIR_PIN 28 #define E0_ENABLE_PIN 24 -#define E0_CS_PIN 49 +#define E0_CS_PIN 49 // EXP2-7 #define E1_STEP_PIN 36 #define E1_DIR_PIN 34 @@ -209,11 +213,11 @@ // // Misc. Functions // -#define SDSS 53 +#define SDSS 53 // EXP2-4 #define LED_PIN 13 //#ifndef FILWIDTH_PIN -// #define FILWIDTH_PIN 5 // Analog Input +// #define FILWIDTH_PIN 5 // Analog Input //#endif // DIO 4 (Servos plug) for the runout sensor. @@ -257,13 +261,49 @@ #define E_MUX0_PIN 58 // Y_CS_PIN #endif #ifndef E_MUX1_PIN - #define E_MUX1_PIN 53 // Z_CS_PIN + #define E_MUX1_PIN 53 // EXP2-4 #endif #ifndef E_MUX2_PIN - #define E_MUX2_PIN 49 // En_CS_PIN + #define E_MUX2_PIN 49 // EXP2-7 #endif #endif +/** TT OSCAR Expansion Headers + * ------ + * -- | 1 2 | -- + * -- 3 4 | -- + * -- 5 6 | -- + * 49 | 7 8 | -- + * ------ + * AUX1 + * + * ------ ------ + * 37 | 1 2 | 35 (MISO) 44 | 1 2 | 52 (SCK) + * 17 | 3 4 | 41? 35 | 3 4 | 53 + * 23 5 6 | 25 31 5 6 | 51 (MOSI) + * 27 | 7 8 | 29 49 | 7 8 | 41 + * GND | 9 10 | 5V GND | 9 10 | -- + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_01_PIN 37 // BEEPER +#define EXP1_02_PIN 35 // ENC +#define EXP1_03_PIN 17 // ENC1 +#define EXP1_04_PIN 41 // RESET +#define EXP1_05_PIN 23 // ENC2 +#define EXP1_06_PIN 25 // D4 +#define EXP1_07_PIN 27 // RS +#define EXP1_08_PIN 29 // EN + +#define EXP2_01_PIN 44 // MISO +#define EXP2_02_PIN 52 // SCK +#define EXP2_03_PIN 35 // EN2 / EN1 +#define EXP2_04_PIN 53 // SDSS +#define EXP2_05_PIN 31 // EN1 / EN2 +#define EXP2_06_PIN 51 // MOSI +#define EXP2_07_PIN 49 // SD_DET +#define EXP2_08_PIN 41 // KILL / RESET + ////////////////////////// // LCDs and Controllers // ////////////////////////// @@ -275,9 +315,9 @@ // #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - #define LCD_PINS_RS 49 // CS chip select /SS chip slave select - #define LCD_PINS_EN 51 // SID (MOSI) - #define LCD_PINS_D4 52 // SCK (CLK) clock + #define LCD_PINS_RS EXP2_07_PIN // CS chip select /SS chip slave select + #define LCD_PINS_EN EXP2_06_PIN // SID (MOSI) + #define LCD_PINS_D4 EXP2_02_PIN // SCK (CLK) clock #elif ALL(IS_NEWPANEL, PANEL_ONE) @@ -369,7 +409,7 @@ #endif #define BTN_ENC 35 - #define SD_DETECT_PIN 49 + #define SD_DETECT_PIN EXP2_07_PIN //#define KILL_PIN 41 #if ENABLED(BQ_LCD_SMART_CONTROLLER) @@ -388,7 +428,7 @@ #define BTN_EN1 47 #define BTN_EN2 43 #define BTN_ENC 32 - #define LCD_SDSS 53 + #define LCD_SDSS EXP2_04_PIN //#define KILL_PIN 41 #elif ENABLED(LCD_I2C_VIKI) @@ -397,8 +437,8 @@ #define BTN_EN2 7 // 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 + #define LCD_SDSS EXP2_04_PIN + #define SD_DETECT_PIN EXP2_07_PIN #elif ANY(VIKI2, miniVIKI) @@ -413,7 +453,7 @@ #define BTN_EN2 7 #define BTN_ENC 39 - #define SDSS 53 + #define SDSS EXP2_04_PIN #define SD_DETECT_PIN -1 // Pin 49 for display SD interface, 72 for easy adapter board //#define KILL_PIN 31 @@ -431,8 +471,8 @@ #define BTN_EN2 37 #define BTN_ENC 31 - #define LCD_SDSS 53 - #define SD_DETECT_PIN 49 + #define LCD_SDSS EXP2_04_PIN + #define SD_DETECT_PIN EXP2_07_PIN //#define KILL_PIN 41 #elif ENABLED(MKS_MINI_12864) @@ -447,8 +487,8 @@ #define BTN_EN1 31 #define BTN_EN2 33 #define BTN_ENC 35 - //#define SDSS 53 - #define SD_DETECT_PIN 49 + //#define SDSS EXP2_04_PIN + #define SD_DETECT_PIN EXP2_07_PIN //#define KILL_PIN 64 //#define LCD_CONTRAST_INIT 190 @@ -467,8 +507,8 @@ #define BTN_EN2 63 #define BTN_ENC 59 - #define SDSS 53 - #define SD_DETECT_PIN 49 + #define SDSS EXP2_04_PIN + #define SD_DETECT_PIN EXP2_07_PIN //#define KILL_PIN 64 //#define LCD_CONTRAST_INIT 190 @@ -498,7 +538,7 @@ #endif #if ENABLED(G3D_PANEL) - #define SD_DETECT_PIN 49 + #define SD_DETECT_PIN EXP2_07_PIN //#define KILL_PIN 41 #endif diff --git a/Marlin/src/pins/ramps/pins_ZRIB_V53.h b/Marlin/src/pins/ramps/pins_ZRIB_V53.h index 08585c2c275e..beea40ab20f0 100644 --- a/Marlin/src/pins/ramps/pins_ZRIB_V53.h +++ b/Marlin/src/pins/ramps/pins_ZRIB_V53.h @@ -336,9 +336,9 @@ #if ENABLED(ZONESTAR_12864LCD) #define LCDSCREEN_NAME "ZONESTAR LCD12864" #define LCD_SDSS 16 - #define LCD_PINS_RS 16 // ST7920_CS_PIN LCD_PIN_RS (PIN4 of LCD module) - #define LCD_PINS_EN 23 // ST7920_DAT_PIN LCD_PIN_R/W (PIN5 of LCD module) - #define LCD_PINS_D4 17 // ST7920_CLK_PIN LCD_PIN_ENA (PIN6 of LCD module) + #define LCD_PINS_RS 16 // ST7920 CS (LCD-4) + #define LCD_PINS_EN 23 // ST7920 DAT LCD-R/W (LCD-5) + #define LCD_PINS_D4 17 // ST7920 CLK LCD-ENA (LCD-6) #define BTN_EN2 25 #define BTN_EN1 27 #define BTN_ENC 29 @@ -347,9 +347,9 @@ #elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define LCDSCREEN_NAME "Reprap LCD12864" // Use EXP1 & EXP2 connector - #define LCD_PINS_RS 16 // ST7920_CS_PIN LCD_PIN_RS - #define LCD_PINS_EN 17 // ST7920_DAT_PIN LCD_PIN_ENA - #define LCD_PINS_D4 23 // ST7920_CLK_PIN LCD_PIN_R/W + #define LCD_PINS_RS 16 // ST7920 CS + #define LCD_PINS_EN 17 // ST7920 DAT + #define LCD_PINS_D4 23 // ST7920 CLK LCD-R/W #define BTN_EN1 31 #define BTN_EN2 33 #define BTN_ENC 35 diff --git a/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h b/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h index 8fd1843ab59e..b85150f1ca29 100644 --- a/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h +++ b/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h @@ -62,7 +62,7 @@ // LED defines // //#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) -//#define NEOPIXEL_PIN 20 // LED driving pin on motherboard +//#define BOARD_NEOPIXEL_PIN 20 // LED driving pin on motherboard //#define NEOPIXEL_PIXELS 3 // Number of LEDs in the strip //#define SDA0 20 // PB12 NeoPixel pin I2C data //#define SCL0 21 // PB13 I2C clock diff --git a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h index f5587a6cbaa1..1ae96ebe6d86 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h +++ b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h @@ -134,7 +134,9 @@ #define SDSS 4 #define LED_PIN 13 -/** ------ ------ +/** + * RAMPS-FD LCD adapter + * ------ ------ * 37 | 1 2 | 35 (MISO) 50 | 1 2 | 76 (SCK) * 29 | 3 4 | 27 (EN2) 31 | 3 4 | 4 (SD_SS) * 25 5 6 | 23 (EN1) 33 5 6 | 75 (MOSI) @@ -165,7 +167,6 @@ // LCD / Controller // #if HAS_WIRED_LCD - // ramps-fd lcd adaptor #define BEEPER_PIN EXP1_01_PIN diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h index 64fad0e08123..b28971c19211 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h @@ -195,22 +195,22 @@ * ------ ------ * EXP1 EXP2 */ -#define EXP1_01_PIN 62 -#define EXP1_02_PIN 40 -#define EXP1_03_PIN 64 -#define EXP1_04_PIN 63 -#define EXP1_05_PIN 48 -#define EXP1_06_PIN 50 -#define EXP1_07_PIN 52 -#define EXP1_08_PIN 53 +#define EXP1_01_PIN 62 // BEEPER +#define EXP1_02_PIN 40 // ENC +#define EXP1_03_PIN 64 // LCD_EN +#define EXP1_04_PIN 63 // LCD_RS +#define EXP1_05_PIN 48 // LCD_D4 / RESET +#define EXP1_06_PIN 50 // LCD_D5 +#define EXP1_07_PIN 52 // LCD_D6 +#define EXP1_08_PIN 53 // LCD_D7 / ENABLE #define EXP2_01_PIN 74 // MISO #define EXP2_02_PIN 76 // SCK -#define EXP2_03_PIN 44 -#define EXP2_04_PIN 10 -#define EXP2_05_PIN 42 +#define EXP2_03_PIN 44 // EN1 +#define EXP2_04_PIN 10 // SDSS +#define EXP2_05_PIN 42 // EN2 #define EXP2_06_PIN 75 // MOSI -#define EXP2_07_PIN 51 +#define EXP2_07_PIN 51 // SD DET #define EXP2_08_PIN -1 // RESET // diff --git a/Marlin/src/pins/samd/pins_RAMPS_144.h b/Marlin/src/pins/samd/pins_RAMPS_144.h index 3e5d563929ed..da3af2a0ab3e 100644 --- a/Marlin/src/pins/samd/pins_RAMPS_144.h +++ b/Marlin/src/pins/samd/pins_RAMPS_144.h @@ -48,6 +48,21 @@ #define I2C_EEPROM // EEPROM on I2C-0 #define MARLIN_EEPROM_SIZE 0x8000 // 32K (24lc256) +// +// Foam Cutter requirements +// + +#if ENABLED(FOAMCUTTER_XYUV) + #define MOSFET_C_PIN -1 + #if HAS_CUTTER && !defined(SPINDLE_LASER_ENA_PIN) && NUM_SERVOS < 2 + #define SPINDLE_LASER_PWM_PIN 8 // Hardware PWM + #endif + #define Z_MIN_PIN -1 + #define Z_MAX_PIN -1 + #define I_STOP_PIN 18 + #define J_STOP_PIN 19 +#endif + // // Limit Switches // @@ -260,79 +275,233 @@ #define SDSS 53 #endif +// +// Průša i3 MK2 Multiplexer Support +// +#if HAS_PRUSA_MMU1 + #ifndef E_MUX0_PIN + #define E_MUX0_PIN AUX2_06 // Z_CS_PIN + #endif + #ifndef E_MUX1_PIN + #define E_MUX1_PIN AUX2_08 // E0_CS_PIN + #endif + #ifndef E_MUX2_PIN + #define E_MUX2_PIN AUX2_07 // E1_CS_PIN + #endif +#endif + +// +// AUX1 VCC GND D2 D1 +// 2 4 6 8 +// 1 3 5 7 +// VCC GND A3 A4 +// +#define AUX1_05 57 // (A3) +#define AUX1_06 2 +#define AUX1_07 58 // (A4) +#define AUX1_08 1 + +// +// AUX2 GND A9 D40 D42 A11 +// 2 4 6 8 10 +// 1 3 5 7 9 +// VCC A5 A10 D44 A12 +// +#define AUX2_03 59 // (A5) +#define AUX2_04 63 // (A9) +#define AUX2_05 64 // (A10) +#define AUX2_06 40 +#define AUX2_07 44 +#define AUX2_08 42 +#define AUX2_09 66 // (A12) +#define AUX2_10 65 // (A11) + +// +// AUX3 +// SCK MISO +// RST GND D52 D50 VCC +// 9 7 5 3 1 +// 10 8 6 4 2 +// NC 5V D53 D51 D49 +// MOSI +// +#define AUX3_02 49 +#define AUX3_03 50 +#define AUX3_04 51 +#define AUX3_05 52 +#define AUX3_06 53 + +// +// AUX4 VCC GND D32 D47 D45 D43 D41 D39 D37 D35 D33 D31 D29 D27 D25 D23 D17 D16 +// +#define AUX4_03 32 +#define AUX4_04 47 +#define AUX4_05 45 +#define AUX4_06 43 +#define AUX4_07 41 +#define AUX4_08 39 +#define AUX4_09 37 +#define AUX4_10 35 +#define AUX4_11 33 +#define AUX4_12 31 +#define AUX4_13 29 +#define AUX4_14 27 +#define AUX4_15 25 +#define AUX4_16 23 +#define AUX4_17 17 +#define AUX4_18 16 + +/** + * LCD adapters come in different variants. The socket keys can be + * on either side, and may be backwards on some boards / displays. + */ +#ifndef EXP1_08_PIN + + #define EXP1_03_PIN AUX4_17 + #define EXP1_04_PIN AUX4_18 + #define EXP1_05_PIN AUX4_16 + #define EXP1_06_PIN AUX4_15 + #define EXP1_07_PIN AUX4_14 + #define EXP1_08_PIN AUX4_13 + + #define EXP2_01_PIN AUX3_03 + #define EXP2_02_PIN AUX3_05 + #define EXP2_04_PIN AUX3_06 + #define EXP2_06_PIN AUX3_04 + #define EXP2_07_PIN AUX3_02 + + #if ENABLED(G3D_PANEL) + /** Gadgets3D Smart Adapter + * ------ ------ + * 4-11 | 1 2 | 4-12 (MISO) 3-03 | 1 2 | 3-05 (SCK) + * 4-17 | 3 4 | 4-18 4-10 | 3 4 | 3-06 + * 4-16 5 6 | 4-15 4-09 5 6 | 3-04 (MOSI) + * 4-14 | 7 8 | 4-13 3-02 | 7 8 | 4-07 + * (GND) 4-02 | 9 10 | 4-01 (5V) -- | 9 10 | -- + * ------ ------ + * EXP1 EXP2 + */ + #define EXP1_01_PIN AUX4_11 + #define EXP1_02_PIN AUX4_12 + + #define EXP2_03_PIN AUX4_10 + #define EXP2_05_PIN AUX4_09 + #define EXP2_08_PIN AUX4_07 + + #else + + /** Smart Adapter (c) RRD + * ------ ------ + * 4-09 | 1 2 | 4-10 (MISO) 3-03 | 1 2 | 3-05 (SCK) + * 4-17 | 3 4 | 4-18 4-12 | 3 4 | 3-06 + * 4-16 5 6 | 4-15 4-11 5 6 | 3-04 (MOSI) + * 4-14 | 7 8 | 4-13 3-02 | 7 8 | 4-07 + * (GND) 3-07 | 9 10 | 3-01 (5V) (GND) 3-07 | 9 10 | -- + * ------ ------ + * EXP1 EXP2 + */ + #define EXP1_01_PIN AUX4_09 + #define EXP1_02_PIN AUX4_10 + + #if ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) + #define EXP2_03_PIN AUX4_11 + #define EXP2_05_PIN AUX4_12 + #define EXP2_08_PIN -1 // RESET + #else + #define EXP2_03_PIN AUX4_12 + #define EXP2_05_PIN AUX4_11 + #define EXP2_08_PIN AUX4_07 + #endif + + #endif + +#endif + ////////////////////////// // LCDs and Controllers // ////////////////////////// -#if HAS_WIRED_LCD +#ifdef LCD_PINS_DEFINED + + // LCD pins already defined by including header + +#elif HAS_WIRED_LCD + + //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 // // LCD Display output pins // #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - // TO TEST - //#define LCD_PINS_RS 49 // CS chip select /SS chip slave select - //#define LCD_PINS_EN 51 // SID (MOSI) - //#define LCD_PINS_D4 52 // SCK (CLK) clock + #define LCD_PINS_RS EXP2_07_PIN // CS chip select /SS chip slave select + #define LCD_PINS_EN EXP2_06_PIN // SID (MOSI) + #define LCD_PINS_D4 EXP2_02_PIN // SCK (CLK) clock #elif ALL(IS_NEWPANEL, PANEL_ONE) - // TO TEST - //#define LCD_PINS_RS 40 - //#define LCD_PINS_EN 42 - //#define LCD_PINS_D4 57 // Mega/Due:65 - AGCM4:57 - //#define LCD_PINS_D5 58 // Mega/Due:66 - AGCM4:58 - //#define LCD_PINS_D6 44 - //#define LCD_PINS_D7 56 // Mega/Due:64 - AGCM4:56 + #define LCD_PINS_RS AUX2_06 + #define LCD_PINS_EN AUX2_08 + #define LCD_PINS_D4 AUX2_10 + #define LCD_PINS_D5 AUX2_09 + #define LCD_PINS_D6 AUX2_07 + #define LCD_PINS_D7 AUX2_05 + + #elif ENABLED(TFTGLCD_PANEL_SPI) + + #define TFTGLCD_CS EXP2_05_PIN #else #if ENABLED(CR10_STOCKDISPLAY) - // TO TEST - //#define LCD_PINS_RS 27 - //#define LCD_PINS_EN 29 - //#define LCD_PINS_D4 25 + #define LCD_PINS_RS EXP1_07_PIN + #define LCD_PINS_EN EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN #if !IS_NEWPANEL - // TO TEST - //#define BEEPER_PIN 37 + #define BEEPER_PIN EXP1_01_PIN #endif #elif ENABLED(ZONESTAR_LCD) - // TO TEST - //#define LCD_PINS_RS 56 // Mega/Due:64 - AGCM4:56 - //#define LCD_PINS_EN 44 - //#define LCD_PINS_D4 55 // Mega/Due:63 - AGCM4:55 - //#define LCD_PINS_D5 40 - //#define LCD_PINS_D6 42 - //#define LCD_PINS_D7 57 // Mega/Due:65 - AGCM4:57 + #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING + #error "CAUTION! ZONESTAR_LCD on RAMPS requires wiring modifications. It plugs into AUX2 but GND and 5V need to be swapped. See 'pins_RAMPS.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" + #endif + + #define LCD_PINS_RS AUX2_05 + #define LCD_PINS_EN AUX2_07 + #define LCD_PINS_D4 AUX2_04 + #define LCD_PINS_D5 AUX2_06 + #define LCD_PINS_D6 AUX2_08 + #define LCD_PINS_D7 AUX2_10 + + #elif ENABLED(AZSMZ_12864) + + // TODO #else #if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306) - // TO TEST - //#define LCD_PINS_DC 25 // Set as output on init - //#define LCD_PINS_RS 27 // Pull low for 1s to init + #define LCD_PINS_DC EXP1_06_PIN // Set as output on init + #define LCD_PINS_RS EXP1_07_PIN // Pull low for 1s to init // DOGM SPI LCD Support - //#define DOGLCD_CS 16 - //#define DOGLCD_MOSI 17 - //#define DOGLCD_SCK 23 - //#define DOGLCD_A0 LCD_PINS_DC + #define DOGLCD_A0 LCD_PINS_DC + #define DOGLCD_CS EXP1_04_PIN + #define DOGLCD_MOSI EXP1_03_PIN + #define DOGLCD_SCK EXP1_05_PIN #else - #define LCD_PINS_RS 16 - #define LCD_PINS_EN 17 - #define LCD_PINS_D4 23 - #define LCD_PINS_D5 25 - #define LCD_PINS_D6 27 + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_EN EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_07_PIN #endif - #define LCD_PINS_D7 29 + #define LCD_PINS_D7 EXP1_08_PIN #if !IS_NEWPANEL - #define BEEPER_PIN 33 + #define BEEPER_PIN EXP2_05_PIN #endif #endif @@ -341,13 +510,17 @@ // 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_EN_PIN 17 + //#define SHIFT_LD_PIN AUX2_08 + //#define SHIFT_OUT_PIN AUX2_06 + //#define SHIFT_EN_PIN EXP1_03_PIN #endif #endif + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder + #endif + // // LCD Display input pins // @@ -355,215 +528,270 @@ #if IS_RRD_SC - #define BEEPER_PIN 37 + #define BEEPER_PIN EXP1_01_PIN #if ENABLED(CR10_STOCKDISPLAY) - // TO TEST - //#define BTN_EN1 17 - //#define BTN_EN2 23 + #define BTN_EN1 EXP1_03_PIN + #define BTN_EN2 EXP1_05_PIN #else - #define BTN_EN1 31 - #define BTN_EN2 33 - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder - #endif + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN #endif - #define BTN_ENC 35 + #define BTN_ENC EXP1_02_PIN #ifndef SD_DETECT_PIN - #define SD_DETECT_PIN 49 + #define SD_DETECT_PIN EXP2_07_PIN + #endif + #ifndef KILL_PIN + #define KILL_PIN EXP2_08_PIN #endif - #define KILL_PIN 41 #if ENABLED(BQ_LCD_SMART_CONTROLLER) - //#define LCD_BACKLIGHT_PIN 39 // TO TEST + #define LCD_BACKLIGHT_PIN AUX4_08 // Probably a slightly different adapter from RRD SC #endif #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - // TO TEST - //#define BTN_EN1 56 // Mega/Due:64 - AGCM4:56 - //#define BTN_EN2 72 // Mega/Due:59 - AGCM4:72 - //#define BTN_ENC 55 - //#define SD_DETECT_PIN 42 + #define BTN_EN1 AUX2_05 + #define BTN_EN2 AUX2_03 + #define BTN_ENC AUX2_04 + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN AUX2_08 + #endif #elif ENABLED(LCD_I2C_PANELOLU2) - // TO TEST - //#define BTN_EN1 47 - //#define BTN_EN2 43 - //#define BTN_ENC 32 - //#define LCD_SDSS SDSS - //#define KILL_PIN 41 + #define BTN_EN1 AUX4_04 + #define BTN_EN2 AUX4_06 + #define BTN_ENC AUX4_03 + #define LCD_SDSS SDSS + #define KILL_PIN AUX4_07 #elif ENABLED(LCD_I2C_VIKI) - // TO TEST - //#define BTN_EN1 40 // https://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42. - //#define BTN_EN2 42 - //#define BTN_ENC -1 + #define BTN_EN1 AUX2_06 // https://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains AUX2-06 and AUX2-08. + #define BTN_EN2 AUX2_08 + #define BTN_ENC -1 - //#define LCD_SDSS SDSS - //#define SD_DETECT_PIN 49 + #define LCD_SDSS SDSS + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN EXP2_07_PIN + #endif #elif ANY(VIKI2, miniVIKI) - // TO TEST - //#define DOGLCD_CS 45 - //#define DOGLCD_A0 44 - - //#define BEEPER_PIN 33 - //#define STAT_LED_RED_PIN 32 - //#define STAT_LED_BLUE_PIN 35 + #define DOGLCD_CS AUX4_05 + #define DOGLCD_A0 AUX2_07 + #define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 - //#define BTN_EN1 22 - //#define BTN_EN2 7 - //#define BTN_ENC 39 + #define BEEPER_PIN EXP2_05_PIN + #define STAT_LED_RED_PIN AUX4_03 + #define STAT_LED_BLUE_PIN EXP1_02_PIN - //#define SD_DETECT_PIN -1 // Pin 49 for display SD interface, 72 for easy adapter board - //#define KILL_PIN 31 + #define BTN_EN1 22 + #define BTN_EN2 7 + #define BTN_ENC AUX4_08 - //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN -1 // Pin 49 for display SD interface, 72 for easy adapter board + #endif + #define KILL_PIN EXP2_03_PIN #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) - // TO TEST - //#define DOGLCD_CS 29 - //#define DOGLCD_A0 27 + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_A0 EXP1_07_PIN - //#define BEEPER_PIN 23 - //#define LCD_BACKLIGHT_PIN 33 + #define BEEPER_PIN EXP1_05_PIN + #define LCD_BACKLIGHT_PIN EXP2_05_PIN - //#define BTN_EN1 35 - //#define BTN_EN2 37 - //#define BTN_ENC 31 + #define BTN_EN1 EXP1_02_PIN + #define BTN_EN2 EXP1_01_PIN + #define BTN_ENC EXP2_03_PIN - //#define LCD_SDSS SDSS - //#define SD_DETECT_PIN 49 - //#define KILL_PIN 41 + #define LCD_SDSS SDSS + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN EXP2_07_PIN + #endif + #define KILL_PIN EXP2_08_PIN #elif ANY(MKS_MINI_12864, FYSETC_MINI_12864) - // TO TEST - //#define BEEPER_PIN 37 - //#define BTN_ENC 35 - //#define SD_DETECT_PIN 49 + #define BEEPER_PIN EXP1_01_PIN + #define BTN_ENC EXP1_02_PIN + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN EXP2_07_PIN + #endif - //#ifndef KILL_PIN - // #define KILL_PIN 41 - //#endif + #ifndef KILL_PIN + #define KILL_PIN EXP2_08_PIN + #endif #if ENABLED(MKS_MINI_12864) - // TO TEST - //#define DOGLCD_A0 27 - //#define DOGLCD_CS 25 + #define DOGLCD_A0 EXP1_07_PIN + #define DOGLCD_CS EXP1_06_PIN // not connected to a pin - //#define LCD_BACKLIGHT_PIN 57 // backlight LED on A11/D? (Mega/Due:65 - AGCM4:57) + #define LCD_BACKLIGHT_PIN -1 // 65 (MKS mini12864 can't adjust backlight by software!) - //#define BTN_EN1 31 - //#define BTN_EN2 33 - - //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN #elif ENABLED(FYSETC_MINI_12864) - // From https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 + // From https://wiki.fysetc.com/Mini12864_Panel/ - // TO TEST - //#define DOGLCD_A0 16 - //#define DOGLCD_CS 17 + #define DOGLCD_A0 EXP1_04_PIN + #define DOGLCD_CS EXP1_03_PIN - //#define BTN_EN1 33 - //#define BTN_EN2 31 + #define BTN_EN1 EXP2_05_PIN + #define BTN_EN2 EXP2_03_PIN //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems // results in LCD soft SPI mode 3, SD soft SPI mode 0 - //#define LCD_RESET_PIN 23 // Must be high or open for LCD to operate normally. + #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN - // TO TEST - //#define RGB_LED_R_PIN 25 + #define RGB_LED_R_PIN EXP1_06_PIN #endif #ifndef RGB_LED_G_PIN - // TO TEST - //#define RGB_LED_G_PIN 27 + #define RGB_LED_G_PIN EXP1_07_PIN #endif #ifndef RGB_LED_B_PIN - // TO TEST - //#define RGB_LED_B_PIN 29 + #define RGB_LED_B_PIN EXP1_08_PIN #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - // TO TEST - //#define NEOPIXEL_PIN 25 + #define NEOPIXEL_PIN EXP1_06_PIN #endif #endif #elif ENABLED(MINIPANEL) - // TO TEST - //#define BEEPER_PIN 42 - // not connected to a pin - //#define LCD_BACKLIGHT_PIN 57 // backlight LED on A11/D? (Mega/Due:65 - AGCM4:57) - - //#define DOGLCD_A0 44 - //#define DOGLCD_CS 58 // Mega/Due:66 - AGCM4:58 + #define BEEPER_PIN AUX2_08 + #define LCD_BACKLIGHT_PIN AUX2_10 - //#define BTN_EN1 40 - //#define BTN_EN2 55 // Mega/Due:63 - AGCM4:55 - //#define BTN_ENC 72 // Mega/Due:59 - AGCM4:72 + #define DOGLCD_A0 AUX2_07 + #define DOGLCD_CS AUX2_09 - //#define SD_DETECT_PIN 49 - //#define KILL_PIN 56 // Mega/Due:64 - AGCM4:56 + #define BTN_EN1 AUX2_06 + #define BTN_EN2 AUX2_04 + #define BTN_ENC AUX2_03 - //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN AUX3_02 + #endif + #define KILL_PIN AUX2_05 #elif ENABLED(ZONESTAR_LCD) - // TO TEST - //#define ADC_KEYPAD_PIN 12 + #define ADC_KEYPAD_PIN 12 #elif ENABLED(AZSMZ_12864) - // TO TEST + // TODO - #else + #elif ENABLED(G3D_PANEL) - // Beeper on AUX-4 - //#define BEEPER_PIN 33 - - // Buttons are directly attached to AUX-2 - #if IS_RRW_KEYPAD - // TO TEST - //#define SHIFT_OUT_PIN 40 - //#define SHIFT_CLK_PIN 44 - //#define SHIFT_LD_PIN 42 - //#define BTN_EN1 56 // Mega/Due:64 - AGCM4:56 - //#define BTN_EN2 72 // Mega/Due:59 - AGCM4:72 - //#define BTN_ENC 55 // Mega/Due:63 - AGCM4:55 - #elif ENABLED(PANEL_ONE) - // TO TEST - //#define BTN_EN1 72 // AUX2 PIN 3 (Mega/Due:59 - AGCM4:72) - //#define BTN_EN2 55 // AUX2 PIN 4 (Mega/Due:63 - AGCM4:55) - //#define BTN_ENC 49 // AUX3 PIN 7 - #else - // TO TEST - //#define BTN_EN1 37 - //#define BTN_EN2 35 - //#define BTN_ENC 31 + #define BEEPER_PIN EXP1_01_PIN + + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN EXP2_07_PIN + #endif + #define KILL_PIN EXP2_08_PIN + + #define BTN_EN1 EXP2_05_PIN + #define BTN_EN2 EXP2_03_PIN + #define BTN_ENC EXP1_02_PIN + + #elif IS_TFTGLCD_PANEL + + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN EXP2_07_PIN #endif - #if ENABLED(G3D_PANEL) - // TO TEST - //#define SD_DETECT_PIN 49 - //#define KILL_PIN 41 + #else + + #define BEEPER_PIN EXP2_05_PIN + + #if ENABLED(PANEL_ONE) // Buttons connect directly to AUX-2 + #define BTN_EN1 AUX2_03 + #define BTN_EN2 AUX2_04 + #define BTN_ENC AUX3_02 + #else + #define BTN_EN1 EXP1_01_PIN + #define BTN_EN2 EXP1_02_PIN + #define BTN_ENC EXP2_03_PIN #endif #endif #endif // IS_NEWPANEL -#endif // HAS_WIRED_LCD +#endif // HAS_WIRED_LCD && !LCD_PINS_DEFINED + +#if IS_RRW_KEYPAD && !HAS_ADC_BUTTONS + #define SHIFT_OUT_PIN AUX2_06 + #define SHIFT_CLK_PIN AUX2_07 + #define SHIFT_LD_PIN AUX2_08 + #ifndef BTN_EN1 + #define BTN_EN1 AUX2_05 + #endif + #ifndef BTN_EN2 + #define BTN_EN2 AUX2_03 + #endif + #ifndef BTN_ENC + #define BTN_ENC AUX2_04 + #endif +#endif + +#if ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) + + #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING + #error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_RAMPS.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" + #endif + + /** + * FYSETC TFT-81050 display pinout + * + * Board Display + * ------ ------ + * (MISO) 50 | 1 2 | 52 (SCK) 5V |10 9 | GND + * (LCD_CS) 33 | 3 4 | 53 (SD_CS) RESET | 8 7 | (SD_DET) + * 31 5 6 | 51 (MOSI) (MOSI) 6 5 | (LCD_CS) + * (SD_DET) 49 | 7 8 | RESET (SD_CS) | 4 3 | (MOD_RESET) + * GND | 9 10 | -- (SCK) | 2 1 | (MISO) + * ------ ------ + * EXP2 EXP1 + * + * Needs custom cable: + * + * Board Adapter Display + * ---------------------------------- + * EXP2-1 <--diode--- EXP1-1 MISO + * EXP2-2 ----------- EXP1-2 SCK + * EXP2-4 ----------- EXP1-3 MOD_RST + * EXP2-4 ----------- EXP1-4 SD_CS + * EXP2-3 ----------- EXP1-5 LCD_CS + * EXP2-6 ----------- EXP1-6 MOSI + * EXP2-7 ----------- EXP1-7 SD DET + * EXP2-8 ----------- EXP1-8 RESET + * EXP2-1 ----------- EXP1-9 MISO->GND + * EXP1-10 ---------- EXP1-10 5V + * + * NOTE: The MISO pin should not get a 5V signal. + * To fix, insert a 1N4148 diode in the MISO line. + */ + + #define BEEPER_PIN EXP1_01_PIN + + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN EXP2_07_PIN + #endif + + #define CLCD_MOD_RESET EXP2_05_PIN + #define CLCD_SPI_CS EXP2_03_PIN + +#endif // TOUCH_UI_FTDI_EVE && LCD_FYSETC_TFT81050 diff --git a/Marlin/src/pins/sanguino/pins_ANET_10.h b/Marlin/src/pins/sanguino/pins_ANET_10.h index eeb2e92e731c..8abf0c07e735 100644 --- a/Marlin/src/pins/sanguino/pins_ANET_10.h +++ b/Marlin/src/pins/sanguino/pins_ANET_10.h @@ -162,31 +162,29 @@ * Connector pinouts * * ------ ------ ---- - * (SDA) D17 | 1 2 | (A1) D30 3V3 | 1 2 | D4 (SS) J3_RX |1 2| J3_TX - * (SCL) D16 | 3 4 | (A2) D29 GND | 3 4 | RESET (TXO) D9 |3 4| D8 (RX0) D8 - * D11 | 5 6 (A3) D28 (MOSI) D5 | 5 6 D7 (SCK) USB_RX |5 6| USB_TX - * D10 | 7 8 | (A4) D27 5V | 7 8 | D6 (MISO) ---- - * 5V | 9 10 | GND J3_RX | 9 10 | J3_TX + * (SDA) 17 | 1 2 | 30 (A1) 3V3 | 1 2 | 4 (SS) J3_RX |1 2| J3_TX + * (SCL) 16 | 3 4 | 29 (A2) GND | 3 4 | RESET (TXO) 9 |3 4| 8 (RX0) + * 11 | 5 6 28 (A3) (MOSI) 5 | 5 6 7 (SCK) USB_RX |5 6| USB_TX + * 10 | 7 8 | 27 (A4) 5V | 7 8 | 6 (MISO) ---- + * 5V | 9 10 | GND J3_RX | 9 10 | J3_TX USB_BLE * ------ ------ - * LCD J3 USB_BLE + * LCD J3 */ - -#define EXP1_01_PIN 17 -#define EXP1_02_PIN 30 -#define EXP1_03_PIN 16 -#define EXP1_04_PIN 29 -#define EXP1_05_PIN 11 -#define EXP1_06_PIN 28 -#define EXP1_07_PIN 10 -#define EXP1_08_PIN 27 -#define EXP1_09_PIN -1 // 5V -#define EXP1_10_PIN -1 // GND +#define EXP1_01_PIN 17 // BEEPER / ENC +#define EXP1_02_PIN 30 // LCD_D4 / SERVO +#define EXP1_03_PIN 16 // ENC / LCD_EN +#define EXP1_04_PIN 29 // SERVO / LCD_RS +#define EXP1_05_PIN 11 // EN1 / LCD_D4 +#define EXP1_06_PIN 28 // LCD_EN / EN1 +#define EXP1_07_PIN 10 // EN2 +#define EXP1_08_PIN 27 // LCD_RS / BEEPER /** * LCD / Controller * * Only the following displays are supported: * ZONESTAR_LCD + * ANET_FULL_GRAPHICS_LCD * CTC_A10S_A13 * REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER */ diff --git a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h index e391cd1020a6..df9fb0f86493 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h @@ -38,59 +38,54 @@ #define BOARD_INFO_NAME "Melzi (Creality)" -// Alter timing for graphical display -#if IS_U8GLIB_ST7920 - #define BOARD_ST7920_DELAY_1 125 - #define BOARD_ST7920_DELAY_2 125 - #define BOARD_ST7920_DELAY_3 125 -#endif - -/** - * EXP1 EXP1 as ENDER2 STOCKDISPLAY EXP1 as CR10 STOCKDISPLAY - * ------ ------ ------ - * D27 | 1 2 | D16 SCK | 1 2 | BTN_E BEEPER_PIN | 1 2 | BTN_ENC - * D11 | 3 4 | RESET BTN_EN1 | 3 4 | RESET BTN_EN1 | 3 4 | RESET - * D10 5 6 | D30 BTN_EN2 5 6 | LCD_A0 BTN_EN2 5 6 | LCD_D4 (ST9720 CLK) - * D28 | 7 8 | D17 LCD_CS | 7 8 | MOSI (ST9720 CS) LCD_RS | 7 8 | LCD_EN (ST9720 DAT) - * GND | 9 10 | 5V GND | 9 10 | 5V GND | 9 10 | 5V - * ------ ------ ------ +/** ------ + * 27 | 1 2 | 16 + * 11 | 3 4 | RESET + * 10 5 6 | 30 + * 28 | 7 8 | 17 + * GND | 9 10 | 5V + * ------ + * EXP1 */ -#define EXP1_01_PIN 27 -#define EXP1_02_PIN 16 -#define EXP1_03_PIN 11 +#define EXP1_01_PIN 27 // BEEP +#define EXP1_02_PIN 16 // ENC +#define EXP1_03_PIN 11 // EN1 #define EXP1_04_PIN -1 // RESET -#define EXP1_05_PIN 10 -#define EXP1_06_PIN 30 -#define EXP1_07_PIN 28 -#define EXP1_08_PIN 17 +#define EXP1_05_PIN 10 // EN2 +#define EXP1_06_PIN 30 // A0 / ST9720 CLK +#define EXP1_07_PIN 28 // CS / ST9720 CS +#define EXP1_08_PIN 17 // ST9720 DAT // // LCD / Controller // #if ANY(MKS_MINI_12864, CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) - #if ENABLED(MKS_MINI_12864) - #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING - #error "CAUTION! MKS_MINI_12864 on MELZI_CREALITY requires wiring modifications. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" - #endif - #define DOGLCD_CS EXP1_07_PIN - #define DOGLCD_A0 EXP1_06_PIN - #elif ENABLED(CR10_STOCKDISPLAY) + #if ANY(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) #define LCD_PINS_RS EXP1_07_PIN // ST9720 CS #define LCD_PINS_EN EXP1_08_PIN // ST9720 DAT #define LCD_PINS_D4 EXP1_06_PIN // ST9720 CLK - #define BEEPER_PIN EXP1_01_PIN - #elif ENABLED(ENDER2_STOCKDISPLAY) + #endif + #if ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY) #define DOGLCD_CS EXP1_07_PIN #define DOGLCD_A0 EXP1_06_PIN - #define DOGLCD_SCK EXP1_01_PIN - #define DOGLCD_MOSI EXP1_08_PIN - #define FORCE_SOFT_SPI #endif + + #define LCD_SDSS 31 // Controller's SD card + #define BTN_ENC EXP1_02_PIN #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN - #define LCD_SDSS 31 // Controller's SD card + #define BEEPER_PIN EXP1_01_PIN + #define LCD_PINS_DEFINED + +#endif + +// Alter timing for graphical display +#if IS_U8GLIB_ST7920 + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 #endif #include "pins_MELZI.h" // ... SANGUINOLOLU_12 ... SANGUINOLOLU_11 @@ -99,61 +94,59 @@ #ifndef SERVO0_PIN #define SERVO0_PIN EXP1_01_PIN #endif - #if SERVO0_PIN == BEEPER_PIN - #undef BEEPER_PIN - #endif #elif HAS_FILAMENT_SENSOR #ifndef FIL_RUNOUT_PIN #define FIL_RUNOUT_PIN EXP1_01_PIN #endif - #if FIL_RUNOUT_PIN == BEEPER_PIN - #undef BEEPER_PIN - #endif +#endif +#if PIN_EXISTS(BEEPER) && (SERVO0_PIN == BEEPER_PIN || FIL_RUNOUT_PIN == BEEPER_PIN) + #undef BEEPER_PIN + #define BEEPER_PIN -1 #endif /** - PIN: 0 Port: B0 E0_DIR_PIN protected - PIN: 1 Port: B1 E0_STEP_PIN protected - PIN: 2 Port: B2 Z_DIR_PIN protected - PIN: 3 Port: B3 Z_STEP_PIN protected - PIN: 4 Port: B4 AVR_SS_PIN protected - . FAN0_PIN protected - . SD_SS_PIN protected - PIN: 5 Port: B5 AVR_MOSI_PIN Output = 1 - . SD_MOSI_PIN Output = 1 - PIN: 6 Port: B6 AVR_MISO_PIN Input = 0 TIMER3A PWM: 0 WGM: 1 COM3A: 0 CS: 3 TCCR3A: 1 TCCR3B: 3 TIMSK3: 0 - . SD_MISO_PIN Input = 0 - PIN: 7 Port: B7 AVR_SCK_PIN Output = 0 TIMER3B PWM: 0 WGM: 1 COM3B: 0 CS: 3 TCCR3A: 1 TCCR3B: 3 TIMSK3: 0 - . SD_SCK_PIN Output = 0 - PIN: 8 Port: D0 RXD Input = 1 - PIN: 9 Port: D1 TXD Input = 0 - PIN: 10 Port: D2 BTN_EN2 Input = 1 - PIN: 11 Port: D3 BTN_EN1 Input = 1 - PIN: 12 Port: D4 HEATER_BED_PIN protected - PIN: 13 Port: D5 HEATER_0_PIN protected - PIN: 14 Port: D6 E0_ENABLE_PIN protected - . X_ENABLE_PIN protected - . Y_ENABLE_PIN protected - PIN: 15 Port: D7 X_STEP_PIN protected - PIN: 16 Port: C0 BTN_ENC Input = 1 - . SCL Input = 1 - PIN: 17 Port: C1 LCD_PINS_EN Output = 0 - . SDA Output = 0 - PIN: 18 Port: C2 X_MIN_PIN protected - . X_STOP_PIN protected - PIN: 19 Port: C3 Y_MIN_PIN protected - . Y_STOP_PIN protected - PIN: 20 Port: C4 Z_MIN_PIN protected - . Z_STOP_PIN protected - PIN: 21 Port: C5 X_DIR_PIN protected - PIN: 22 Port: C6 Y_STEP_PIN protected - PIN: 23 Port: C7 Y_DIR_PIN protected - PIN: 24 Port: A7 TEMP_0_PIN protected - PIN: 25 Port: A6 TEMP_BED_PIN protected - PIN: 26 Port: A5 Z_ENABLE_PIN protected - PIN: 27 Port: A4 BEEPER_PIN Output = 0 - PIN: 28 Port: A3 LCD_PINS_RS Output = 0 - PIN: 29 Port: A2 Input = 0 - PIN: 30 Port: A1 LCD_PINS_D4 Output = 1 - PIN: 31 Port: A0 SDSS Output = 1 + PIN: 0 Port: B0 E0_DIR_PIN protected + PIN: 1 Port: B1 E0_STEP_PIN protected + PIN: 2 Port: B2 Z_DIR_PIN protected + PIN: 3 Port: B3 Z_STEP_PIN protected + PIN: 4 Port: B4 AVR_SS_PIN protected + . FAN0_PIN protected + . SD_SS_PIN protected + PIN: 5 Port: B5 AVR_MOSI_PIN Output = 1 + . SD_MOSI_PIN Output = 1 + PIN: 6 Port: B6 AVR_MISO_PIN Input = 0 TIMER3A PWM: 0 WGM: 1 COM3A: 0 CS: 3 TCCR3A: 1 TCCR3B: 3 TIMSK3: 0 + . SD_MISO_PIN Input = 0 + PIN: 7 Port: B7 AVR_SCK_PIN Output = 0 TIMER3B PWM: 0 WGM: 1 COM3B: 0 CS: 3 TCCR3A: 1 TCCR3B: 3 TIMSK3: 0 + . SD_SCK_PIN Output = 0 + PIN: 8 Port: D0 RXD Input = 1 + PIN: 9 Port: D1 TXD Input = 0 + PIN: 10 Port: D2 BTN_EN2 Input = 1 + PIN: 11 Port: D3 BTN_EN1 Input = 1 + PIN: 12 Port: D4 HEATER_BED_PIN protected + PIN: 13 Port: D5 HEATER_0_PIN protected + PIN: 14 Port: D6 E0_ENABLE_PIN protected + . X_ENABLE_PIN protected + . Y_ENABLE_PIN protected + PIN: 15 Port: D7 X_STEP_PIN protected + PIN: 16 Port: C0 BTN_ENC Input = 1 + . SCL Input = 1 + PIN: 17 Port: C1 LCD_PINS_EN Output = 0 + . SDA Output = 0 + PIN: 18 Port: C2 X_MIN_PIN protected + . X_STOP_PIN protected + PIN: 19 Port: C3 Y_MIN_PIN protected + . Y_STOP_PIN protected + PIN: 20 Port: C4 Z_MIN_PIN protected + . Z_STOP_PIN protected + PIN: 21 Port: C5 X_DIR_PIN protected + PIN: 22 Port: C6 Y_STEP_PIN protected + PIN: 23 Port: C7 Y_DIR_PIN protected + PIN: 24 Port: A7 TEMP_0_PIN protected + PIN: 25 Port: A6 TEMP_BED_PIN protected + PIN: 26 Port: A5 Z_ENABLE_PIN protected + PIN: 27 Port: A4 BEEPER_PIN Output = 0 + PIN: 28 Port: A3 LCD_PINS_RS Output = 0 + PIN: 29 Port: A2 Input = 0 + PIN: 30 Port: A1 LCD_PINS_D4 Output = 1 + PIN: 31 Port: A0 SDSS Output = 1 */ diff --git a/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h b/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h index 323ecaa029fe..dc1ea950a72d 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h @@ -29,12 +29,13 @@ #define BOARD_INFO_NAME "Melzi (Malyan)" #if ENABLED(CR10_STOCKDISPLAY) + #define BTN_ENC 28 + #define BTN_EN1 30 + #define BTN_EN2 29 + #define LCD_PINS_RS 17 // ST9720 CS #define LCD_PINS_EN 16 // ST9720 DAT #define LCD_PINS_D4 11 // ST9720 CLK - #define BTN_EN1 30 - #define BTN_EN2 29 - #define BTN_ENC 28 #define LCD_PINS_DEFINED #endif diff --git a/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h b/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h index 7e4cc22bbe8f..99cdfd0b4228 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h @@ -33,15 +33,17 @@ #define LCD_SDSS -1 #if ANY(CR10_STOCKDISPLAY, LCD_FOR_MELZI) + #define BTN_ENC 26 + #define BTN_EN1 10 + #define BTN_EN2 11 + #define LCD_PINS_RS 30 #define LCD_PINS_EN 28 #define LCD_PINS_D4 16 + #define LCD_PINS_D5 17 #define LCD_PINS_D6 27 #define LCD_PINS_D7 29 - #define BTN_EN1 10 - #define BTN_EN2 11 - #define BTN_ENC 26 #define LCD_PINS_DEFINED #endif diff --git a/Marlin/src/pins/sanguino/pins_MELZI_V2.h b/Marlin/src/pins/sanguino/pins_MELZI_V2.h index 2cd949e095de..b48e77a5c367 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_V2.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_V2.h @@ -25,6 +25,8 @@ * Melzi V2.0 as found at https://www.reprap.org/wiki/Melzi * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Melzi%20V2/Melzi-circuit.png * Origin: https://www.reprap.org/mediawiki/images/7/7d/Melzi-circuit.png + * + * ATmega644P */ #define BOARD_INFO_NAME "Melzi V2" diff --git a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h index 05c3022994f8..6b502ee5307e 100644 --- a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h +++ b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h @@ -112,6 +112,10 @@ #define Z_ENABLE_PIN 4 #endif #define E0_ENABLE_PIN 4 +#else + #if !HAS_CUTTER && !ALL(HAS_WIRED_LCD, IS_NEWPANEL) // Use IO Header + #define CASE_LIGHT_PIN 4 // Hardware PWM - see if IO Header is available + #endif #endif // @@ -125,16 +129,12 @@ * Sanguino libraries! See #368. */ //#define SDSS 24 -#define SDSS 31 +#define SDSS AUX1_09 #if IS_MELZI - #define LED_PIN 27 + #define LED_PIN AUX1_01 #elif MB(STB_11) - #define LCD_BACKLIGHT_PIN 17 // LCD backlight LED -#endif - -#if !HAS_CUTTER && ENABLED(SANGUINOLOLU_V_1_2) && !ALL(HAS_WIRED_LCD, IS_NEWPANEL) // try to use IO Header - #define CASE_LIGHT_PIN 4 // Hardware PWM - see if IO Header is available + #define LCD_BACKLIGHT_PIN AUX1_04 // LCD backlight LED #endif /** @@ -145,11 +145,25 @@ * GND GND D31 D30 D29 D28 D27 * A4 A3 A2 A1 A0 */ +#define AUX1_01 27 // A0 +#define AUX1_02 16 // SCL +#define AUX1_03 28 // A1 +#define AUX1_04 17 // SDA +#define AUX1_05 29 // A2 +#define AUX1_06 10 // RX1 +#define AUX1_07 30 // A3 +#define AUX1_08 11 // TX1 +#define AUX1_09 31 // A4 +#define AUX1_10 12 // PWM // // LCD / Controller // -#if HAS_WIRED_LCD && DISABLED(LCD_PINS_DEFINED) +#ifdef LCD_PINS_DEFINED + + // LCD pins already defined by including header + +#elif HAS_WIRED_LCD #define SD_DETECT_PIN -1 @@ -157,49 +171,53 @@ #if ENABLED(LCD_FOR_MELZI) - #define LCD_PINS_RS 17 - #define LCD_PINS_EN 16 - #define LCD_PINS_D4 11 - #define KILL_PIN 10 - #define BEEPER_PIN 27 + #define LCD_PINS_RS AUX1_04 + #define LCD_PINS_EN AUX1_02 + #define LCD_PINS_D4 AUX1_08 + #define KILL_PIN AUX1_06 + #define BEEPER_PIN AUX1_01 #elif IS_U8GLIB_ST7920 // SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0 #if IS_MELZI - #define LCD_PINS_RS 30 // CS chip select /SS chip slave select - #define LCD_PINS_EN 29 // SID (MOSI) - #define LCD_PINS_D4 17 // SCK (CLK) clock + #define LCD_PINS_RS AUX1_07 // CS chip select /SS chip slave select + #define LCD_PINS_EN AUX1_05 // SID (MOSI) + #define LCD_PINS_D4 AUX1_04 // SCK (CLK) clock // Pin 27 is taken by LED_PIN, but Melzi LED does nothing with // Marlin so this can be used for BEEPER_PIN. You can use this pin // with M42 instead of BEEPER_PIN. - #define BEEPER_PIN 27 + #define BEEPER_PIN AUX1_01 #else // Sanguinololu >=1.3 #define LCD_PINS_RS 4 - #define LCD_PINS_EN 17 - #define LCD_PINS_D4 30 - #define LCD_PINS_D5 29 - #define LCD_PINS_D6 28 - #define LCD_PINS_D7 27 + #define LCD_PINS_EN AUX1_04 + #define LCD_PINS_D4 AUX1_07 + #define LCD_PINS_D5 AUX1_05 + #define LCD_PINS_D6 AUX1_03 + #define LCD_PINS_D7 AUX1_01 #endif #else - #define DOGLCD_A0 30 + #define DOGLCD_A0 AUX1_07 #if ENABLED(MAKRPANEL) - #define BEEPER_PIN 29 - #define DOGLCD_CS 17 - #define LCD_BACKLIGHT_PIN 28 // PA3 + #define BEEPER_PIN AUX1_05 + #define DOGLCD_CS AUX1_04 + #define LCD_BACKLIGHT_PIN AUX1_03 // PA3 #elif IS_MELZI - #define BEEPER_PIN 27 - #define DOGLCD_CS 28 + #define BEEPER_PIN AUX1_01 + #ifndef DOGLCD_CS + #define DOGLCD_CS AUX1_03 + #endif - #else // !MAKRPANEL + #else - #define DOGLCD_CS 29 + #ifndef DOGLCD_CS + #define DOGLCD_CS AUX1_05 + #endif #endif @@ -209,29 +227,29 @@ #elif ENABLED(ZONESTAR_LCD) // For the Tronxy Melzi boards - #define LCD_PINS_RS 28 - #define LCD_PINS_EN 29 - #define LCD_PINS_D4 10 - #define LCD_PINS_D5 11 - #define LCD_PINS_D6 16 - #define LCD_PINS_D7 17 + #define LCD_PINS_RS AUX1_03 + #define LCD_PINS_EN AUX1_05 + #define LCD_PINS_D4 AUX1_06 + #define LCD_PINS_D5 AUX1_08 + #define LCD_PINS_D6 AUX1_02 + #define LCD_PINS_D7 AUX1_04 #else #define LCD_PINS_RS 4 - #define LCD_PINS_EN 17 - #define LCD_PINS_D4 30 - #define LCD_PINS_D5 29 - #define LCD_PINS_D6 28 - #define LCD_PINS_D7 27 + #define LCD_PINS_EN AUX1_04 + #define LCD_PINS_D4 AUX1_07 + #define LCD_PINS_D5 AUX1_05 + #define LCD_PINS_D6 AUX1_03 + #define LCD_PINS_D7 AUX1_01 #endif #if ENABLED(LCD_FOR_MELZI) - #define BTN_ENC 28 - #define BTN_EN1 29 - #define BTN_EN2 30 + #define BTN_ENC AUX1_03 + #define BTN_EN1 AUX1_05 + #define BTN_EN2 AUX1_07 #elif ENABLED(ZONESTAR_LCD) // For the Tronxy Melzi boards @@ -242,26 +260,26 @@ #elif ENABLED(LCD_I2C_PANELOLU2) #if IS_MELZI - #define BTN_ENC 29 + #define BTN_ENC AUX1_05 #ifndef LCD_SDSS - #define LCD_SDSS 30 // Panelolu2 SD card reader rather than the Melzi + #define LCD_SDSS AUX1_07 // Panelolu2 SD card reader rather than the Melzi #endif #else - #define BTN_ENC 30 + #define BTN_ENC AUX1_07 #endif #else // !LCD_FOR_MELZI && !ZONESTAR_LCD && !LCD_I2C_PANELOLU2 - #define BTN_ENC 16 + #define BTN_ENC AUX1_02 #ifndef LCD_SDSS - #define LCD_SDSS 28 // Smart Controller SD card reader rather than the Melzi + #define LCD_SDSS AUX1_03 // Smart Controller SD card reader rather than the Melzi #endif #endif #if IS_NEWPANEL && !defined(BTN_EN1) - #define BTN_EN1 11 - #define BTN_EN2 10 + #define BTN_EN1 AUX1_08 + #define BTN_EN2 AUX1_06 #endif #endif // HAS_WIRED_LCD @@ -273,8 +291,8 @@ #if !MB(AZTEEG_X1) && ENABLED(SANGUINOLOLU_V_1_2) && !ALL(HAS_WIRED_LCD, IS_NEWPANEL) // try to use IO Header #define SPINDLE_LASER_PWM_PIN 4 // Hardware PWM - #define SPINDLE_LASER_ENA_PIN 10 // Pullup or pulldown! - #define SPINDLE_DIR_PIN 11 + #define SPINDLE_LASER_ENA_PIN AUX1_06 // Pullup or pulldown! + #define SPINDLE_DIR_PIN AUX1_08 #elif !MB(MELZI) // use X stepper motor socket @@ -300,7 +318,7 @@ * /RESET O| |O 1A * /SLEEP O| |O 1B * SPINDLE_LASER_PWM_PIN STEP O| |O VDD - * SPINDLE_LASER_ENA_PIN DIR O| |O GND + * SPINDLE_LASER_ENA_PIN DIR O| |O GND * ------- * * Note: Socket names vary from vendor to vendor. diff --git a/Marlin/src/pins/sanguino/pins_ZMIB_V2.h b/Marlin/src/pins/sanguino/pins_ZMIB_V2.h index 438acb79c789..ade9c08aa045 100644 --- a/Marlin/src/pins/sanguino/pins_ZMIB_V2.h +++ b/Marlin/src/pins/sanguino/pins_ZMIB_V2.h @@ -170,7 +170,7 @@ * (CS) D11 | 3 4 | D10 (DC/D4) * (EN2) D12 5 6 | D4 or D3 (EN/RS) * (ENC) D29 | 7 8 | D2 (EN1) - * (GND) | 9 10 | (5V) + * GND | 9 10 | 5V * ------ */ #define EXP1_01_PIN 5 @@ -193,9 +193,9 @@ #define LCDSCREEN_NAME "ZONESTAR_12864LCD" #define FORCE_SOFT_SPI //#define LCD_SDSS EXP1_03_PIN - #define LCD_PINS_RS EXP1_03_PIN // ST7920_CS_PIN (LCD module pin 4) - #define LCD_PINS_EN EXP1_06_PIN // ST7920_DAT_PIN (LCD module pin 5) - #define LCD_PINS_D4 EXP1_04_PIN // ST7920_CLK_PIN (LCD module pin 6) + #define LCD_PINS_RS EXP1_03_PIN // ST7920 CS (LCD-4) + #define LCD_PINS_EN EXP1_06_PIN // ST7920 DAT (LCD-5) + #define LCD_PINS_D4 EXP1_04_PIN // ST7920 CLK (LCD-6) #define BOARD_ST7920_DELAY_1 DELAY_2_NOP #define BOARD_ST7920_DELAY_2 DELAY_2_NOP diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h index 06646e2e5927..7e24afde26e5 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h @@ -176,8 +176,8 @@ // #define CASE_LIGHT_PIN PA13 -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PA8 +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PA8 #endif #define SUICIDE_PIN PC13 diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h index 654fc04a86c2..d67c0a341db5 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h @@ -183,6 +183,19 @@ #define EXP1_07_PIN PB8 #define EXP1_08_PIN PB7 +/* ----- + * | 1 | RST + * | 2 | PA3 RX2 + * | 3 | PA2 TX2 + * | 4 | GND + * | 5 | 5V + * ----- + * TFT + */ + +#define TFT_02 PA3 +#define TFT_03 PA2 + #if HAS_WIRED_LCD #if ENABLED(CR10_STOCKDISPLAY) @@ -347,9 +360,8 @@ #endif // TOUCH_UI_FTDI_EVE && LCD_FYSETC_TFT81050 // -// SD Support +// SD Card // - #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD #endif diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h index c345a27b76e9..9209515b1a24 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h @@ -25,8 +25,8 @@ #define BOARD_INFO_NAME "BTT SKR Mini E3 V1.2" -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PC7 // LED driving pin +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PC7 // LED driving pin #endif /** diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h index 7e6798deafd6..b950d8d1ac83 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h @@ -55,7 +55,13 @@ * ------ * EXP1 */ +#define EXP1_01_PIN PB5 #define EXP1_02_PIN PA15 +#define EXP1_03_PIN PA9 +#define EXP1_04_PIN -1 // RESET +#define EXP1_05_PIN PA10 +#define EXP1_06_PIN PB9 +#define EXP1_07_PIN PB8 #define EXP1_08_PIN PB15 #include "pins_BTT_SKR_MINI_E3_common.h" @@ -63,8 +69,8 @@ // Release PA13/PA14 (led, usb control) from SWD pins #define DISABLE_DEBUG -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PA8 // LED driving pin +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PA8 // LED driving pin #endif #ifndef PS_ON_PIN diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h index f8eb653339ed..4cfd75088fe7 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h @@ -131,16 +131,29 @@ * ------ ------ * EXP1 EXP1 */ -#ifndef EXP1_02_PIN +#ifndef EXP1_08_PIN + #define EXP1_01_PIN PB5 #define EXP1_02_PIN PB6 + #define EXP1_03_PIN PA9 + #define EXP1_04_PIN -1 // RESET + #define EXP1_05_PIN PA10 + #define EXP1_06_PIN PB9 + #define EXP1_07_PIN PB8 #define EXP1_08_PIN PB7 #endif -#define EXP1_01_PIN PB5 -#define EXP1_03_PIN PA9 -#define EXP1_04_PIN -1 // RESET -#define EXP1_05_PIN PA10 -#define EXP1_06_PIN PB9 -#define EXP1_07_PIN PB8 + +/* ----- + * | 1 | RST + * | 2 | PA3 RX2 + * | 3 | PA2 TX2 + * | 4 | GND + * | 5 | 5V + * ----- + * TFT + */ + +#define TFT_02 PA3 +#define TFT_03 PA2 #if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI /** @@ -298,14 +311,14 @@ * ------ ------ * EXP1 EXP1 * - * --- ------ - * RST | 1 | (MISO) |10 9 | SCK - * (RX2) PA3 | 2 | BTN_EN1 | 8 7 | (SS) - * (TX2) PA2 | 3 | BTN_EN2 | 6 5 | MOSI - * GND | 4 | (CD) | 4 3 | (RST) - * 5V | 5 | (GND) | 2 1 | (KILL) - * --- ------ - * TFT EXP2 + * --- ------ + * RST | 1 | (MISO) |10 9 | SCK + * (RX2) PA3 | 2 | BTN_EN1 | 8 7 | (SS) + * (TX2) PA2 | 3 | BTN_EN2 | 6 5 | MOSI + * GND | 4 | (CD) | 4 3 | (RST) + * 5V | 5 | GND | 2 1 | (KILL) + * --- ------ + * TFT EXP2 * * Needs custom cable: * diff --git a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h index 1d501e512b26..d5b52a35a8f4 100644 --- a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h +++ b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h @@ -121,7 +121,7 @@ #define FAN2_PIN PB9 // FAN (fan1 on board) controller cool fan // One NeoPixel onboard and a connector for other NeoPixels -#define NEOPIXEL_PIN PC7 // The NEOPIXEL LED driving pin +#define BOARD_NEOPIXEL_PIN PC7 // The NEOPIXEL LED driving pin /** * ------ diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h index bd6ba086f774..aa836d275bf4 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h @@ -169,6 +169,18 @@ #define ONBOARD_SDIO #define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer +/** Debug port + * ----- + * | 1 | VCC + * | 2 | PA13 + * | 3 | PA14 + * | 4 | GND + * ----- + */ + +#define DEBUG_02_PIN PA13 +#define DEBUG_03_PIN PA14 + #if ANY(RET6_12864_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI) /** diff --git a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h index 027bfd71b531..e1c7175584e7 100644 --- a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h +++ b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h @@ -241,8 +241,8 @@ #if ENABLED(NEOPIXEL_LED) #define LED_PWM PC7 // IO1 - #ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN LED_PWM // USED WIFI IO0/IO1 PIN + #ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN LED_PWM // USED WIFI IO0/IO1 PIN #endif #endif diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index c6aeec979011..b8ff3262c8f9 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -272,6 +272,17 @@ * to let the bootloader init the screen. */ +#if ENABLED(TFT_CLASSIC_UI) + // Emulated DOGM SPI + #define LCD_PINS_EN EXP1_03_PIN + #define LCD_PINS_RS EXP1_04_PIN + #define BTN_ENC EXP1_02_PIN + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN +#elif ENABLED(TFT_COLOR_UI) + #define TFT_BUFFER_WORDS 14400 +#endif + #if HAS_SPI_TFT // Shared SPI TFT @@ -302,27 +313,16 @@ #define LCD_USE_DMA_SPI -#endif +#elif HAS_WIRED_LCD + + #define BEEPER_PIN EXP1_01_PIN -#if ENABLED(TFT_CLASSIC_UI) - // Emulated DOGM SPI - #define LCD_PINS_EN EXP1_03_PIN - #define LCD_PINS_RS EXP1_04_PIN #define BTN_ENC EXP1_02_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN -#elif ENABLED(TFT_COLOR_UI) - #define TFT_BUFFER_WORDS 14400 -#endif -#if HAS_WIRED_LCD && !HAS_SPI_TFT - #define BEEPER_PIN EXP1_01_PIN - #define BTN_ENC EXP1_02_PIN #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_RS EXP1_04_PIN - #define BTN_EN1 EXP2_03_PIN - #define BTN_EN2 EXP2_05_PIN - #define LCD_BACKLIGHT_PIN -1 #if ENABLED(MKS_MINI_12864) @@ -363,7 +363,7 @@ #endif //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 - #else // !MKS_MINI_12864 + #else // !FYSETC_MINI_12864_2_1 #define LCD_PINS_D4 EXP1_05_PIN #if IS_ULTIPANEL @@ -381,10 +381,14 @@ #define BOARD_ST7920_DELAY_2 125 #define BOARD_ST7920_DELAY_3 125 - #endif // !MKS_MINI_12864 + #endif // !FYSETC_MINI_12864_2_1 #endif // HAS_WIRED_LCD && !HAS_SPI_TFT +#ifndef BEEPER_PIN + #define BEEPER_PIN EXP1_01_PIN +#endif + #define SPI_FLASH #if ENABLED(SPI_FLASH) #define SPI_FLASH_SIZE 0x1000000 // 16MB @@ -394,10 +398,6 @@ #define SPI_FLASH_MOSI_PIN PB15 #endif -#ifndef BEEPER_PIN - #define BEEPER_PIN EXP1_01_PIN -#endif - #if ENABLED(SPEAKER) && BEEPER_PIN == PC5 #error "MKS Robin nano default BEEPER_PIN is not a SPEAKER." #endif diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h index 0557992a83e6..49f14866c04d 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -220,7 +220,7 @@ #define SOFTWARE_SPI //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 - #else + #else // !FYSETC_MINI_12864_2_1 #define LCD_PINS_D4 EXP1_05_PIN #if IS_ULTIPANEL @@ -234,7 +234,7 @@ #endif - #endif // !MKS_MINI_12864 + #endif // !FYSETC_MINI_12864_2_1 #endif // HAS_WIRED_LCD @@ -252,19 +252,18 @@ #endif // LED driving pin -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PA2 +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PA2 #endif // // SD Card // #define SDCARD_CONNECTION ONBOARD -#define SPI_DEVICE 2 // Maple -#define ONBOARD_SPI_DEVICE 2 +#define ONBOARD_SPI_DEVICE 2 // Maple #define SDSS SD_SS_PIN #define ONBOARD_SD_CS_PIN SD_SS_PIN -#define SD_DETECT_PIN PC10 // EXP2_07_PIN +#define SD_DETECT_PIN EXP2_07_PIN #define NO_SD_HOST_DRIVE // TODO: This is the only way to set SPI for SD on STM32 (for now) diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h index 10ddc76a0172..50e241901837 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h @@ -80,9 +80,9 @@ #define FIL_RUNOUT_PIN PB8 // MT_DET /** ------ - * (BEEPER) PD2 | 1 2 | PB3 (BTN_ENC) - * (BTN_EN1) PB5 | 3 4 | PA11 (RESET?) - * (BTN_EN2) PB4 5 6 | PC1 (LCD_D4) + * (BEEPER) PD2 | 1 2 | PB3 (ENC) + * (EN1) PB5 | 3 4 | PA11 (RESET?) + * (EN2) PB4 5 6 | PC1 (LCD_D4) * (LCD_RS) PC3 | 7 8 | PC2 (LCD_EN) * GND | 9 10 | 5V * ------ diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index 82eb079e1db7..0738afd80ee8 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -255,13 +255,41 @@ #define ONBOARD_SD_CS_PIN PC11 #elif SD_CONNECTION_IS(LCD) #define ENABLE_SPI1 - #define SDSS PE10 - #define SD_SCK_PIN PA5 - #define SD_MISO_PIN PA6 - #define SD_MOSI_PIN PA7 - #define SD_DETECT_PIN PE12 + #define SDSS EXP2_04_PIN + #define SD_SCK_PIN EXP2_02_PIN + #define SD_MISO_PIN EXP2_01_PIN + #define SD_MOSI_PIN EXP2_06_PIN + #define SD_DETECT_PIN EXP2_07_PIN #endif +/** + * ------ ------ + * PC5 | 1 2 | PE13 PA6 | 1 2 | PA5 + * PD13 | 3 4 | PC6 PE8 | 3 4 | PE10 + * PE14 | 5 6 PE15 PE11 | 5 6 PA7 + * PD11 | 7 8 | PD10 PE12 | 7 8 | RESET + * GND | 9 10 | 5V GND | 9 10 | 3.3V + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_01_PIN PC5 +#define EXP1_02_PIN PE13 +#define EXP1_03_PIN PD13 +#define EXP1_04_PIN PC6 +#define EXP1_05_PIN PE14 +#define EXP1_06_PIN PE15 +#define EXP1_07_PIN PD11 +#define EXP1_08_PIN PD10 + +#define EXP2_01_PIN PA6 +#define EXP2_02_PIN PA5 +#define EXP2_03_PIN PE8 +#define EXP2_04_PIN PE10 +#define EXP2_05_PIN PE11 +#define EXP2_06_PIN PA7 +#define EXP2_07_PIN PE12 +#define EXP2_08_PIN -1 // RESET + // // LCD / Controller // @@ -272,29 +300,40 @@ * to let the bootloader init the screen. */ +#if ENABLED(TFT_CLASSIC_UI) + // Emulated DOGM SPI + #define LCD_PINS_EN EXP1_03_PIN + #define LCD_PINS_RS EXP1_04_PIN + #define BTN_ENC EXP1_02_PIN + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN +#elif ENABLED(TFT_COLOR_UI) + #define TFT_BUFFER_WORDS 14400 +#endif + #if HAS_SPI_TFT // Shared SPI TFT - #define LCD_BACKLIGHT_PIN PD13 + #define LCD_BACKLIGHT_PIN EXP1_03_PIN - #define TOUCH_CS_PIN PE14 // SPI1_NSS - #define TOUCH_SCK_PIN PA5 // SPI1_SCK - #define TOUCH_MISO_PIN PA6 // SPI1_MISO - #define TOUCH_MOSI_PIN PA7 // SPI1_MOSI + #define TOUCH_CS_PIN EXP1_05_PIN // SPI1_NSS + #define TOUCH_SCK_PIN EXP2_02_PIN // SPI1_SCK + #define TOUCH_MISO_PIN EXP2_01_PIN // SPI1_MISO + #define TOUCH_MOSI_PIN EXP2_06_PIN // SPI1_MOSI - #define BTN_EN1 PE8 - #define BTN_EN2 PE11 - #define BTN_ENC PE13 + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN + #define BTN_ENC EXP1_02_PIN - #define TFT_CS_PIN PD11 - #define TFT_SCK_PIN PA5 - #define TFT_MISO_PIN PA6 - #define TFT_MOSI_PIN PA7 - #define TFT_DC_PIN PD10 + #define TFT_CS_PIN EXP1_07_PIN + #define TFT_SCK_PIN EXP2_02_PIN + #define TFT_MISO_PIN EXP2_01_PIN + #define TFT_MOSI_PIN EXP2_06_PIN + #define TFT_DC_PIN EXP1_08_PIN #define TFT_A0_PIN TFT_DC_PIN - #define TFT_RESET_PIN PC6 + #define TFT_RESET_PIN EXP1_04_PIN #define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN #define TOUCH_BUTTONS_HW_SPI @@ -302,27 +341,16 @@ #define LCD_USE_DMA_SPI -#endif +#elif HAS_WIRED_LCD -#if ENABLED(TFT_CLASSIC_UI) - // Emulated DOGM SPI - #define LCD_PINS_EN PD13 - #define LCD_PINS_RS PC6 - #define BTN_ENC PE13 - #define BTN_EN1 PE8 - #define BTN_EN2 PE11 -#elif ENABLED(TFT_COLOR_UI) - #define TFT_BUFFER_WORDS 14400 -#endif + #define BEEPER_PIN EXP1_01_PIN + + #define BTN_ENC EXP1_02_PIN + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN -#if HAS_WIRED_LCD && !HAS_SPI_TFT - #define BEEPER_PIN PC5 - #define BTN_ENC PE13 - #define LCD_PINS_EN PD13 - #define LCD_PINS_RS PC6 - #define BTN_EN1 PE8 - #define BTN_EN2 PE11 - #define LCD_BACKLIGHT_PIN -1 + #define LCD_PINS_EN EXP1_03_PIN + #define LCD_PINS_RS EXP1_04_PIN #if ENABLED(MKS_MINI_12864) @@ -331,18 +359,18 @@ #define LCD_BACKLIGHT_PIN -1 #define LCD_RESET_PIN -1 - #define DOGLCD_A0 PD11 - #define DOGLCD_CS PE15 - #define DOGLCD_SCK PA5 - #define DOGLCD_MOSI PA7 + #define DOGLCD_A0 EXP1_07_PIN + #define DOGLCD_CS EXP1_06_PIN + #define DOGLCD_SCK EXP2_02_PIN + #define DOGLCD_MOSI EXP2_06_PIN #elif IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) - #define PIN_SPI_SCK PA5 - #define PIN_TFT_MISO PA6 - #define PIN_TFT_MOSI PA7 - #define TFTGLCD_CS PE8 + #define PIN_SPI_SCK EXP2_02_PIN + #define PIN_TFT_MISO EXP2_01_PIN + #define PIN_TFT_MOSI EXP2_06_PIN + #define TFTGLCD_CS EXP2_03_PIN #endif #ifndef BEEPER_PIN @@ -350,26 +378,26 @@ #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - #define LCD_PINS_DC PC6 - #define DOGLCD_CS PD13 + #define LCD_PINS_DC EXP1_04_PIN + #define DOGLCD_CS EXP1_03_PIN #define DOGLCD_A0 DOGLCD_A0 #define LCD_BACKLIGHT_PIN -1 - #define LCD_RESET_PIN PE14 - #define NEOPIXEL_PIN PE15 - #define DOGLCD_MOSI PA7 - #define DOGLCD_SCK PA5 + #define LCD_RESET_PIN EXP1_05_PIN + #define NEOPIXEL_PIN EXP1_06_PIN + #define DOGLCD_MOSI EXP2_06_PIN + #define DOGLCD_SCK EXP2_02_PIN #if SD_CONNECTION_IS(ONBOARD) #define FORCE_SOFT_SPI #endif //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 - #else // !MKS_MINI_12864 + #else // !FYSETC_MINI_12864_2_1 - #define LCD_PINS_D4 PE14 + #define LCD_PINS_D4 EXP1_05_PIN #if IS_ULTIPANEL - #define LCD_PINS_D5 PE15 - #define LCD_PINS_D6 PD11 - #define LCD_PINS_D7 PD10 + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_07_PIN + #define LCD_PINS_D7 EXP1_08_PIN #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder @@ -383,7 +411,7 @@ #define BOARD_ST7920_DELAY_3 125 #endif - #endif // !MKS_MINI_12864 + #endif // !FYSETC_MINI_12864_2_1 #endif // HAS_WIRED_LCD && !HAS_SPI_TFT @@ -397,7 +425,7 @@ #endif #ifndef BEEPER_PIN - #define BEEPER_PIN PC5 + #define BEEPER_PIN EXP1_01_PIN #endif #if ENABLED(SPEAKER) && BEEPER_PIN == PC5 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h index 35bf1824210e..545b73cf021c 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h @@ -22,7 +22,8 @@ #pragma once /** - * MKS Robin pro (STM32F103ZET6) board pin assignments + * MKS Robin Pro (STM32F103ZET6) board pin assignments + * Schematic: https://github.com/makerbase-mks/MKS-Robin-Pro/blob/master/hardware/MKS%20Robin%20Pro%20V1.0_001/MKS%20Robin%20Pro%20V1.0_001%20SCH.pdf */ #include "env_validate.h" @@ -111,6 +112,7 @@ #ifndef E2_CS_PIN #define E2_CS_PIN PG9 #endif + // // SPI pins for TMC2130 stepper drivers // @@ -211,11 +213,11 @@ #endif #if SD_CONNECTION_IS(LCD) - #define SD_DETECT_PIN PG3 - #define SD_SCK_PIN PB13 - #define SD_MISO_PIN PB14 - #define SD_MOSI_PIN PB15 - #define SD_SS_PIN PG6 + #define SD_DETECT_PIN EXP2_07_PIN + #define SD_SCK_PIN EXP2_02_PIN + #define SD_MISO_PIN EXP2_01_PIN + #define SD_MOSI_PIN EXP2_06_PIN + #define SD_SS_PIN EXP2_04_PIN #elif SD_CONNECTION_IS(ONBOARD) #define ONBOARD_SDIO #define SD_DETECT_PIN PD12 @@ -224,6 +226,88 @@ #error "No custom SD drive cable defined for this board." #endif +/** ------ ------ + * (BEEPER) PC5 | 1 2 | PG2 (BTN_ENC) (MISO) PB14 | 1 2 | PB13 (SCK) + * (LCD_EN) PG0 | 3 4 | PG1 (LCD_RS) (BTN_EN1) PG5 | 3 4 | PG6 (SD_SS) + * (LCD_D4) PF14 5 6 | PF15 (LCD_D5) (BTN_EN2) PG4 5 6 | PB15 (MOSI) + * (LCD_D6) PF12 | 7 8 | PF13 (LCD_D7) (SD_DETECT) PG3 | 7 8 | RESET + * GND | 9 10 | 5V GND | 9 10 | -- + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_01_PIN PC5 +#define EXP1_02_PIN PG2 +#define EXP1_03_PIN PG0 +#define EXP1_04_PIN PG1 +#define EXP1_05_PIN PF14 +#define EXP1_06_PIN PF15 +#define EXP1_07_PIN PF12 +#define EXP1_08_PIN PF13 + +#define EXP2_01_PIN PB14 +#define EXP2_02_PIN PB13 +#define EXP2_03_PIN PG5 +#define EXP2_04_PIN PG6 +#define EXP2_05_PIN PG4 +#define EXP2_06_PIN PB15 +#define EXP2_07_PIN PG3 +#define EXP2_08_PIN -1 // RESET + +/** ------- + * | 0 | DGND-| + * 3V3 | 1 2 | DGND-| + * (D0) PD14 | 3 4 | PD15 (D1) + * (D2) PD0 | 5 6 | PD1 (D3) + * (D4) PE7 | 7 8 | PE8 (D5) + * (D6) PE9 | 9 10 | PE10 (D7) + * (D8) PE11 | 11 12 | PE12 (D9) + * (D10) PE13 | 13 14 | PE14 (D11) + * (D12) PE15 | 15 16 | PD8 (D13) + * (D14) PD9 | 17 18 | PD10 (D15) + * (NE4) PD7 | 19 20 | PD11 (A0) + * (NWE) PD5 | 21 22 | PD4 (NOE) + * (RST) PC6? | 23 24 | PD13?(LIGHT) + * (MISO2) PB14 | 25 26 | --- (INT) + * (MOSI2) PB15 | 27 28 | PC5 (BEEPER) + * (SCK2) PB13 | 29 30 | VCC + * (NSS2) PA7 | 31 32 | DGND + * ------- + * FSMC + */ +//#define FSMC_00_PIN -1 // GND +//#define FSMC_01_PIN -1 // 3.3V +//#define FSMC_02_PIN -1 // GND +#define FSMC_03_PIN PD14 // D0 +#define FSMC_04_PIN PD15 // D1 +#define FSMC_05_PIN PD0 // D2 +#define FSMC_06_PIN PD1 // D3 +#define FSMC_07_PIN PE7 // D4 +#define FSMC_08_PIN PE8 // D5 +#define FSMC_09_PIN PE9 // D6 +#define FSMC_10_PIN PE10 // D7 +#define FSMC_11_PIN PE11 // D8 +#define FSMC_12_PIN PE12 // D9 +#define FSMC_13_PIN PE13 // D10 +#define FSMC_14_PIN PE14 // D11 +#define FSMC_15_PIN PE15 // D12 +#define FSMC_16_PIN PD8 // D13 +#define FSMC_17_PIN PD9 // D14 +#define FSMC_18_PIN PD10 // D15 +#define FSMC_19_PIN PD7 // NE4 +#define FSMC_20_PIN PD11 // A0 +#define FSMC_21_PIN PD5 // NWE +#define FSMC_22_PIN PD4 // NOE +#define FSMC_23_PIN PC6 // RST +#define FSMC_24_PIN PD13 // LIGHT +#define FSMC_25_PIN PB14 // MISO2 +#define FSMC_26_PIN -1 // INT +#define FSMC_27_PIN PB15 // MOSI2 +#define FSMC_28_PIN PC5 // BEEPER +#define FSMC_29_PIN PB13 // SCK2 +//#define FSMC_30_PIN -1 // VCC +#define FSMC_31_PIN PA7 // NSS2 +//#define FSMC_32_PIN -1 // GND + // // TFT with FSMC interface // @@ -236,29 +320,29 @@ #define TFT_RESET_PIN LCD_RESET_PIN #define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN - #define FSMC_CS_PIN PD7 // NE4 - #define FSMC_RS_PIN PD11 // A0 + #define FSMC_CS_PIN FSMC_19_PIN // NE4 + #define FSMC_RS_PIN FSMC_20_PIN // A0 #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT #define TFT_CS_PIN FSMC_CS_PIN #define TFT_RS_PIN FSMC_RS_PIN - #define LCD_RESET_PIN PC6 - #define LCD_BACKLIGHT_PIN PD13 + #define LCD_RESET_PIN FSMC_23_PIN + #define LCD_BACKLIGHT_PIN FSMC_24_PIN #define TFT_BUFFER_WORDS 14400 #if NEED_TOUCH_PINS #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 2 - #define TOUCH_CS_PIN PA7 // SPI2_NSS - #define TOUCH_SCK_PIN PB13 // SPI2_SCK - #define TOUCH_MISO_PIN PB14 // SPI2_MISO - #define TOUCH_MOSI_PIN PB15 // SPI2_MOSI + #define TOUCH_CS_PIN FSMC_31_PIN // SPI2_NSS + #define TOUCH_SCK_PIN FSMC_29_PIN // SPI2_SCK + #define TOUCH_MISO_PIN FSMC_25_PIN // SPI2_MISO + #define TOUCH_MOSI_PIN FSMC_27_PIN // SPI2_MOSI #else - #define BEEPER_PIN PC5 - #define BTN_ENC PG2 - #define BTN_EN1 PG5 - #define BTN_EN2 PG4 + #define BEEPER_PIN FSMC_28_PIN + #define BTN_ENC EXP1_02_PIN + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN #endif #elif IS_TFTGLCD_PANEL @@ -269,30 +353,30 @@ #elif HAS_WIRED_LCD - #define BEEPER_PIN PC5 - #define BTN_ENC PG2 - #define LCD_PINS_EN PG0 - #define LCD_PINS_RS PG1 - #define BTN_EN1 PG5 - #define BTN_EN2 PG4 + #define BEEPER_PIN EXP1_01_PIN + #define BTN_ENC EXP1_02_PIN + #define LCD_PINS_EN EXP1_03_PIN + #define LCD_PINS_RS EXP1_04_PIN + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN // MKS MINI12864 and MKS LCD12864B. If using MKS LCD12864A (Need to remove RPK2 resistor) - #if ENABLED(MKS_MINI_12864) + #if ANY(ENDER2_STOCKDISPLAY, MKS_MINI_12864) #define LCD_BACKLIGHT_PIN -1 #define LCD_RESET_PIN -1 - #define DOGLCD_A0 PF12 - #define DOGLCD_CS PF15 - #define DOGLCD_SCK PB13 - #define DOGLCD_MOSI PB15 + #define DOGLCD_A0 EXP1_07_PIN + #define DOGLCD_CS EXP1_06_PIN + #define DOGLCD_SCK EXP2_02_PIN + #define DOGLCD_MOSI EXP2_06_PIN - #else // !MKS_MINI_12864 && !ENDER2_STOCKDISPLAY + #else // !ENDER2_STOCKDISPLAY && !MKS_MINI_12864 - #define LCD_PINS_D4 PF14 + #define LCD_PINS_D4 EXP1_05_PIN #if IS_ULTIPANEL - #define LCD_PINS_D5 PF15 - #define LCD_PINS_D6 PF12 - #define LCD_PINS_D7 PF13 + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_07_PIN + #define LCD_PINS_D7 EXP1_08_PIN #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder @@ -300,9 +384,9 @@ #endif - #endif // !MKS_MINI_12864 && !ENDER2_STOCKDISPLAY + #endif -#endif +#endif // HAS_WIRED_LCD // Alter timing for graphical display #if IS_U8GLIB_ST7920 diff --git a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h index 4b05672fb05a..32f56e31fd9a 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h @@ -181,17 +181,15 @@ // // Misc. Functions // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PB7 // LED driving pin +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PB7 // LED driving pin #endif #ifndef PS_ON_PIN #define PS_ON_PIN PE1 // Power Supply Control #endif -/** - * BTT E3 RRF - * ------ +/** ------ * (BEEPER) PE8 | 1 2 | PE9 (BTN_ENC) * (BTN_EN1) PE7 | 3 4 | RESET * (BTN_EN2) PB2 5 6 | PE10 (LCD_D4) @@ -200,20 +198,28 @@ * ------ * EXP1 */ +#define EXP1_01_PIN PE8 +#define EXP1_02_PIN PE9 +#define EXP1_03_PIN PE7 +#define EXP1_04_PIN -1 // RESET +#define EXP1_05_PIN PB2 +#define EXP1_06_PIN PE10 +#define EXP1_07_PIN PB1 +#define EXP1_08_PIN PE11 #if HAS_WIRED_LCD #if ANY(CR10_STOCKDISPLAY, LCD_FOR_MELZI) - #define BEEPER_PIN PE8 + #define BEEPER_PIN EXP1_01_PIN - #define BTN_ENC PE9 - #define BTN_EN1 PE7 - #define BTN_EN2 PB2 + #define BTN_ENC EXP1_02_PIN + #define BTN_EN1 EXP1_03_PIN + #define BTN_EN2 EXP1_05_PIN - #define LCD_PINS_RS PB1 - #define LCD_PINS_EN PE11 - #define LCD_PINS_D4 PE10 + #define LCD_PINS_D4 EXP1_06_PIN + #define LCD_PINS_RS EXP1_07_PIN + #define LCD_PINS_EN EXP1_08_PIN #if ENABLED(LCD_FOR_MELZI) @@ -257,24 +263,24 @@ #error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_E3_RRF.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" #endif - #define LCD_PINS_RS PE10 - #define LCD_PINS_EN PE9 - #define LCD_PINS_D4 PB1 - #define LCD_PINS_D5 PB2 - #define LCD_PINS_D6 PE7 - #define LCD_PINS_D7 PE8 + #define LCD_PINS_RS EXP1_06_PIN + #define LCD_PINS_EN EXP1_02_PIN + #define LCD_PINS_D4 EXP1_07_PIN + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_03_PIN + #define LCD_PINS_D7 EXP1_01_PIN #define ADC_KEYPAD_PIN PB0 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD! #elif ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY) - #define BTN_ENC PE9 - #define BTN_EN1 PE7 - #define BTN_EN2 PB2 + #define BTN_ENC EXP1_02_PIN + #define BTN_EN1 EXP1_03_PIN + #define BTN_EN2 EXP1_05_PIN - #define DOGLCD_CS PB1 - #define DOGLCD_A0 PE10 - #define DOGLCD_SCK PE8 - #define DOGLCD_MOSI PE11 + #define DOGLCD_CS EXP1_07_PIN + #define DOGLCD_A0 EXP1_06_PIN + #define DOGLCD_SCK EXP1_01_PIN + #define DOGLCD_MOSI EXP1_08_PIN #define FORCE_SOFT_SPI #define LCD_BACKLIGHT_PIN -1 @@ -316,7 +322,7 @@ * EXP1-1 ----------- EXP1-7 SD_DET */ - #define TFTGLCD_CS PE7 + #define TFTGLCD_CS EXP1_03_PIN #endif @@ -373,10 +379,10 @@ #define CLCD_SPI_BUS 1 // SPI1 connector - #define BEEPER_PIN PE9 + #define BEEPER_PIN EXP1_02_PIN - #define CLCD_MOD_RESET PE7 - #define CLCD_SPI_CS PB1 + #define CLCD_MOD_RESET EXP1_03_PIN + #define CLCD_SPI_CS EXP1_07_PIN #endif // TOUCH_UI_FTDI_EVE && LCD_FYSETC_TFT81050 diff --git a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h index 5a92d9729390..76596a6dde25 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -501,6 +501,7 @@ #endif #endif + #endif // HAS_WIRED_LCD // Alter timing for graphical display @@ -531,8 +532,8 @@ // // NeoPixel LED // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PB0 +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PB0 #endif #if ENABLED(WIFISUPPORT) diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h index 5904186fd072..b1ea4bca4c29 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h @@ -90,8 +90,8 @@ #define POWER_LOSS_PIN PC13 // Power Loss Detection: PWR-DET #endif -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PA14 // LED driving pin +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PA14 // LED driving pin #endif #ifndef PS_ON_PIN diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h index 9e9f2a607af6..a20002dfc520 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h @@ -640,8 +640,8 @@ // // NeoPixel LED // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PE6 +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PE6 #endif #if ENABLED(WIFISUPPORT) diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h index 3daa8139524a..92a1545f8a28 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h @@ -255,7 +255,7 @@ #define FORCE_SOFT_SPI #define KILL_PIN -1 // NC - #define NEOPIXEL_PIN EXP1_07_PIN + #define BOARD_NEOPIXEL_PIN EXP1_07_PIN #elif HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h index da11ce05ef18..83062a54871b 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h @@ -206,7 +206,6 @@ // #define LED_PIN PA15 // Status LED //#define CASE_LIGHT_PIN PB6 // LED Ribbon Connector (PWM TIM4_CH1) -//#define NEOPIXEL_PIN -1 #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN PB8 // swap R and G pin for compatibility with real wires #endif diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_X.h b/Marlin/src/pins/stm32f4/pins_LERDGE_X.h index 22e7f6e2e2b4..f795cc35ac83 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_X.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_X.h @@ -113,7 +113,6 @@ // //#define CASE_LIGHT_PIN_CI -1 //#define CASE_LIGHT_PIN_DO -1 -//#define NEOPIXEL_PIN -1 // // SD support (On board) diff --git a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_V2.h b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_V2.h index 772a93605ae6..c5c79311e30e 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_V2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_V2.h @@ -59,8 +59,6 @@ #endif // The FYSETC_MINI_12864_2_1 uses one of the EXP pins -#if DISABLED(FYSETC_MINI_12864_2_1) && !defined(NEOPIXEL_PIN) - #define NEOPIXEL_PIN PC5 -#endif +#define BOARD_NEOPIXEL_PIN PC5 #include "pins_MKS_MONSTER8_common.h" diff --git a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h index 49291b234402..7ec2f1263072 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h @@ -359,8 +359,8 @@ // // NeoPixel LED // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PC5 +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PC5 #endif // diff --git a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h index dc907cd5b750..ae03e3c194e8 100644 --- a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h +++ b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h @@ -163,9 +163,9 @@ #define FAN_SOFT_PWM_REQUIRED // -// Neopixel +// NeoPixel // -#define NEOPIXEL_PIN PC7 +#define BOARD_NEOPIXEL_PIN PC7 #define NEOPIXEL2_PIN PC8 // diff --git a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h index 3c59f521d5df..7df1fb31e611 100644 --- a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h +++ b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h @@ -163,9 +163,9 @@ #define FAN_SOFT_PWM_REQUIRED // -// Neopixel +// NeoPixel // -#define NEOPIXEL_PIN PC7 +#define BOARD_NEOPIXEL_PIN PC7 #define NEOPIXEL2_PIN PC8 // diff --git a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h index daed1da4b00c..ca663039e887 100644 --- a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h +++ b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h @@ -139,28 +139,56 @@ #define SD_DETECT_PIN PB0 #define BEEPER_PIN PE8 +/** + * ------ ------ + * (BEEPER) ???? | 1 2 | PE7 (BTN_ENC) (MISO) ???? | 1 2 | ???? (SCK) + * (LCD_EN) PE9 | 3 4 | PE10 (LCD_RS) (BTN_EN1) PB2 | 3 4 | ???? (SD_SS) + * (LCD_D4) PE12 | 5 6 PE13 (LCD_D5) (BTN_EN2) PB1 | 5 6 ???? (MOSI) + * (LCD_D6) PE14 | 7 8 | PE15 (LCD_D7) (SD_DETECT) ???? | 7 8 | RESET + * GND | 9 10 | 5V GND | 9 10 | -- + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_01_PIN -1 +#define EXP1_02_PIN PE7 // ENC +#define EXP1_03_PIN PE9 +#define EXP1_04_PIN PE10 +#define EXP1_05_PIN PE12 +#define EXP1_06_PIN PE13 // CS +#define EXP1_07_PIN PE14 // A0 +#define EXP1_08_PIN PE15 + +#define EXP2_01_PIN -1 +#define EXP2_02_PIN -1 +#define EXP2_03_PIN PB2 // EN1 +#define EXP2_04_PIN -1 +#define EXP2_05_PIN PB1 // EN2 +#define EXP2_06_PIN -1 +#define EXP2_07_PIN -1 +#define EXP2_08_PIN -1 + // // LCD / Controller // #if HAS_WIRED_LCD - #define BTN_EN1 PB2 - #define BTN_EN2 PB1 - #define BTN_ENC PE7 + #define BTN_ENC EXP1_02_PIN + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_05_PIN - #define LCD_PINS_RS PE10 - #define LCD_PINS_EN PE9 - #define LCD_PINS_D4 PE12 + #define LCD_PINS_EN EXP1_03_PIN + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_D4 EXP1_05_PIN #if ENABLED(MKS_MINI_12864) - #define DOGLCD_CS PE13 - #define DOGLCD_A0 PE14 + #define DOGLCD_CS EXP1_06_PIN + #define DOGLCD_A0 EXP1_07_PIN #endif #if IS_ULTIPANEL - #define LCD_PINS_D5 PE13 - #define LCD_PINS_D6 PE14 - #define LCD_PINS_D7 PE15 + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_07_PIN + #define LCD_PINS_D7 EXP1_08_PIN #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder diff --git a/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h b/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h index 61490005987e..9151e5e07ffb 100644 --- a/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h +++ b/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h @@ -45,9 +45,9 @@ #endif // -// Neopixels +// NeoPixel // -#define NEOPIXEL_PIN PA8 +#define BOARD_NEOPIXEL_PIN PA8 // // Servos diff --git a/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h b/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h index 6c31fdc57261..912d69e62803 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h @@ -133,8 +133,8 @@ // // Default NEOPIXEL_PIN // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PD3 // LED driving pin +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PD3 // LED driving pin #endif // diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h index c2c16ba696bd..8241750be6f5 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h @@ -348,6 +348,6 @@ // // NeoPixel LED // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PC7 // RGB +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PC7 // RGB #endif diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h index 2990fc50a1b9..0131c50ebfbc 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h @@ -303,8 +303,8 @@ // // NeoPixel LED // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PD0 +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PD0 #endif #ifndef NEOPIXEL2_PIN diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h index ed3fb4e9dcad..2a9157688f7c 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h @@ -331,8 +331,8 @@ // // NeoPixel LED // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PC11 // RGB1 +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PC11 // RGB1 #endif #ifndef NEOPIXEL2_PIN diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_0.h index 824e44130f6e..b81dbe0dac26 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_0.h @@ -73,8 +73,8 @@ // // NeoPixel LED // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PC6 +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PC6 #endif #ifndef NEOPIXEL2_PIN diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_1.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_1.h index d7c15eaa047e..36aa3895c372 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_1.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_1.h @@ -72,8 +72,8 @@ // // NeoPixel LED // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PA9 +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PA9 #endif #ifndef NEOPIXEL2_PIN diff --git a/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h b/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h index c5e0623f1847..a0f05f1d7ee6 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h @@ -169,6 +169,20 @@ #define EXP1_09_PIN -1 #define EXP1_10_PIN -1 +/** SPI Port + * ------ + * 5V | 1 2 | GND + * CS | 3 4 | CLK + * MOSI | 5 6 | MISO + * 3V3 | 7 8 | GND + * ------ + * SPI1 + */ +#define SPI1_03_PIN PD9 +#define SPI1_04_PIN PA5 +#define SPI1_05_PIN PA7 +#define SPI1_06_PIN PA6 + #if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI /** * ------ ------ ------ @@ -442,8 +456,8 @@ #define SD_MOSI_PIN PA7 // -// Default NEOPIXEL_PIN +// NeoPixel // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PA8 // LED driving pin +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PA8 // LED driving pin #endif diff --git a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h index 8d21b89acca4..3ef00286670d 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h @@ -448,8 +448,8 @@ // // NeoPixel LED // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PE10 +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PE10 #endif #ifndef NEOPIXEL2_PIN #define NEOPIXEL2_PIN PE9 diff --git a/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h b/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h index 5b54ebcf73bb..1a72572e231b 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h @@ -172,7 +172,7 @@ #define FAN1_PIN PA6 // "FAN1" #define FAN2_PIN PA7 // "FAN2" -#define NEOPIXEL_PIN PH3 +#define BOARD_NEOPIXEL_PIN PH3 #define NEOPIXEL2_PIN PB1 #if HAS_LTDC_TFT diff --git a/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h b/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h index ee62002b5986..fe0e1a02cef9 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h @@ -23,6 +23,10 @@ #include "env_validate.h" +// +// https://github.com/bigtreetech/SKR-3 +// + // If you have the BigTreeTech driver expansion module, enable BTT_MOTOR_EXPANSION // https://github.com/bigtreetech/BTT-Expansion-module/tree/master/BTT%20EXP-MOT //#define BTT_MOTOR_EXPANSION @@ -627,8 +631,8 @@ // // NeoPixel LED // -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PE6 +#ifndef BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PE6 #endif #if ENABLED(WIFISUPPORT)