Browse Source

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

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

+ 6
- 0
Marlin/Configuration.h View File

@@ -1996,6 +1996,12 @@
1996 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 2005
 // FYSETC variant of the MINI12864 graphic controller with SD support
2000 2006
 // https://wiki.fysetc.com/Mini12864_Panel/
2001 2007
 //

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

@@ -35,7 +35,15 @@
35 35
   #define IS_CARTESIAN 1
36 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 48
   #define DOGLCD
41 49
   #define IS_ULTIPANEL
@@ -118,10 +126,6 @@
118 126
   #define IS_RRD_SC
119 127
   #define IS_U8GLIB_SSD1306
120 128
 
121
-#elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
122
-
123
-  #define MINIPANEL
124
-
125 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 131
   #define FYSETC_MINI_12864

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

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

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

@@ -2117,6 +2117,7 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
2117 2117
   + (ENABLED(ULTRA_LCD) && DISABLED(IS_ULTRA_LCD)) \
2118 2118
   + (ENABLED(U8GLIB_SSD1306) && DISABLED(IS_U8GLIB_SSD1306)) \
2119 2119
   + (ENABLED(MINIPANEL) && DISABLED(MKS_MINI_12864, ENDER2_STOCKDISPLAY)) \
2120
+  + (ENABLED(MKS_MINI_12864) && DISABLED(MKS_LCD12864)) \
2120 2121
   + (ENABLED(EXTENSIBLE_UI) && DISABLED(IS_EXTUI)) \
2121 2122
   + (ENABLED(ULTIPANEL) && DISABLED(IS_ULTIPANEL)) \
2122 2123
   + ENABLED(RADDS_DISPLAY) \
@@ -2143,7 +2144,7 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
2143 2144
   + ENABLED(CARTESIO_UI) \
2144 2145
   + ENABLED(LCD_FOR_MELZI) \
2145 2146
   + ENABLED(ULTI_CONTROLLER) \
2146
-  + ENABLED(MKS_MINI_12864) \
2147
+  + ENABLED(MKS_LCD12864) \
2147 2148
   + ENABLED(ENDER2_STOCKDISPLAY) \
2148 2149
   + ENABLED(FYSETC_MINI_12864_X_X) \
2149 2150
   + ENABLED(FYSETC_MINI_12864_1_2) \

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

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

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

@@ -603,7 +603,7 @@
603 603
         #define KILL_PIN                      41
604 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 608
         #define DOGLCD_A0                     27
609 609
         #define DOGLCD_CS                     25

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

@@ -473,7 +473,7 @@
473 473
       //  #define KILL_PIN         41
474 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 478
         // TO TEST
479 479
         //#define DOGLCD_A0                   27

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

@@ -222,7 +222,7 @@
222 222
     #define LCD_BACKLIGHT_PIN               -1
223 223
 
224 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 226
   #endif
227 227
 
228 228
 #endif // HAS_SPI_LCD

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

@@ -123,8 +123,8 @@
123 123
 //
124 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 129
 #define FIL_RUNOUT_PIN                      PB10  // MT_DET
130 130
 
@@ -157,11 +157,9 @@
157 157
     #define DOGLCD_SCK                      PB13
158 158
     #define DOGLCD_MOSI                     PB15
159 159
 
160
-    // Required for MKS_MINI_12864 with this board
161
-    #define MKS_LCD12864B
162 160
     #undef SHOW_BOOTSCREEN
163 161
 
164
-  #else                                           // !MKS_MINI_12864
162
+  #else
165 163
 
166 164
     #define LCD_PINS_D4                     PA6
167 165
     #if ENABLED(ULTIPANEL)

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

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

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

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

Loading…
Cancel
Save