From e5825a0d35b6ea72f4ae0417da9c5d176cbc083c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20B=C5=82a=C5=BCewicz?= Date: Sat, 3 Jul 2021 13:40:55 +0200 Subject: [PATCH] DWIN LCD pins for BTT SKR Mini V1.0, V1.2 and V2.0 Also changed default LCD UART port for BTT SKR E3 TURBO --- Marlin/src/inc/Conditionals_LCD.h | 6 ++++- .../src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h | 2 +- .../stm32f1/pins_BTT_SKR_MINI_E3_common.h | 22 ++++++++++++++++++- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 833fe0d2277e..a9ad5018e89c 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -1078,7 +1078,11 @@ #if ENABLED(DWIN_CREALITY_LCD) #define SERIAL_CATCHALL 0 #ifndef LCD_SERIAL_PORT - #define LCD_SERIAL_PORT 3 // Creality 4.x board + #if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_MINI_E3_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO) + #define LCD_SERIAL_PORT 1 + #else + #define LCD_SERIAL_PORT 3 // Creality 4.x board + #endif #endif #endif 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 4719dd81115b..970a402b3059 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h @@ -202,7 +202,7 @@ #define EXP1_10_PIN P2_08 #if ENABLED(DWIN_CREALITY_LCD) - #error "DWIN_CREALITY_LCD requires a custom cable with TX = P0_15, RX = P0_16, and LCD_SERIAL_PORT 1. Comment out this line to continue." + #error "DWIN_CREALITY_LCD requires a custom cable with TX = P0_15, RX = P0_16. Comment out this line to continue." #define BEEPER_PIN EXP1_10_PIN #define BTN_EN1 EXP1_03_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 5850f11ef030..6cf4624ce739 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 @@ -134,7 +134,27 @@ #define EXP1_3 PB7 #endif -#if HAS_WIRED_LCD +#if ENABLED(DWIN_CREALITY_LCD) + /** + * ----- ------ ------ + * VCC | 1 2 | GND VCC | 1 2 | GND GND | 2 1 | VCC + * A | 3 4 | B A | 3 4 | B B | 4 3 | A + * | 5 6 TX BEEP | 5 6 ENT ENT | 6 5 | BEEP + * | 7 8 | RX TX | 7 8 | RX RX | 8 7 | TX + * BEEP | 9 10| ENT | 9 10| | 10 9 | + * ----- ------ ------ + * EXP1 DWIN DWIN (plug) + * + * All pins are labeled as printed on DWIN PCB. Connect TX-TX, A-A and so on. + */ + + #error "DWIN_CREALITY_LCD requires a custom cable, see diagram above this line. Comment out this line to continue." + + #define BEEPER_PIN EXP1_9 + #define BTN_EN1 EXP1_3 + #define BTN_EN2 PB8 + #define BTN_ENC PB5 +#elif HAS_WIRED_LCD #if ENABLED(CR10_STOCKDISPLAY)