From 10fd9ed896bc2eebc4f4d81e02d7f7502e207039 Mon Sep 17 00:00:00 2001 From: Darren Horrocks Date: Sat, 7 Nov 2020 08:42:14 +0000 Subject: [PATCH] Anet 1.0 alternative graphical LCD wiring (#20022) --- Marlin/Configuration.h | 3 +- Marlin/src/inc/Conditionals_LCD.h | 2 +- Marlin/src/inc/SanityCheck.h | 2 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h | 5 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 5 +- Marlin/src/pins/sanguino/pins_ANET_10.h | 54 +++++++++++++++------ 6 files changed, 51 insertions(+), 20 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 0b6234bbcc..1297c61aed 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -2095,9 +2095,10 @@ // // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6 // A clone of the RepRapDiscount full graphics display but with -// different pins/wiring (see pins_ANET_10.h). +// different pins/wiring (see pins_ANET_10.h). Enable one of these. // //#define ANET_FULL_GRAPHICS_LCD +//#define ANET_FULL_GRAPHICS_LCD_ALT_WIRING // // AZSMZ 12864 LCD with SD diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index a2ac480f2a..98aa4afb8c 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -235,7 +235,7 @@ #define BOARD_ST7920_DELAY_2 DELAY_NS(125) #define BOARD_ST7920_DELAY_3 DELAY_NS(125) -#elif ANY(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, ANET_FULL_GRAPHICS_LCD, BQ_LCD_SMART_CONTROLLER) +#elif ANY(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, ANET_FULL_GRAPHICS_LCD, ANET_FULL_GRAPHICS_LCD_ALT_WIRING, BQ_LCD_SMART_CONTROLLER) #define IS_RRD_FG_SC 1 diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 498455e59e..ef79241d71 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -2220,7 +2220,7 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal + COUNT_ENABLED(TFTGLCD_PANEL_SPI, TFTGLCD_PANEL_I2C) \ + COUNT_ENABLED(VIKI2, miniVIKI) \ + COUNT_ENABLED(ZONESTAR_12864LCD, ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306) \ - + ENABLED(ANET_FULL_GRAPHICS_LCD) \ + + COUNT_ENABLED(ANET_FULL_GRAPHICS_LCD, ANET_FULL_GRAPHICS_LCD_ALT_WIRING) \ + ENABLED(AZSMZ_12864) \ + ENABLED(BQ_LCD_SMART_CONTROLLER) \ + ENABLED(CARTESIO_UI) \ 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 51e48fc8e9..6f84a2a44d 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h @@ -215,9 +215,10 @@ #define EXPA2_10_PIN P0_17 #if HAS_WIRED_LCD + #if ENABLED(ANET_FULL_GRAPHICS_LCD_ALT_WIRING) + #error "ANET_FULL_GRAPHICS_LCD_ALT_WIRING only applies to the ANET 1.0 board." - #if ENABLED(ANET_FULL_GRAPHICS_LCD) - + #elif ENABLED(ANET_FULL_GRAPHICS_LCD) #error "CAUTION! ANET_FULL_GRAPHICS_LCD requires wiring modifications. See 'pins_BTT_SKR_V1_3.h' for details. Comment out this line to continue." /** 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 8df631b677..14bac7d723 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -233,7 +233,10 @@ * EXP2 EXP1 */ #if HAS_WIRED_LCD - #if ENABLED(ANET_FULL_GRAPHICS_LCD) + #if ENABLED(ANET_FULL_GRAPHICS_LCD_ALT_WIRING) + #error "ANET_FULL_GRAPHICS_LCD_ALT_WIRING only applies to the ANET 1.0 board." + + #elif ENABLED(ANET_FULL_GRAPHICS_LCD) #error "CAUTION! ANET_FULL_GRAPHICS_LCD requires wiring modifications. See 'pins_BTT_SKR_V1_4.h' for details. Comment out this line to continue." /** diff --git a/Marlin/src/pins/sanguino/pins_ANET_10.h b/Marlin/src/pins/sanguino/pins_ANET_10.h index d48db36287..81c0fe562d 100644 --- a/Marlin/src/pins/sanguino/pins_ANET_10.h +++ b/Marlin/src/pins/sanguino/pins_ANET_10.h @@ -145,13 +145,16 @@ * * Only the following displays are supported: * ZONESTAR_LCD - * ANET_FULL_GRAPHICS_LCD + * ANET_FULL_GRAPHICS_LCD(_ALT_WIRING)? * REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER */ #if HAS_WIRED_LCD + #define LCD_SDSS 28 + #if HAS_ADC_BUTTONS + #define SERVO0_PIN 27 // free for BLTouch/3D-Touch #define LCD_PINS_RS 28 #define LCD_PINS_ENABLE 29 @@ -160,26 +163,49 @@ #define LCD_PINS_D6 16 #define LCD_PINS_D7 17 #define ADC_KEYPAD_PIN 1 + #elif IS_RRD_FG_SC + // Pin definitions for the Anet A6 Full Graphics display and the RepRapDiscount Full Graphics // display using an adapter board // https://go.aisler.net/benlye/anet-lcd-adapter/pcb // See below for alternative pin definitions for use with https://www.thingiverse.com/thing:2103748 - #define SERVO0_PIN 29 // free for BLTouch/3D-Touch - #define BEEPER_PIN 17 - #define LCD_PINS_RS 27 - #define LCD_PINS_ENABLE 28 - #define LCD_PINS_D4 30 - #define BTN_EN1 11 - #define BTN_EN2 10 - #define BTN_ENC 16 - #define BOARD_ST7920_DELAY_1 DELAY_NS(0) - #define BOARD_ST7920_DELAY_2 DELAY_NS(63) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) - #define STD_ENCODER_PULSES_PER_STEP 4 - #define STD_ENCODER_STEPS_PER_MENU_ITEM 1 + + #if ENABLED(ANET_FULL_GRAPHICS_LCD_ALT_WIRING) + #define SERVO0_PIN 30 + #define BEEPER_PIN 27 + #define LCD_PINS_RS 29 + #define LCD_PINS_ENABLE 16 + #define LCD_PINS_D4 11 + #define BTN_EN1 28 + #define BTN_EN2 10 + #define BTN_ENC 17 + #define BOARD_ST7920_DELAY_1 DELAY_NS(250) + #define BOARD_ST7920_DELAY_2 DELAY_NS(250) + #define BOARD_ST7920_DELAY_3 DELAY_NS(250) + #else + #define SERVO0_PIN 29 // free for BLTouch/3D-Touch + #define BEEPER_PIN 17 + #define LCD_PINS_RS 27 + #define LCD_PINS_ENABLE 28 + #define LCD_PINS_D4 30 + #define BTN_EN1 11 + #define BTN_EN2 10 + #define BTN_ENC 16 + #define BOARD_ST7920_DELAY_1 DELAY_NS(0) + #define BOARD_ST7920_DELAY_2 DELAY_NS(63) + #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #endif + #endif + #else + #define SERVO0_PIN 27 + +#endif + +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN SERVO0_PIN #endif /**