Browse Source

Add MKS LCD12864 A/B Controller Support (#18120)

thisiskeithb 5 years ago
parent
commit
2603a237f9
No account linked to committer's email address

+ 6
- 0
Marlin/Configuration.h View File

1996
 //#define MKS_MINI_12864
1996
 //#define MKS_MINI_12864
1997
 
1997
 
1998
 //
1998
 //
1999
+// MKS LCD12864A/B with graphic controller and SD support. Follows MKS_MINI_12864 pinout.
2000
+// https://www.aliexpress.com/item/33018110072.html
2001
+//
2002
+//#define MKS_LCD12864
2003
+
2004
+//
1999
 // FYSETC variant of the MINI12864 graphic controller with SD support
2005
 // FYSETC variant of the MINI12864 graphic controller with SD support
2000
 // https://wiki.fysetc.com/Mini12864_Panel/
2006
 // https://wiki.fysetc.com/Mini12864_Panel/
2001
 //
2007
 //

+ 9
- 5
Marlin/src/inc/Conditionals_LCD.h View File

35
   #define IS_CARTESIAN 1
35
   #define IS_CARTESIAN 1
36
 #endif
36
 #endif
37
 
37
 
38
-#if ENABLED(CARTESIO_UI)
38
+#if ENABLED(MKS_LCD12864)
39
+  #define MKS_MINI_12864
40
+#endif
41
+
42
+#if EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
43
+
44
+  #define MINIPANEL
45
+
46
+#elif ENABLED(CARTESIO_UI)
39
 
47
 
40
   #define DOGLCD
48
   #define DOGLCD
41
   #define IS_ULTIPANEL
49
   #define IS_ULTIPANEL
118
   #define IS_RRD_SC
126
   #define IS_RRD_SC
119
   #define IS_U8GLIB_SSD1306
127
   #define IS_U8GLIB_SSD1306
120
 
128
 
121
-#elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
122
-
123
-  #define MINIPANEL
124
-
125
 #elif ANY(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1, FYSETC_GENERIC_12864_1_1)
129
 #elif ANY(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1, FYSETC_GENERIC_12864_1_1)
126
 
130
 
127
   #define FYSETC_MINI_12864
131
   #define FYSETC_MINI_12864

+ 1
- 1
Marlin/src/inc/Conditionals_post.h View File

287
 #elif ENABLED(AZSMZ_12864)
287
 #elif ENABLED(AZSMZ_12864)
288
   #define _LCD_CONTRAST_MIN  120
288
   #define _LCD_CONTRAST_MIN  120
289
   #define _LCD_CONTRAST_INIT 190
289
   #define _LCD_CONTRAST_INIT 190
290
-#elif ENABLED(MKS_LCD12864B)
290
+#elif ENABLED(MKS_LCD12864)
291
   #define _LCD_CONTRAST_MIN  120
291
   #define _LCD_CONTRAST_MIN  120
292
   #define _LCD_CONTRAST_INIT 205
292
   #define _LCD_CONTRAST_INIT 205
293
 #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
293
 #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)

+ 2
- 1
Marlin/src/inc/SanityCheck.h View File

2117
   + (ENABLED(ULTRA_LCD) && DISABLED(IS_ULTRA_LCD)) \
2117
   + (ENABLED(ULTRA_LCD) && DISABLED(IS_ULTRA_LCD)) \
2118
   + (ENABLED(U8GLIB_SSD1306) && DISABLED(IS_U8GLIB_SSD1306)) \
2118
   + (ENABLED(U8GLIB_SSD1306) && DISABLED(IS_U8GLIB_SSD1306)) \
2119
   + (ENABLED(MINIPANEL) && DISABLED(MKS_MINI_12864, ENDER2_STOCKDISPLAY)) \
2119
   + (ENABLED(MINIPANEL) && DISABLED(MKS_MINI_12864, ENDER2_STOCKDISPLAY)) \
2120
+  + (ENABLED(MKS_MINI_12864) && DISABLED(MKS_LCD12864)) \
2120
   + (ENABLED(EXTENSIBLE_UI) && DISABLED(IS_EXTUI)) \
2121
   + (ENABLED(EXTENSIBLE_UI) && DISABLED(IS_EXTUI)) \
2121
   + (ENABLED(ULTIPANEL) && DISABLED(IS_ULTIPANEL)) \
2122
   + (ENABLED(ULTIPANEL) && DISABLED(IS_ULTIPANEL)) \
2122
   + ENABLED(RADDS_DISPLAY) \
2123
   + ENABLED(RADDS_DISPLAY) \
2143
   + ENABLED(CARTESIO_UI) \
2144
   + ENABLED(CARTESIO_UI) \
2144
   + ENABLED(LCD_FOR_MELZI) \
2145
   + ENABLED(LCD_FOR_MELZI) \
2145
   + ENABLED(ULTI_CONTROLLER) \
2146
   + ENABLED(ULTI_CONTROLLER) \
2146
-  + ENABLED(MKS_MINI_12864) \
2147
+  + ENABLED(MKS_LCD12864) \
2147
   + ENABLED(ENDER2_STOCKDISPLAY) \
2148
   + ENABLED(ENDER2_STOCKDISPLAY) \
2148
   + ENABLED(FYSETC_MINI_12864_X_X) \
2149
   + ENABLED(FYSETC_MINI_12864_X_X) \
2149
   + ENABLED(FYSETC_MINI_12864_1_2) \
2150
   + ENABLED(FYSETC_MINI_12864_1_2) \

+ 2
- 2
Marlin/src/lcd/dogm/ultralcd_DOGM.cpp View File

240
 
240
 
241
 // Initialize or re-initialize the LCD
241
 // Initialize or re-initialize the LCD
242
 void MarlinUI::init_lcd() {
242
 void MarlinUI::init_lcd() {
243
-  #if DISABLED(MKS_LCD12864B)
243
+  #if DISABLED(MKS_LCD12864)
244
 
244
 
245
     #if PIN_EXISTS(LCD_BACKLIGHT)
245
     #if PIN_EXISTS(LCD_BACKLIGHT)
246
       OUT_WRITE(LCD_BACKLIGHT_PIN, DISABLED(DELAYED_BACKLIGHT_INIT)); // Illuminate after reset or right away
246
       OUT_WRITE(LCD_BACKLIGHT_PIN, DISABLED(DELAYED_BACKLIGHT_INIT)); // Illuminate after reset or right away
272
     TERN_(LCD_SCREEN_ROT_180, u8g.setRot180());
272
     TERN_(LCD_SCREEN_ROT_180, u8g.setRot180());
273
     TERN_(LCD_SCREEN_ROT_270, u8g.setRot270());
273
     TERN_(LCD_SCREEN_ROT_270, u8g.setRot270());
274
 
274
 
275
-  #endif // !MKS_LCD12864B
275
+  #endif // !MKS_LCD12864
276
 
276
 
277
   uxg_SetUtf8Fonts(g_fontinfo, COUNT(g_fontinfo));
277
   uxg_SetUtf8Fonts(g_fontinfo, COUNT(g_fontinfo));
278
 }
278
 }

+ 1
- 1
Marlin/src/pins/ramps/pins_RAMPS.h View File

603
         #define KILL_PIN                      41
603
         #define KILL_PIN                      41
604
       #endif
604
       #endif
605
 
605
 
606
-      #if ENABLED(MKS_MINI_12864)                 // Added in Marlin 1.1.6
606
+      #if ENABLED(MKS_MINI_12864)
607
 
607
 
608
         #define DOGLCD_A0                     27
608
         #define DOGLCD_A0                     27
609
         #define DOGLCD_CS                     25
609
         #define DOGLCD_CS                     25

+ 1
- 1
Marlin/src/pins/samd/pins_RAMPS_144.h View File

473
       //  #define KILL_PIN         41
473
       //  #define KILL_PIN         41
474
       //#endif
474
       //#endif
475
 
475
 
476
-      #if ENABLED(MKS_MINI_12864)                 // Added in Marlin 1.1.6
476
+      #if ENABLED(MKS_MINI_12864)
477
 
477
 
478
         // TO TEST
478
         // TO TEST
479
         //#define DOGLCD_A0                   27
479
         //#define DOGLCD_A0                   27

+ 1
- 1
Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h View File

222
     #define LCD_BACKLIGHT_PIN               -1
222
     #define LCD_BACKLIGHT_PIN               -1
223
 
223
 
224
   #else
224
   #else
225
-    #error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, and MKS_MINI_12864 are currently supported on the BIGTREE_SKR_E3_DIP."
225
+    #error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, and MKS_LCD12864 are currently supported on the BIGTREE_SKR_E3_DIP."
226
   #endif
226
   #endif
227
 
227
 
228
 #endif // HAS_SPI_LCD
228
 #endif // HAS_SPI_LCD

+ 3
- 5
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3.h View File

123
 //
123
 //
124
 // Temperature Sensors
124
 // Temperature Sensors
125
 //
125
 //
126
-#define TEMP_BED_PIN                        PA1   //TB
127
-#define TEMP_0_PIN                          PA0   //TH1
126
+#define TEMP_BED_PIN                        PA1   // TB
127
+#define TEMP_0_PIN                          PA0   // TH1
128
 
128
 
129
 #define FIL_RUNOUT_PIN                      PB10  // MT_DET
129
 #define FIL_RUNOUT_PIN                      PB10  // MT_DET
130
 
130
 
157
     #define DOGLCD_SCK                      PB13
157
     #define DOGLCD_SCK                      PB13
158
     #define DOGLCD_MOSI                     PB15
158
     #define DOGLCD_MOSI                     PB15
159
 
159
 
160
-    // Required for MKS_MINI_12864 with this board
161
-    #define MKS_LCD12864B
162
     #undef SHOW_BOOTSCREEN
160
     #undef SHOW_BOOTSCREEN
163
 
161
 
164
-  #else                                           // !MKS_MINI_12864
162
+  #else
165
 
163
 
166
     #define LCD_PINS_D4                     PA6
164
     #define LCD_PINS_D4                     PA6
167
     #if ENABLED(ULTIPANEL)
165
     #if ENABLED(ULTIPANEL)

+ 1
- 3
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D.h View File

184
     #define DOGLCD_SCK                      PB13
184
     #define DOGLCD_SCK                      PB13
185
     #define DOGLCD_MOSI                     PB15
185
     #define DOGLCD_MOSI                     PB15
186
 
186
 
187
-    // Required for MKS_MINI_12864 with this board
188
-    #define MKS_LCD12864B
189
     #undef SHOW_BOOTSCREEN
187
     #undef SHOW_BOOTSCREEN
190
 
188
 
191
-  #else                                           // !MKS_MINI_12864
189
+  #else
192
 
190
 
193
     #define LCD_PINS_D4                     PA6
191
     #define LCD_PINS_D4                     PA6
194
     #if ENABLED(ULTIPANEL)
192
     #if ENABLED(ULTIPANEL)

+ 0
- 2
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h View File

115
     #define DOGLCD_SCK                      PB13
115
     #define DOGLCD_SCK                      PB13
116
     #define DOGLCD_MOSI                     PB15
116
     #define DOGLCD_MOSI                     PB15
117
 
117
 
118
-    // Required for MKS_MINI_12864 with this board
119
-    #define MKS_LCD12864B
120
     #undef SHOW_BOOTSCREEN
118
     #undef SHOW_BOOTSCREEN
121
 
119
 
122
   #else                                           // !MKS_MINI_12864
120
   #else                                           // !MKS_MINI_12864

Loading…
Cancel
Save