1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-26 13:25:54 +00:00

📺 SKR_MINI_SCREEN_ADAPTER for BTT SKR Mini E3 V3 (#24521)

This commit is contained in:
ellensp 2022-07-20 10:32:08 +12:00 committed by Scott Lahteine
parent 35e1384dec
commit 3a5e87cdb7

View File

@ -75,10 +75,6 @@
#define POWER_LOSS_PIN PC12 // Power Loss Detection: PWR-DET #define POWER_LOSS_PIN PC12 // Power Loss Detection: PWR-DET
#endif #endif
#ifndef NEOPIXEL_PIN
#define NEOPIXEL_PIN PA8 // LED driving pin
#endif
#ifndef PS_ON_PIN #ifndef PS_ON_PIN
#define PS_ON_PIN PC13 // Power Supply Control #define PS_ON_PIN PC13 // Power Supply Control
#endif #endif
@ -153,8 +149,16 @@
* ------ * ------
* EXP1 * EXP1
*/ */
#define EXP1_01_PIN PB5
#define EXP1_02_PIN PA15 #define EXP1_02_PIN PA15
#define EXP1_03_PIN PA9
#define EXP1_04_PIN -1
#define EXP1_05_PIN PA10
#define EXP1_06_PIN PB9
#define EXP1_07_PIN PB8
#define EXP1_08_PIN PD6 #define EXP1_08_PIN PD6
#define EXP1_09_PIN -1
#define EXP1_10_PIN -1
#if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI #if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI
/** /**
@ -176,22 +180,64 @@
#define BEEPER_PIN EXP1_02_PIN #define BEEPER_PIN EXP1_02_PIN
#define BTN_EN1 EXP1_08_PIN #define BTN_EN1 EXP1_08_PIN
#define BTN_EN2 PB8 #define BTN_EN2 EXP1_07_PIN
#define BTN_ENC PB5 #define BTN_ENC EXP1_01_PIN
#elif HAS_WIRED_LCD #elif HAS_WIRED_LCD
#if ENABLED(SKR_MINI_SCREEN_ADAPTER)
/** https://github.com/VoronDesign/Voron-Hardware/tree/master/SKR-Mini_Screen_Adaptor/SRK%20Mini%20E3%20V3.0
*
* SKR Mini E3 V3.0 SKR Mini Screen Adaptor
* ------ ------
* 5V | 1 2 | GND MISO | 1 2 | SCK
* CS | 3 4 | SCK (EN1) PA10 | 3 4 | --
* MOSI | 5 6 | MISO (EN2) PA9 5 6 | MOSI
* 3V3 | 7 8 | GND -- | 7 8 | --
* ------ GND | 9 10| RESET (Kill)
* SPI ------
* EXP2
*
* ------ ------
* PB5 | 1 2 | PA15 -- | 1 2 | PB5 (BTN_ENC)
* PA9 | 3 4 | RESET (LCD CS) PB8 | 3 4 | PD6 (LCD_A0)
* PA10 5 6 | PB9 (RESET) PB9 5 6 | PA15 (DIN)
* PB8 | 7 8 | PD6 -- | 7 8 | --
* GND | 9 10| 5V GND | 9 10| 5V
* ------ ------
* EXP1 EXP1
*/
#if ENABLED(FYSETC_MINI_12864_2_1)
#define BTN_ENC EXP1_01_PIN
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_05_PIN
#define BEEPER_PIN -1
#define LCD_RESET_PIN EXP1_06_PIN
#define DOGLCD_CS EXP1_07_PIN
#define DOGLCD_A0 EXP1_08_PIN
#define DOGLCD_SCK PA5
#define DOGLCD_MOSI PA7
#define FORCE_SOFT_SPI
#define LCD_BACKLIGHT_PIN -1
#define NEOPIXEL_PIN EXP1_02_PIN
#else
#error "Only CR10_FYSETC_MINI_12864_2_1 and compatibles are currently supported on the BIGTREE_SKR_MINI_E3 with SKR_MINI_SCREEN_ADAPTER"
#endif
#else
#if ENABLED(CR10_STOCKDISPLAY) #if ENABLED(CR10_STOCKDISPLAY)
#define BEEPER_PIN PB5 #define BEEPER_PIN EXP1_01_PIN
#define BTN_ENC EXP1_02_PIN #define BTN_ENC EXP1_02_PIN
#define BTN_EN1 PA9 #define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 PA10 #define BTN_EN2 EXP1_05_PIN
#define LCD_PINS_RS PB8 #define LCD_PINS_RS EXP1_07_PIN
#define LCD_PINS_ENABLE EXP1_08_PIN #define LCD_PINS_ENABLE EXP1_08_PIN
#define LCD_PINS_D4 PB9 #define LCD_PINS_D4 EXP1_06_PIN
#elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD! #elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD!
@ -199,23 +245,23 @@
#error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" #error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif #endif
#define LCD_PINS_RS PB9 #define LCD_PINS_RS EXP1_06_PIN
#define LCD_PINS_ENABLE EXP1_02_PIN #define LCD_PINS_ENABLE EXP1_02_PIN
#define LCD_PINS_D4 PB8 #define LCD_PINS_D4 EXP1_07_PIN
#define LCD_PINS_D5 PA10 #define LCD_PINS_D5 EXP1_05_PIN
#define LCD_PINS_D6 PA9 #define LCD_PINS_D6 EXP1_03_PIN
#define LCD_PINS_D7 PB5 #define LCD_PINS_D7 EXP1_01_PIN
#define ADC_KEYPAD_PIN PA1 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD! #define ADC_KEYPAD_PIN PA1 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD!
#elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY) #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
#define BTN_ENC EXP1_02_PIN #define BTN_ENC EXP1_02_PIN
#define BTN_EN1 PA9 #define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 PA10 #define BTN_EN2 EXP1_05_PIN
#define DOGLCD_CS PB8 #define DOGLCD_CS EXP1_07_PIN
#define DOGLCD_A0 PB9 #define DOGLCD_A0 EXP1_06_PIN
#define DOGLCD_SCK PB5 #define DOGLCD_SCK EXP1_01_PIN
#define DOGLCD_MOSI EXP1_08_PIN #define DOGLCD_MOSI EXP1_08_PIN
#define FORCE_SOFT_SPI #define FORCE_SOFT_SPI
@ -234,11 +280,11 @@
* *
* Board Display * Board Display
* ------ ------ * ------ ------
* (BEEPER) PB6 | 1 2 | PB5 (SD_DET) 5V | 1 2 | GND * (BEEPER) PB6 | 1 2 | PB5 (SD_DET) 5V |10 9 | GND
* RESET | 3 4 | PA9 (MOD_RESET) -- | 3 4 | (SD_DET) * RESET | 3 4 | PA9 (MOD_RESET) -- | 8 7 | (SD_DET)
* PB9 5 6 | PA10 (SD_CS) (MOSI) | 5 6 | -- * PB9 5 6 | PA10 (SD_CS) (MOSI) | 6 5 | --
* PB7 | 7 8 | PB8 (LCD_CS) (SD_CS) | 7 8 | (LCD_CS) * PB7 | 7 8 | PB8 (LCD_CS) (SD_CS) | 4 3 | (LCD_CS)
* GND | 9 10 | 5V (SCK) | 9 10 | (MISO) * GND | 9 10 | 5V (SCK) | 2 1 | (MISO)
* ------ ------ * ------ ------
* EXP1 EXP1 * EXP1 EXP1
* *
@ -246,19 +292,19 @@
* *
* Board Display * Board Display
* *
* EXP1-1 ----------- EXP1-10 * EXP1-10 ----------- EXP1-10 5V
* EXP1-2 ----------- EXP1-9 * EXP1-9 ------------ EXP1-9 GND
* SPI1-4 ----------- EXP1-6 * SPI1-4 ------------ EXP1-6 MOSI
* EXP1-4 ----------- FREE * EXP1-7 ------------ n/c
* SPI1-3 ----------- EXP1-2 * SPI1-3 ------------ EXP1-2 SCK
* EXP1-6 ----------- EXP1-4 * EXP1-5 ------------ EXP1-4 SD_CS
* EXP1-7 ----------- FREE * EXP1-4 ------------ n/c
* EXP1-8 ----------- EXP1-3 * EXP1-3 ------------ EXP1-3 LCD_CS
* SPI1-1 ----------- EXP1-1 * SPI1-1 ------------ EXP1-1 MISO
* EXP1-10 ----------- EXP1-7 * EXP1-1 ------------ EXP1-7 SD_DET
*/ */
#define TFTGLCD_CS PA9 #define TFTGLCD_CS EXP1_03_PIN
#endif #endif
@ -295,14 +341,14 @@
* On BTT boards pins from IDC10 connector are numbered in unusual order. * On BTT boards pins from IDC10 connector are numbered in unusual order.
*/ */
#define BTN_ENC EXP1_02_PIN #define BTN_ENC EXP1_02_PIN
#define BTN_EN1 PB9 #define BTN_EN1 EXP1_06_PIN
#define BTN_EN2 PB5 #define BTN_EN2 EXP1_01_PIN
#define BEEPER_PIN -1 #define BEEPER_PIN -1
#define DOGLCD_CS PA9 #define DOGLCD_CS EXP1_03_PIN
#define DOGLCD_A0 PA10 #define DOGLCD_A0 EXP1_05_PIN
#define DOGLCD_SCK PB8 #define DOGLCD_SCK EXP1_07_PIN
#define DOGLCD_MOSI PD6 #define DOGLCD_MOSI EXP1_08_PIN
#define FORCE_SOFT_SPI #define FORCE_SOFT_SPI
#define LCD_BACKLIGHT_PIN -1 #define LCD_BACKLIGHT_PIN -1
@ -311,6 +357,8 @@
#error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, FYSETC_MINI_12864_2_1, and TFTGLCD_PANEL_(SPI|I2C) are currently supported on the BIGTREE_SKR_MINI_E3." #error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, FYSETC_MINI_12864_2_1, and TFTGLCD_PANEL_(SPI|I2C) are currently supported on the BIGTREE_SKR_MINI_E3."
#endif #endif
#endif // SKR_MINI_SCREEN_ADAPTER
#endif // HAS_WIRED_LCD #endif // HAS_WIRED_LCD
#if BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) #if BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050)
@ -352,9 +400,8 @@
#define BEEPER_PIN EXP1_02_PIN #define BEEPER_PIN EXP1_02_PIN
#define CLCD_MOD_RESET PA9 #define CLCD_MOD_RESET EXP1_03_PIN
#define CLCD_SPI_CS PB8 #define CLCD_SPI_CS EXP1_07_PIN
#endif // TOUCH_UI_FTDI_EVE && LCD_FYSETC_TFT81050 #endif // TOUCH_UI_FTDI_EVE && LCD_FYSETC_TFT81050
// //
@ -368,8 +415,8 @@
#if SD_CONNECTION_IS(ONBOARD) #if SD_CONNECTION_IS(ONBOARD)
#define SD_DETECT_PIN PC3 #define SD_DETECT_PIN PC3
#elif SD_CONNECTION_IS(LCD) && (BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) || IS_TFTGLCD_PANEL) #elif SD_CONNECTION_IS(LCD) && (BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) || IS_TFTGLCD_PANEL)
#define SD_DETECT_PIN PB5 #define SD_DETECT_PIN EXP1_01_PIN
#define SD_SS_PIN PA10 #define SD_SS_PIN EXP1_05_PIN
#elif SD_CONNECTION_IS(CUSTOM_CABLE) #elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "SD CUSTOM_CABLE is not compatible with SKR Mini E3." #error "SD CUSTOM_CABLE is not compatible with SKR Mini E3."
#endif #endif
@ -383,3 +430,10 @@
#define SD_SCK_PIN PA5 #define SD_SCK_PIN PA5
#define SD_MISO_PIN PA6 #define SD_MISO_PIN PA6
#define SD_MOSI_PIN PA7 #define SD_MOSI_PIN PA7
//
// Default NEOPIXEL_PIN
//
#ifndef NEOPIXEL_PIN
#define NEOPIXEL_PIN PA8 // LED driving pin
#endif