WYH L12864 LCD (Alfawise Ex8) (#22863)

This commit is contained in:
VragVideo
2021-10-03 06:12:51 +03:00
committed by Scott Lahteine
parent 58a26fcaac
commit 0273a68587
56 changed files with 181 additions and 101 deletions

View File

@ -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

View File

@ -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 !!!

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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