✨ WYH L12864 LCD (Alfawise Ex8) (#22863)
This commit is contained in:
parent
58a26fcaac
commit
0273a68587
@ -2375,6 +2375,11 @@
|
||||
//#define VIKI2
|
||||
//#define miniVIKI
|
||||
|
||||
//
|
||||
// Alfawise Ex8 printer LCD marked as WYH L12864 COG
|
||||
//
|
||||
//#define WYH_L12864
|
||||
|
||||
//
|
||||
// MakerLab Mini Panel with graphic
|
||||
// controller and SD support - https://reprap.org/wiki/Mini_panel
|
||||
|
@ -1603,7 +1603,7 @@
|
||||
* Set STATUS_EXPIRE_SECONDS to zero to never clear the status.
|
||||
* This will prevent position updates from being displayed.
|
||||
*/
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
// Enable this option and reduce the value to optimize screen updates.
|
||||
// The normal delay is 10µs. Use the lowest value that still gives a reliable display.
|
||||
//#define DOGM_SPI_DELAY_US 5
|
||||
|
@ -57,7 +57,7 @@
|
||||
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
|
||||
#include "../../../inc/MarlinConfig.h"
|
||||
#include "../../shared/Delay.h"
|
||||
@ -182,5 +182,5 @@ uint8_t u8g_com_HAL_DUE_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_va
|
||||
}
|
||||
#endif // LIGHTWEIGHT_UI
|
||||
|
||||
#endif // U8GLIB_ST7920
|
||||
#endif // IS_U8GLIB_ST7920
|
||||
#endif // ARDUINO_ARCH_SAM
|
||||
|
@ -57,7 +57,7 @@
|
||||
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if HAS_MARLINUI_U8GLIB && DISABLED(U8GLIB_ST7920)
|
||||
#if HAS_MARLINUI_U8GLIB && !IS_U8GLIB_ST7920
|
||||
|
||||
#include "u8g_com_HAL_DUE_sw_spi_shared.h"
|
||||
|
||||
@ -141,5 +141,5 @@ uint8_t u8g_com_HAL_DUE_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif // HAS_MARLINUI_U8GLIB && !U8GLIB_ST7920
|
||||
#endif // HAS_MARLINUI_U8GLIB && !IS_U8GLIB_ST7920
|
||||
#endif // ARDUINO_ARCH_SAM
|
||||
|
@ -57,7 +57,7 @@
|
||||
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
|
||||
#include <U8glib-HAL.h>
|
||||
#include <SoftwareSPI.h>
|
||||
@ -143,5 +143,5 @@ uint8_t u8g_com_HAL_LPC1768_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t ar
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif // U8GLIB_ST7920
|
||||
#endif // IS_U8GLIB_ST7920
|
||||
#endif // TARGET_LPC1768
|
||||
|
@ -57,7 +57,7 @@
|
||||
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if HAS_MARLINUI_U8GLIB && DISABLED(U8GLIB_ST7920)
|
||||
#if HAS_MARLINUI_U8GLIB && !IS_U8GLIB_ST7920
|
||||
|
||||
#include <SoftwareSPI.h>
|
||||
#include "../../shared/HAL_SPI.h"
|
||||
@ -205,5 +205,5 @@ uint8_t u8g_com_HAL_LPC1768_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val,
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif // HAS_MARLINUI_U8GLIB && !U8GLIB_ST7920
|
||||
#endif // HAS_MARLINUI_U8GLIB && !IS_U8GLIB_ST7920
|
||||
#endif // TARGET_LPC1768
|
||||
|
@ -57,7 +57,7 @@
|
||||
|
||||
#include "../../../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
|
||||
#include <U8glib-HAL.h>
|
||||
#include "../../shared/Delay.h"
|
||||
@ -167,5 +167,5 @@ uint8_t u8g_com_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // U8GLIB_ST7920
|
||||
#endif // IS_U8GLIB_ST7920
|
||||
#endif // TARGET_LPC1768
|
||||
|
@ -57,7 +57,7 @@
|
||||
|
||||
#include "../../../inc/MarlinConfig.h"
|
||||
|
||||
#if HAS_MARLINUI_U8GLIB && DISABLED(U8GLIB_ST7920)
|
||||
#if HAS_MARLINUI_U8GLIB && !IS_U8GLIB_ST7920
|
||||
|
||||
#undef SPI_SPEED
|
||||
#define SPI_SPEED 2 // About 2 MHz
|
||||
@ -211,5 +211,5 @@ uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_pt
|
||||
#elif !ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI, HAS_MARLINUI_HD44780) && HAS_MARLINUI_U8GLIB
|
||||
#include <U8glib-HAL.h>
|
||||
uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {return 0;}
|
||||
#endif // HAS_MARLINUI_U8GLIB && !U8GLIB_ST7920
|
||||
#endif // HAS_MARLINUI_U8GLIB && !IS_U8GLIB_ST7920
|
||||
#endif // __PLAT_NATIVE_SIM__
|
||||
|
@ -39,17 +39,17 @@
|
||||
/**
|
||||
* General Flags that may be set below by specific LCDs
|
||||
*
|
||||
* DOGLCD : Run a Graphical LCD through U8GLib (with MarlinUI)
|
||||
* IS_ULTIPANEL : Define LCD_PINS_D5/6/7 for direct-connected "Ultipanel" LCDs
|
||||
* IS_ULTRA_LCD : Ultra LCD, not necessarily Ultipanel.
|
||||
* IS_RRD_SC : Common RRD Smart Controller digital interface pins
|
||||
* IS_RRD_FG_SC : Common RRD Full Graphical Smart Controller digital interface pins
|
||||
* U8GLIB_ST7920 : Most common DOGM display SPI interface, supporting a "lightweight" display mode.
|
||||
* U8GLIB_SH1106 : SH1106 OLED with I2C interface via U8GLib
|
||||
* IS_U8GLIB_SSD1306 : SSD1306 OLED with I2C interface via U8GLib
|
||||
* U8GLIB_SSD1309 : SSD1309 OLED with I2C interface via U8GLib
|
||||
* U8GLIB_ST7565_64128N : ST7565 128x64 LCD with SPI interface via U8GLib
|
||||
* U8GLIB_LM6059_AF : LM6059 with Hardware SPI via U8GLib
|
||||
* DOGLCD : Run a Graphical LCD through U8GLib (with MarlinUI)
|
||||
* IS_ULTIPANEL : Define LCD_PINS_D5/6/7 for direct-connected "Ultipanel" LCDs
|
||||
* IS_ULTRA_LCD : Ultra LCD, not necessarily Ultipanel.
|
||||
* IS_RRD_SC : Common RRD Smart Controller digital interface pins
|
||||
* IS_RRD_FG_SC : Common RRD Full Graphical Smart Controller digital interface pins
|
||||
* IS_U8GLIB_ST7920 : Most common DOGM display SPI interface, supporting a "lightweight" display mode.
|
||||
* U8GLIB_SH1106 : SH1106 OLED with I2C interface via U8GLib
|
||||
* IS_U8GLIB_SSD1306 : SSD1306 OLED with I2C interface via U8GLib (U8GLIB_SSD1306)
|
||||
* U8GLIB_SSD1309 : SSD1309 OLED with I2C interface via U8GLib (HAS_U8GLIB_I2C_OLED, IS_ULTRA_LCD, DOGLCD)
|
||||
* IS_U8GLIB_ST7565_64128N : ST7565 128x64 LCD with SPI interface via U8GLib
|
||||
* IS_U8GLIB_LM6059_AF : LM6059 with Hardware SPI via U8GLib
|
||||
*/
|
||||
#if EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
|
||||
|
||||
@ -85,7 +85,7 @@
|
||||
#elif ENABLED(ZONESTAR_12864LCD)
|
||||
#define DOGLCD
|
||||
#define IS_RRD_SC 1
|
||||
#define U8GLIB_ST7920
|
||||
#define IS_U8GLIB_ST7920 1
|
||||
|
||||
#elif ENABLED(ZONESTAR_12864OLED)
|
||||
#define IS_RRD_SC 1
|
||||
@ -99,19 +99,24 @@
|
||||
#define IS_ULTIPANEL 1
|
||||
#define ENCODER_PULSES_PER_STEP 2
|
||||
|
||||
#elif ANY(miniVIKI, VIKI2, ELB_FULL_GRAPHIC_CONTROLLER, AZSMZ_12864)
|
||||
#elif ANY(miniVIKI, VIKI2, WYH_L12864, ELB_FULL_GRAPHIC_CONTROLLER, AZSMZ_12864)
|
||||
|
||||
#define IS_DOGM_12864 1
|
||||
|
||||
#define DOGLCD
|
||||
#define IS_ULTIPANEL 1
|
||||
|
||||
#if ENABLED(miniVIKI)
|
||||
#define U8GLIB_ST7565_64128N
|
||||
#define IS_U8GLIB_ST7565_64128N 1
|
||||
#elif ENABLED(VIKI2)
|
||||
#define U8GLIB_ST7565_64128N
|
||||
#define IS_U8GLIB_ST7565_64128N 1
|
||||
#elif ENABLED(WYH_L12864)
|
||||
#define IS_U8GLIB_ST7565_64128N 1
|
||||
#define ST7565_XOFFSET 0x04
|
||||
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
|
||||
#define U8GLIB_LM6059_AF
|
||||
#define IS_U8GLIB_LM6059_AF 1
|
||||
#elif ENABLED(AZSMZ_12864)
|
||||
#define U8GLIB_ST7565_64128N
|
||||
#define IS_U8GLIB_ST7565_64128N 1
|
||||
#endif
|
||||
|
||||
#elif ENABLED(OLED_PANEL_TINYBOY2)
|
||||
@ -128,7 +133,7 @@
|
||||
#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
|
||||
|
||||
#define DOGLCD
|
||||
#define U8GLIB_ST7920
|
||||
#define IS_U8GLIB_ST7920 1
|
||||
#define IS_ULTIPANEL 1
|
||||
|
||||
#elif ENABLED(MKS_12864OLED)
|
||||
@ -144,7 +149,7 @@
|
||||
#elif ENABLED(SAV_3DGLCD)
|
||||
|
||||
#ifdef U8GLIB_SSD1306
|
||||
#define IS_U8GLIB_SSD1306
|
||||
#define IS_U8GLIB_SSD1306 // Allow for U8GLIB_SSD1306 + SAV_3DGLCD
|
||||
#endif
|
||||
#define IS_NEWPANEL 1
|
||||
|
||||
@ -266,7 +271,7 @@
|
||||
// ST7920-based graphical displays
|
||||
#if ANY(IS_RRD_FG_SC, LCD_FOR_MELZI, SILVER_GATE_GLCD_CONTROLLER)
|
||||
#define DOGLCD
|
||||
#define U8GLIB_ST7920
|
||||
#define IS_U8GLIB_ST7920 1
|
||||
#define IS_RRD_SC 1
|
||||
#endif
|
||||
|
||||
@ -275,7 +280,7 @@
|
||||
#define IS_ULTIPANEL 1
|
||||
#define DOGLCD
|
||||
#if ENABLED(MAKRPANEL)
|
||||
#define U8GLIB_ST7565_64128N
|
||||
#define IS_U8GLIB_ST7565_64128N 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -372,25 +377,28 @@
|
||||
* I2C Panels
|
||||
*/
|
||||
|
||||
#if EITHER(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004)
|
||||
#if ANY(IS_RRD_SC, IS_DOGM_12864, OLED_PANEL_TINYBOY2, LCD_I2C_PANELOLU2)
|
||||
|
||||
#define LCD_I2C_TYPE_PCF8575
|
||||
#define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
|
||||
#define STD_ENCODER_PULSES_PER_STEP 4
|
||||
#define STD_ENCODER_STEPS_PER_MENU_ITEM 1
|
||||
|
||||
#if ENABLED(LCD_I2C_PANELOLU2) // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
|
||||
#define LCD_I2C_TYPE_MCP23017 // I2C Character-based 12864 display
|
||||
#define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
|
||||
#define LCD_USE_I2C_BUZZER // Enable buzzer on LCD (optional)
|
||||
#define IS_ULTIPANEL 1
|
||||
#endif
|
||||
|
||||
#elif EITHER(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004)
|
||||
|
||||
#define LCD_I2C_TYPE_PCF8575 // I2C Character-based 12864 display
|
||||
#define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
|
||||
|
||||
#if ENABLED(LCD_SAINSMART_I2C_2004)
|
||||
#define LCD_WIDTH 20
|
||||
#define LCD_HEIGHT 4
|
||||
#endif
|
||||
|
||||
#elif ENABLED(LCD_I2C_PANELOLU2)
|
||||
|
||||
// PANELOLU2 LCD with status LEDs, separate encoder and click inputs
|
||||
|
||||
#define LCD_I2C_TYPE_MCP23017
|
||||
#define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
|
||||
#define LCD_USE_I2C_BUZZER // Enable buzzer on LCD (optional)
|
||||
#define IS_ULTIPANEL 1
|
||||
|
||||
#elif ENABLED(LCD_I2C_VIKI)
|
||||
|
||||
/**
|
||||
@ -416,11 +424,6 @@
|
||||
#define STD_ENCODER_PULSES_PER_STEP 2
|
||||
#define STD_ENCODER_STEPS_PER_MENU_ITEM 1
|
||||
|
||||
#elif ANY(IS_RRD_SC, miniVIKI, VIKI2, ELB_FULL_GRAPHIC_CONTROLLER, AZSMZ_12864, OLED_PANEL_TINYBOY2, BQ_LCD_SMART_CONTROLLER, LCD_I2C_PANELOLU2)
|
||||
|
||||
#define STD_ENCODER_PULSES_PER_STEP 4
|
||||
#define STD_ENCODER_STEPS_PER_MENU_ITEM 1
|
||||
|
||||
#endif
|
||||
|
||||
#if EITHER(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008) && DISABLED(NO_LCD_DETECT)
|
||||
|
@ -358,6 +358,8 @@
|
||||
#define _LCD_CONTRAST_MAX 115
|
||||
#elif ENABLED(VIKI2)
|
||||
#define _LCD_CONTRAST_INIT 140
|
||||
#elif ENABLED(WYH_L12864)
|
||||
#define _LCD_CONTRAST_INIT 190
|
||||
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
|
||||
#define _LCD_CONTRAST_MIN 90
|
||||
#define _LCD_CONTRAST_INIT 110
|
||||
|
@ -855,7 +855,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
/**
|
||||
* LCD Lightweight Screen Style
|
||||
*/
|
||||
#if ENABLED(LIGHTWEIGHT_UI) && DISABLED(U8GLIB_ST7920)
|
||||
#if ENABLED(LIGHTWEIGHT_UI) && !IS_U8GLIB_ST7920
|
||||
#error "LIGHTWEIGHT_UI requires a U8GLIB_ST7920-based display."
|
||||
#endif
|
||||
|
||||
@ -2643,6 +2643,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
+ COUNT_ENABLED(MKS_TS35_V2_0, MKS_ROBIN_TFT24, MKS_ROBIN_TFT28, MKS_ROBIN_TFT32, MKS_ROBIN_TFT35, MKS_ROBIN_TFT43, MKS_ROBIN_TFT_V1_1R, ANET_ET4_TFT28, ANET_ET5_TFT35, BIQU_BX_TFT70, BTT_TFT35_SPI_V1_0) \
|
||||
+ COUNT_ENABLED(TFTGLCD_PANEL_SPI, TFTGLCD_PANEL_I2C) \
|
||||
+ COUNT_ENABLED(VIKI2, miniVIKI) \
|
||||
+ ENABLED(WYH_L12864) \
|
||||
+ COUNT_ENABLED(ZONESTAR_12864LCD, ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306) \
|
||||
+ COUNT_ENABLED(ANET_FULL_GRAPHICS_LCD, ANET_FULL_GRAPHICS_LCD_ALT_WIRING) \
|
||||
+ ENABLED(AZSMZ_12864) \
|
||||
|
@ -43,7 +43,7 @@
|
||||
#define U8G_PARAM LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS
|
||||
#endif
|
||||
|
||||
#elif ENABLED(U8GLIB_ST7920)
|
||||
#elif IS_U8GLIB_ST7920
|
||||
|
||||
// RepRap Discount Full Graphics Smart Controller
|
||||
// and other variant LCDs using ST7920
|
||||
@ -72,7 +72,7 @@
|
||||
#define U8G_CLASS U8GLIB_DOGM128_2X // 4 stripes (HW-SPI)
|
||||
#endif
|
||||
|
||||
#elif ENABLED(U8GLIB_LM6059_AF)
|
||||
#elif IS_U8GLIB_LM6059_AF
|
||||
|
||||
// Based on the Adafruit ST7565 (https://www.adafruit.com/products/250)
|
||||
|
||||
@ -82,7 +82,7 @@
|
||||
#define U8G_CLASS U8GLIB_LM6059_2X // 4 stripes (HW-SPI)
|
||||
#endif
|
||||
|
||||
#elif ENABLED(U8GLIB_ST7565_64128N)
|
||||
#elif IS_U8GLIB_ST7565_64128N
|
||||
|
||||
// MaKrPanel, Mini Viki, Viki 2.0, AZSMZ 12864 ST7565 controller
|
||||
|
||||
|
@ -63,6 +63,9 @@
|
||||
#define WIDTH 128
|
||||
#define HEIGHT 64
|
||||
#define PAGE_HEIGHT 8
|
||||
#ifndef ST7565_XOFFSET
|
||||
#define ST7565_XOFFSET 0x00
|
||||
#endif
|
||||
|
||||
#define ST7565_ADC_REVERSE(N) ((N) ? 0xA1 : 0xA0)
|
||||
#define ST7565_BIAS_MODE(N) ((N) ? 0xA3 : 0xA2)
|
||||
@ -123,7 +126,7 @@ static const uint8_t u8g_dev_st7565_64128n_HAL_init_seq[] PROGMEM = {
|
||||
static const uint8_t u8g_dev_st7565_64128n_HAL_data_start[] PROGMEM = {
|
||||
U8G_ESC_ADR(0), // instruction mode
|
||||
U8G_ESC_CS(1), // enable chip
|
||||
ST7565_COLUMN_ADR(0x00), // high 4 bits to 0, low 4 bits to 0. Changed for DisplayTech 64128N
|
||||
ST7565_COLUMN_ADR(ST7565_XOFFSET), // high 4 bits to 0, low 4 bits to 0. Changed for DisplayTech 64128N
|
||||
U8G_ESC_END // end of sequence
|
||||
};
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
|
||||
#include "ultralcd_st7920_u8glib_rrd_AVR.h"
|
||||
|
||||
@ -192,5 +192,5 @@ u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = { u8g_dev_rrd_st7920_128x64_fn, &u8
|
||||
void ST7920_write_byte(const uint8_t val) { ST7920_WRITE_BYTE(val); }
|
||||
#endif
|
||||
|
||||
#endif // U8GLIB_ST7920
|
||||
#endif // IS_U8GLIB_ST7920
|
||||
#endif // !U8G_HAL_LINKS && (__AVR__ || ARDUINO_ARCH_STM32 || ARDUINO_ARCH_ESP32)
|
||||
|
@ -222,12 +222,13 @@
|
||||
#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_3.h' for details. Comment out this line to continue."
|
||||
|
||||
/**
|
||||
* 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
|
||||
* 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. (This is the critical part!)
|
||||
* 3. Rewire the CLK Signal (LCD Pin9) to LCD Pin7. (LCD Pin9 remains open because this pin is open drain.)
|
||||
* 3. Rewire the CLK Signal (LCD Pin9) to LCD Pin7. (LCD Pin9 remains open because it is open drain.)
|
||||
* 4. A wire is needed to connect the Reset switch at J3 (LCD Pin7) to EXP2 (Pin3) on the board.
|
||||
*
|
||||
* !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!!
|
||||
@ -254,6 +255,38 @@
|
||||
#define LCD_PINS_ENABLE EXP1_05_PIN
|
||||
#define LCD_PINS_D4 EXP1_07_PIN
|
||||
|
||||
#elif ENABLED(WYH_L12864)
|
||||
|
||||
#error "CAUTION! WYH_L12864 requires wiring modifications. Comment out this line to continue."
|
||||
|
||||
/**
|
||||
* 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
|
||||
* 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. (This is the critical part!)
|
||||
* 3. Swap the LCD's MOSI (Pin9) and empty (Pin10) wires because Pin9 is open drain.
|
||||
*
|
||||
* !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!!
|
||||
*
|
||||
* The WYH_L12864 connector plug:
|
||||
*
|
||||
* BEFORE AFTER
|
||||
* ______ ______
|
||||
* GND | 1 2 | 5V 5V | 1 2 | GND
|
||||
* CS | 3 4 | BTN_EN2 CS | 3 4 | BTN_EN2
|
||||
* SID | 5 6 BTN_EN1 SID | 5 6 BTN_EN1
|
||||
* SCK | 7 8 | BTN_ENC SCK | 7 8 | BTN_ENC
|
||||
* MOSI | 9 10 | open | 9 10 | MOSI
|
||||
* ------ ------
|
||||
* LCD LCD
|
||||
*/
|
||||
#define BTN_EN1 EXP1_06_PIN
|
||||
#define BTN_EN2 EXP1_04_PIN
|
||||
#define BTN_ENC EXP1_08_PIN
|
||||
#define DOGLCD_CS EXP1_03_PIN
|
||||
#define DOGLCD_A0 EXP1_05_PIN
|
||||
#define DOGLCD_SCK EXP1_07_PIN
|
||||
#define DOGLCD_MOSI EXP1_10_PIN
|
||||
#define LCD_BACKLIGHT_PIN -1
|
||||
|
||||
#elif ENABLED(CR10_STOCKDISPLAY)
|
||||
|
||||
#define LCD_PINS_RS EXP1_04_PIN
|
||||
|
@ -323,7 +323,7 @@
|
||||
/**
|
||||
* 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
|
||||
* 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. (This is the critical part!)
|
||||
* 3. Rewire the CLK Signal (LCD Pin9) to LCD Pin7. (LCD Pin9 remains open because this pin is open drain.)
|
||||
* 3. Rewire the CLK Signal (LCD Pin9) to LCD Pin7. (LCD Pin9 remains open because it is open drain.)
|
||||
* 4. A wire is needed to connect the Reset switch at J3 (LCD Pin7) to EXP2 (Pin3) on the board.
|
||||
*
|
||||
* !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!!
|
||||
|
@ -73,7 +73,7 @@
|
||||
#define TEMP_BED_PIN 6
|
||||
|
||||
#if HAS_WIRED_LCD
|
||||
#if ENABLED(U8GLIB_ST7920) // SPI GLCD 12864 ST7920
|
||||
#if IS_U8GLIB_ST7920 // SPI GLCD 12864 ST7920
|
||||
#define LCD_PINS_RS 30
|
||||
#define LCD_PINS_ENABLE 20
|
||||
#define LCD_PINS_D4 25
|
||||
|
@ -57,7 +57,7 @@
|
||||
#define FET_ORDER_EFF 1
|
||||
#endif
|
||||
|
||||
#if !(BOTH(IS_ULTRA_LCD, IS_NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD))
|
||||
#if !(BOTH(IS_ULTRA_LCD, IS_NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, WYH_L12864, MINIPANEL, REPRAPWORLD_KEYPAD))
|
||||
#define HAS_FREE_AUX2_PINS 1
|
||||
#endif
|
||||
|
||||
|
@ -1383,7 +1383,7 @@
|
||||
//
|
||||
// Default DOGLCD SPI delays
|
||||
//
|
||||
#if DISABLED(U8GLIB_ST7920)
|
||||
#if !IS_U8GLIB_ST7920
|
||||
#undef ST7920_DELAY_1
|
||||
#undef ST7920_DELAY_2
|
||||
#undef ST7920_DELAY_3
|
||||
|
@ -205,7 +205,7 @@
|
||||
#endif // IS_ULTIPANEL || TOUCH_UI_ULTIPANEL
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 0
|
||||
#define BOARD_ST7920_DELAY_2 250
|
||||
#define BOARD_ST7920_DELAY_3 0
|
||||
|
@ -201,7 +201,7 @@
|
||||
#endif // HAS_WIRED_LCD || TOUCH_UI_ULTIPANEL || TOUCH_UI_FTDI_EVE
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 0
|
||||
#define BOARD_ST7920_DELAY_2 250
|
||||
#define BOARD_ST7920_DELAY_3 0
|
||||
|
@ -193,7 +193,7 @@
|
||||
|
||||
#endif // HAS_WIRED_LCD || TOUCH_UI_ULTIPANEL
|
||||
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 0
|
||||
#define BOARD_ST7920_DELAY_2 250
|
||||
#define BOARD_ST7920_DELAY_3 0
|
||||
|
@ -270,7 +270,7 @@
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 0
|
||||
#define BOARD_ST7920_DELAY_2 0
|
||||
#define BOARD_ST7920_DELAY_3 0
|
||||
|
@ -166,7 +166,7 @@
|
||||
|
||||
#endif // IS_ULTRA_LCD && IS_NEWPANEL
|
||||
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 0
|
||||
#define BOARD_ST7920_DELAY_2 188
|
||||
#define BOARD_ST7920_DELAY_3 0
|
||||
|
@ -106,7 +106,7 @@
|
||||
#endif
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 0
|
||||
#define BOARD_ST7920_DELAY_2 0
|
||||
#define BOARD_ST7920_DELAY_3 189
|
||||
|
@ -40,7 +40,7 @@
|
||||
#endif
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 0
|
||||
#define BOARD_ST7920_DELAY_2 250
|
||||
#define BOARD_ST7920_DELAY_3 250
|
||||
|
@ -182,7 +182,7 @@
|
||||
#endif
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 200
|
||||
#define BOARD_ST7920_DELAY_2 200
|
||||
#define BOARD_ST7920_DELAY_3 200
|
||||
|
@ -32,7 +32,7 @@
|
||||
#define IS_MELZI 1
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 0
|
||||
#endif
|
||||
|
@ -36,7 +36,7 @@
|
||||
#define BOARD_INFO_NAME "Melzi (Creality)"
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 125
|
||||
#define BOARD_ST7920_DELAY_2 125
|
||||
#define BOARD_ST7920_DELAY_3 125
|
||||
|
@ -28,7 +28,7 @@
|
||||
#define BOARD_INFO_NAME "Melzi (Tronxy)"
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 0
|
||||
#define BOARD_ST7920_DELAY_2 125
|
||||
#define BOARD_ST7920_DELAY_3 0
|
||||
|
@ -28,7 +28,7 @@
|
||||
#define BOARD_INFO_NAME "Melzi V2"
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 0
|
||||
#define BOARD_ST7920_DELAY_2 400
|
||||
#define BOARD_ST7920_DELAY_3 0
|
||||
|
@ -165,7 +165,7 @@
|
||||
#define KILL_PIN 10
|
||||
#define BEEPER_PIN 27
|
||||
|
||||
#elif ENABLED(U8GLIB_ST7920) // SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0
|
||||
#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
|
||||
|
@ -202,7 +202,7 @@
|
||||
#endif // !FYSETC_MINI_12864
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 125
|
||||
#define BOARD_ST7920_DELAY_2 125
|
||||
#define BOARD_ST7920_DELAY_3 125
|
||||
|
@ -155,7 +155,7 @@
|
||||
#endif
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 125
|
||||
#define BOARD_ST7920_DELAY_2 125
|
||||
#define BOARD_ST7920_DELAY_3 125
|
||||
|
@ -179,7 +179,7 @@
|
||||
#endif
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 96
|
||||
#define BOARD_ST7920_DELAY_2 48
|
||||
#define BOARD_ST7920_DELAY_3 715
|
||||
|
@ -158,7 +158,7 @@
|
||||
#endif
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 96
|
||||
#define BOARD_ST7920_DELAY_2 48
|
||||
#define BOARD_ST7920_DELAY_3 715
|
||||
|
@ -166,7 +166,7 @@
|
||||
#endif
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 96
|
||||
#define BOARD_ST7920_DELAY_2 48
|
||||
#define BOARD_ST7920_DELAY_3 715
|
||||
|
@ -163,7 +163,7 @@
|
||||
#endif
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 96
|
||||
#define BOARD_ST7920_DELAY_2 48
|
||||
#define BOARD_ST7920_DELAY_3 715
|
||||
|
@ -168,7 +168,7 @@
|
||||
#endif
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 96
|
||||
#define BOARD_ST7920_DELAY_2 48
|
||||
#define BOARD_ST7920_DELAY_3 715
|
||||
|
@ -233,7 +233,7 @@
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 125
|
||||
#endif
|
||||
|
@ -113,7 +113,7 @@
|
||||
#endif // !MKS_MINI_12864
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 125
|
||||
#define BOARD_ST7920_DELAY_2 125
|
||||
#define BOARD_ST7920_DELAY_3 125
|
||||
|
@ -366,7 +366,7 @@
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 125
|
||||
#define BOARD_ST7920_DELAY_2 125
|
||||
#define BOARD_ST7920_DELAY_3 125
|
||||
|
@ -300,7 +300,7 @@
|
||||
#endif
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 125
|
||||
#define BOARD_ST7920_DELAY_2 125
|
||||
#define BOARD_ST7920_DELAY_3 125
|
||||
|
@ -332,7 +332,7 @@
|
||||
#endif
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 125
|
||||
#define BOARD_ST7920_DELAY_2 250
|
||||
#define BOARD_ST7920_DELAY_3 125
|
||||
|
@ -305,7 +305,7 @@
|
||||
#endif
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 200 // Tclk_fall <200ns
|
||||
#define BOARD_ST7920_DELAY_2 250 // Tdata_width >200ns
|
||||
#define BOARD_ST7920_DELAY_3 200 // Tclk_rise <200ns
|
||||
|
@ -287,7 +287,7 @@
|
||||
#endif
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 96
|
||||
#define BOARD_ST7920_DELAY_2 48
|
||||
#define BOARD_ST7920_DELAY_3 600
|
||||
|
@ -279,7 +279,7 @@
|
||||
#endif
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 96
|
||||
#define BOARD_ST7920_DELAY_2 48
|
||||
#define BOARD_ST7920_DELAY_3 600
|
||||
|
@ -483,8 +483,8 @@
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 125
|
||||
#define BOARD_ST7920_DELAY_2 90
|
||||
#define BOARD_ST7920_DELAY_1 96
|
||||
#define BOARD_ST7920_DELAY_2 48
|
||||
#define BOARD_ST7920_DELAY_3 600
|
||||
#endif
|
||||
|
||||
|
@ -493,7 +493,7 @@
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 120
|
||||
#define BOARD_ST7920_DELAY_2 80
|
||||
#define BOARD_ST7920_DELAY_3 580
|
||||
|
@ -454,6 +454,39 @@
|
||||
#define BTN_EN1 EXP2_08_PIN
|
||||
#define BTN_EN2 EXP2_06_PIN
|
||||
|
||||
#elif ENABLED(WYH_L12864)
|
||||
|
||||
#error "CAUTION! WYH_L12864 requires wiring modifications. Comment out this line to continue."
|
||||
|
||||
/**
|
||||
* 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
|
||||
* 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires.
|
||||
*
|
||||
* !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!!
|
||||
*
|
||||
* The WYH_L12864 connector plug:
|
||||
*
|
||||
* BEFORE AFTER
|
||||
* ______ ______
|
||||
* GND | 1 2 | 5V 5V | 1 2 | GND
|
||||
* CS | 3 4 | BTN_EN2 CS | 3 4 | BTN_EN2
|
||||
* SID | 5 6 BTN_EN1 SID | 5 6 BTN_EN1
|
||||
* SCK | 7 8 | BTN_ENC SCK | 7 8 | BTN_ENC
|
||||
* MOSI | 9 10 | MOSI | 9 10 |
|
||||
* ------ ------
|
||||
* LCD LCD
|
||||
*/
|
||||
#undef BEEPER_PIN
|
||||
#undef BTN_ENC
|
||||
#define BTN_EN1 EXP1_06_PIN
|
||||
#define BTN_EN2 EXP1_04_PIN
|
||||
#define BTN_ENC EXP1_08_PIN
|
||||
#define DOGLCD_CS EXP1_03_PIN
|
||||
#define DOGLCD_A0 EXP1_05_PIN
|
||||
#define DOGLCD_SCK EXP1_07_PIN
|
||||
#define DOGLCD_MOSI EXP1_09_PIN
|
||||
#define LCD_BACKLIGHT_PIN -1
|
||||
|
||||
#else
|
||||
|
||||
#define LCD_PINS_RS EXP1_07_PIN
|
||||
@ -500,7 +533,7 @@
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 125
|
||||
#endif
|
||||
|
@ -482,7 +482,7 @@
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#ifndef BOARD_ST7920_DELAY_1
|
||||
#define BOARD_ST7920_DELAY_1 120
|
||||
#endif
|
||||
|
@ -305,7 +305,7 @@
|
||||
#define FIL_RUNOUT_PIN PA3
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 96
|
||||
#define BOARD_ST7920_DELAY_2 48
|
||||
#define BOARD_ST7920_DELAY_3 715
|
||||
|
@ -245,7 +245,7 @@
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 96
|
||||
#define BOARD_ST7920_DELAY_2 48
|
||||
#define BOARD_ST7920_DELAY_3 600
|
||||
|
@ -314,7 +314,7 @@
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 96
|
||||
#define BOARD_ST7920_DELAY_2 48
|
||||
#define BOARD_ST7920_DELAY_3 640
|
||||
|
@ -172,7 +172,7 @@
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 96
|
||||
#define BOARD_ST7920_DELAY_2 48
|
||||
#define BOARD_ST7920_DELAY_3 640
|
||||
|
@ -183,7 +183,7 @@
|
||||
#endif
|
||||
|
||||
// Alter timing for graphical display
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
#if IS_U8GLIB_ST7920
|
||||
#define BOARD_ST7920_DELAY_1 96
|
||||
#define BOARD_ST7920_DELAY_2 48
|
||||
#define BOARD_ST7920_DELAY_3 715
|
||||
|
Loading…
Reference in New Issue
Block a user