1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-30 15:26:18 +00:00

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

This commit is contained in:
mks-viva 2021-07-09 17:59:36 -05:00 committed by GitHub
parent 26bfc26797
commit 938d86d1c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 73 additions and 8 deletions

View File

@ -2414,6 +2414,11 @@
// //
//#define MKS_MINI_12864 //#define MKS_MINI_12864
//
// MKS MINI12864 V3 is an alias for FYSETC_MINI_12864_2_1. Type A/B. NeoPixel RGB Backlight.
//
//#define MKS_MINI_12864_V3
// //
// MKS LCD12864A/B with graphic controller and SD support. Follows MKS_MINI_12864 pinout. // MKS LCD12864A/B with graphic controller and SD support. Follows MKS_MINI_12864 pinout.
// https://www.aliexpress.com/item/33018110072.html // https://www.aliexpress.com/item/33018110072.html

View File

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

View File

@ -31,6 +31,11 @@
#define MKS_MINI_12864 #define MKS_MINI_12864
#endif #endif
// MKS_MINI_12864_V3 is simply identical to FYSETC_MINI_12864_2_1
#if ENABLED(MKS_MINI_12864_V3)
#define FYSETC_MINI_12864_2_1
#endif
/** /**
* General Flags that may be set below by specific LCDs * General Flags that may be set below by specific LCDs
* *

View File

@ -369,6 +369,10 @@
#elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY) #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
#define _LCD_CONTRAST_MIN 120 #define _LCD_CONTRAST_MIN 120
#define _LCD_CONTRAST_INIT 195 #define _LCD_CONTRAST_INIT 195
#elif ENABLED(MKS_MINI_12864_V3)
#define _LCD_CONTRAST_MIN 255
#define _LCD_CONTRAST_INIT 255
#define _LCD_CONTRAST_MAX 255
#elif ENABLED(FYSETC_MINI_12864) #elif ENABLED(FYSETC_MINI_12864)
#define _LCD_CONTRAST_INIT 220 #define _LCD_CONTRAST_INIT 220
#elif ENABLED(ULTI_CONTROLLER) #elif ENABLED(ULTI_CONTROLLER)

View File

@ -155,6 +155,17 @@
#define DOGLCD_SCK PB13 #define DOGLCD_SCK PB13
#define DOGLCD_MOSI PB15 #define DOGLCD_MOSI PB15
#elif ENABLED(MKS_MINI_12864_V3)
#define ENABLE_SPI3
#define DOGLCD_CS PA4
#define DOGLCD_A0 PA5
#define LCD_PINS_DC DOGLCD_A0
#define LCD_BACKLIGHT_PIN -1
#define LCD_RESET_PIN PA6
#define NEOPIXEL_PIN PA7
#define DOGLCD_MOSI PB15
#define DOGLCD_SCK PB13
#else #else
#define LCD_PINS_D4 PA6 #define LCD_PINS_D4 PA6

View File

@ -231,10 +231,19 @@
#define SDCARD_CONNECTION ONBOARD #define SDCARD_CONNECTION ONBOARD
#endif #endif
#define SDIO_SUPPORT #if SD_CONNECTION_IS(ONBOARD)
#define SDIO_CLOCK 4500000 // 4.5 MHz #define SDIO_SUPPORT
#define SD_DETECT_PIN PD12 #define SDIO_CLOCK 4500000 // 4.5 MHz
#define ONBOARD_SD_CS_PIN PC11 #define SD_DETECT_PIN PD12
#define ONBOARD_SD_CS_PIN PC11
#elif SD_CONNECTION_IS(LCD)
#define ENABLE_SPI1
#define SDSS PE10
#define SD_SCK_PIN PA5
#define SD_MISO_PIN PA6
#define SD_MOSI_PIN PA7
#define SD_DETECT_PIN PE12
#endif
// //
// LCD / Controller // LCD / Controller
@ -291,8 +300,13 @@
#endif #endif
#if HAS_WIRED_LCD && !HAS_SPI_TFT #if HAS_WIRED_LCD && !HAS_SPI_TFT
#define BEEPER_PIN PC5
// NON TFT Displays #define BTN_ENC PE13
#define LCD_PINS_ENABLE PD13
#define LCD_PINS_RS PC6
#define BTN_EN1 PE8
#define BTN_EN2 PE11
#define LCD_BACKLIGHT_PIN -1
#if ENABLED(MKS_MINI_12864) #if ENABLED(MKS_MINI_12864)
@ -318,6 +332,19 @@
#ifndef BEEPER_PIN #ifndef BEEPER_PIN
#define BEEPER_PIN -1 #define BEEPER_PIN -1
#endif #endif
#elif ENABLED(MKS_MINI_12864_V3)
#define DOGLCD_CS PD13
#define DOGLCD_A0 PC6
#define LCD_PINS_DC DOGLCD_A0
#define LCD_BACKLIGHT_PIN -1
#define LCD_RESET_PIN PE14
#define NEOPIXEL_PIN PE15
#define DOGLCD_MOSI PA7
#define DOGLCD_SCK PA5
#if SD_CONNECTION_IS(ONBOARD)
#define FORCE_SOFT_SPI
#endif
#else // !MKS_MINI_12864 #else // !MKS_MINI_12864

View File

@ -243,7 +243,7 @@
// //
// LCD / Controller // LCD / Controller
#define SPI_FLASH #define SPI_FLASH
#define HAS_SPI_FLASH 1 #define HAS_SPI_FLASH 1
#define SPI_DEVICE 2 #define SPI_DEVICE 2
#define SPI_FLASH_SIZE 0x1000000 #define SPI_FLASH_SIZE 0x1000000
#if ENABLED(SPI_FLASH) #if ENABLED(SPI_FLASH)
@ -340,6 +340,19 @@
// Required for MKS_MINI_12864 with this board // Required for MKS_MINI_12864 with this board
//#define MKS_LCD12864B //#define MKS_LCD12864B
//#undef SHOW_BOOTSCREEN //#undef SHOW_BOOTSCREEN
#elif ENABLED(MKS_MINI_12864_V3)
#define DOGLCD_CS PD13
#define DOGLCD_A0 PC6
#define LCD_PINS_DC DOGLCD_A0
#define LCD_BACKLIGHT_PIN -1
#define LCD_RESET_PIN PE14
#define NEOPIXEL_PIN PE15
#define DOGLCD_MOSI PA7
#define DOGLCD_SCK PA5
#if SD_CONNECTION_IS(ONBOARD)
#define FORCE_SOFT_SPI
#endif
#else // !MKS_MINI_12864 #else // !MKS_MINI_12864