Pārlūkot izejas kodu

✨ MKS MINI12864 V3 for MKS Robin Nano V2/3 (#22285)

mks-viva 3 gadus atpakaļ
vecāks
revīzija
938d86d1c5
Revīzijas autora e-pasta adrese nav piesaistīta nevienam kontam

+ 5
- 0
Marlin/Configuration.h Parādīt failu

@@ -2415,6 +2415,11 @@
2415 2415
 //#define MKS_MINI_12864
2416 2416
 
2417 2417
 //
2418
+// MKS MINI12864 V3 is an alias for FYSETC_MINI_12864_2_1. Type A/B. NeoPixel RGB Backlight.
2419
+// 
2420
+//#define MKS_MINI_12864_V3
2421
+
2422
+//
2418 2423
 // MKS LCD12864A/B with graphic controller and SD support. Follows MKS_MINI_12864 pinout.
2419 2424
 // https://www.aliexpress.com/item/33018110072.html
2420 2425
 //

+ 1
- 1
Marlin/src/HAL/STM32F1/inc/SanityCheck.h Parādīt failu

@@ -39,7 +39,7 @@
39 39
   #error "SERIAL_STATS_DROPPED_RX is not supported on the STM32F1 platform."
40 40
 #endif
41 41
 
42
-#if ENABLED(NEOPIXEL_LED)
42
+#if ENABLED(NEOPIXEL_LED) && DISABLED(MKS_MINI_12864_V3)
43 43
   #error "NEOPIXEL_LED (Adafruit NeoPixel) is not supported for HAL/STM32F1. Comment out this line to proceed at your own risk!"
44 44
 #endif
45 45
 

+ 5
- 0
Marlin/src/inc/Conditionals_LCD.h Parādīt failu

@@ -31,6 +31,11 @@
31 31
   #define MKS_MINI_12864
32 32
 #endif
33 33
 
34
+// MKS_MINI_12864_V3 is simply identical to FYSETC_MINI_12864_2_1
35
+#if ENABLED(MKS_MINI_12864_V3)
36
+  #define FYSETC_MINI_12864_2_1
37
+#endif
38
+
34 39
 /**
35 40
  * General Flags that may be set below by specific LCDs
36 41
  *

+ 4
- 0
Marlin/src/inc/Conditionals_post.h Parādīt failu

@@ -369,6 +369,10 @@
369 369
 #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
370 370
   #define _LCD_CONTRAST_MIN  120
371 371
   #define _LCD_CONTRAST_INIT 195
372
+#elif ENABLED(MKS_MINI_12864_V3)
373
+  #define _LCD_CONTRAST_MIN  255
374
+  #define _LCD_CONTRAST_INIT 255
375
+  #define _LCD_CONTRAST_MAX  255
372 376
 #elif ENABLED(FYSETC_MINI_12864)
373 377
   #define _LCD_CONTRAST_INIT 220
374 378
 #elif ENABLED(ULTI_CONTROLLER)

+ 11
- 0
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h Parādīt failu

@@ -155,6 +155,17 @@
155 155
     #define DOGLCD_SCK                      PB13
156 156
     #define DOGLCD_MOSI                     PB15
157 157
 
158
+  #elif ENABLED(MKS_MINI_12864_V3)
159
+    #define ENABLE_SPI3
160
+    #define DOGLCD_CS                       PA4
161
+    #define DOGLCD_A0                       PA5
162
+    #define LCD_PINS_DC                     DOGLCD_A0
163
+    #define LCD_BACKLIGHT_PIN               -1
164
+    #define LCD_RESET_PIN                   PA6
165
+    #define NEOPIXEL_PIN                    PA7
166
+    #define DOGLCD_MOSI                     PB15
167
+    #define DOGLCD_SCK                      PB13
168
+
158 169
   #else
159 170
 
160 171
     #define LCD_PINS_D4                     PA6

+ 33
- 6
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h Parādīt failu

@@ -231,10 +231,19 @@
231 231
   #define SDCARD_CONNECTION              ONBOARD
232 232
 #endif
233 233
 
234
-#define SDIO_SUPPORT
235
-#define SDIO_CLOCK                       4500000  // 4.5 MHz
236
-#define SD_DETECT_PIN                       PD12
237
-#define ONBOARD_SD_CS_PIN                   PC11
234
+#if SD_CONNECTION_IS(ONBOARD)
235
+  #define SDIO_SUPPORT
236
+  #define SDIO_CLOCK                     4500000  // 4.5 MHz
237
+  #define SD_DETECT_PIN                     PD12
238
+  #define ONBOARD_SD_CS_PIN                 PC11
239
+#elif SD_CONNECTION_IS(LCD)
240
+  #define ENABLE_SPI1
241
+  #define SDSS                              PE10
242
+  #define SD_SCK_PIN                        PA5
243
+  #define SD_MISO_PIN                       PA6
244
+  #define SD_MOSI_PIN                       PA7
245
+  #define SD_DETECT_PIN                     PE12
246
+#endif
238 247
 
239 248
 //
240 249
 // LCD / Controller
@@ -291,8 +300,13 @@
291 300
 #endif
292 301
 
293 302
 #if HAS_WIRED_LCD && !HAS_SPI_TFT
294
-
295
-  // NON TFT Displays
303
+  #define BEEPER_PIN                        PC5
304
+  #define BTN_ENC                           PE13
305
+  #define LCD_PINS_ENABLE                   PD13
306
+  #define LCD_PINS_RS                       PC6
307
+  #define BTN_EN1                           PE8
308
+  #define BTN_EN2                           PE11
309
+  #define LCD_BACKLIGHT_PIN                 -1
296 310
 
297 311
   #if ENABLED(MKS_MINI_12864)
298 312
 
@@ -318,6 +332,19 @@
318 332
     #ifndef BEEPER_PIN
319 333
       #define BEEPER_PIN                    -1
320 334
     #endif
335
+  
336
+  #elif ENABLED(MKS_MINI_12864_V3)
337
+    #define DOGLCD_CS                       PD13
338
+    #define DOGLCD_A0                       PC6
339
+    #define LCD_PINS_DC                DOGLCD_A0
340
+    #define LCD_BACKLIGHT_PIN               -1
341
+    #define LCD_RESET_PIN                   PE14
342
+    #define NEOPIXEL_PIN                    PE15
343
+    #define DOGLCD_MOSI                     PA7
344
+    #define DOGLCD_SCK                      PA5
345
+    #if SD_CONNECTION_IS(ONBOARD)
346
+      #define FORCE_SOFT_SPI
347
+    #endif
321 348
 
322 349
   #else                                           // !MKS_MINI_12864
323 350
 

+ 14
- 1
Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h Parādīt failu

@@ -243,7 +243,7 @@
243 243
 //
244 244
 // LCD / Controller
245 245
 #define SPI_FLASH
246
-#define HAS_SPI_FLASH 1
246
+#define HAS_SPI_FLASH                          1
247 247
 #define SPI_DEVICE                             2
248 248
 #define SPI_FLASH_SIZE                 0x1000000
249 249
 #if ENABLED(SPI_FLASH)
@@ -340,6 +340,19 @@
340 340
     // Required for MKS_MINI_12864 with this board
341 341
     //#define MKS_LCD12864B
342 342
     //#undef SHOW_BOOTSCREEN
343
+  
344
+  #elif ENABLED(MKS_MINI_12864_V3)
345
+    #define DOGLCD_CS                       PD13
346
+    #define DOGLCD_A0                       PC6
347
+    #define LCD_PINS_DC                DOGLCD_A0
348
+    #define LCD_BACKLIGHT_PIN               -1
349
+    #define LCD_RESET_PIN                   PE14
350
+    #define NEOPIXEL_PIN                    PE15
351
+    #define DOGLCD_MOSI                     PA7
352
+    #define DOGLCD_SCK                      PA5
353
+    #if SD_CONNECTION_IS(ONBOARD)
354
+      #define FORCE_SOFT_SPI
355
+    #endif
343 356
 
344 357
   #else // !MKS_MINI_12864
345 358
 

Notiek ielāde…
Atcelt
Saglabāt