Кремень Реклама
Кремень Реклама

Rumba32 + OLED экранчик.

alex18881
Идет загрузка
Загрузка
23.11.2020
2318
2
Вопросы и ответы

Всем здравстуйте. Решил проапгрейдить свой принтер с BIQU Rumba на MLS Rumba32, но наткнулся на некоторые сложности подключения экрана. Маленький экранчик МКС 12864OLED (https://aliexpress.ru/item/32808924045.html?spm=a2g0s.9042311.0.0.264d33edwDKAZ5&_ga=2.247439308.951416981.1606120789-301929085.1605773963) со старой румбой работает прекрасно на Marlin 2.0.7 (если не ошибаюсь). Новая румба отказывается показывать на нем чего-либо. Енкодер работает или нет не могу сказать, но при нажатии на ручку слышен бип, как оно и должно быть. SD карточка работает без нареканий. Команда M20 выводит в консоль содержимое карты. В описании пинов pins_RUMBA32_common.h Добавил описание пинов для этого типа экранов по аналогии с pins_RUMBA. Марлин из репозитория марлина, не MKS.

platformio.ini

[platformio] src_dir = Marlin boards_dir = buildroot/share/PlatformIO/boards default_envs = rumba32 include_dir = Marlin....[env:rumba32] platform = ${common_stm32.platform} extends = common_stm32 build_flags = ${common_stm32.build_flags}   -Os   -DHAL_PCD_MODULE_ENABLED   -DDISABLE_GENERIC_SERIALUSB   -DHAL_UART_MODULE_ENABLED   -DTIMER_SERIAL=TIM9 board = rumba32_f446ve upload_protocol = dfu monitor_speed = 500000

Configuration.h:

#ifndef MOTHERBOARD  #define MOTHERBOARD BOARD_RUMBA32_V1_0#endif...........//// MKS OLED 1.3" 128×64 FULL GRAPHICS CONTROLLER// https://reprap.org/wiki/MKS_12864OLED//// Tiny, but very sharp OLED display////#define MKS_12864OLED // Uses the SH1106 controller (default)#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller

pins_RUMBA.h (для примера настройки пинов)

//// LCD / Controller//#if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306)  #define LCD_PINS_DC 38 // Set as output on init  #define LCD_PINS_RS 41 // Pull low for 1s to init  // DOGM SPI LCD Support  #define DOGLCD_CS 19  #define DOGLCD_MOSI 42  #define DOGLCD_SCK 18  #define DOGLCD_A0 LCD_PINS_DC#elif ENABLED(FYSETC_MINI_12864)  #define DOGLCD_CS 42  #define DOGLCD_A0 19  #define DOGLCD_MOSI 51  #define DOGLCD_SCK 52  //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems                                                  // results in LCD soft SPI mode 3, SD soft SPI mode 0  #define LCD_RESET_PIN 18 // Must be high or open for LCD to operate normally.  #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)    #ifndef RGB_LED_R_PIN      #define RGB_LED_R_PIN 41    #endif    #ifndef RGB_LED_G_PIN      #define RGB_LED_G_PIN 38    #endif    #ifndef RGB_LED_B_PIN      #define RGB_LED_B_PIN 40    #endif  #elif ENABLED(FYSETC_MINI_12864_2_1)    #define NEOPIXEL_PIN 25  #endif#else  #define LCD_PINS_RS 19  #define LCD_PINS_ENABLE 42  #define LCD_PINS_D4 18  #define LCD_PINS_D5 38  #define LCD_PINS_D6 41#endif#define LCD_PINS_D7 40//// Beeper, SD Card, Encoder//#define BEEPER_PIN 44#if ENABLED(SDSUPPORT)  #define SDSS 53  #define SD_DETECT_PIN 49#endif#if ENABLED(NEWPANEL)  #define BTN_EN1 11  #define BTN_EN2 12  #define BTN_ENC 43#endif

pins_RUMBA32_common.h

#define BTN_PIN PC10 #define PS_ON_PIN PE11 #define KILL_PIN PC5 #define SDSS PA2 #define SD_DETECT_PIN PB0 #define BEEPER_PIN PE8// // LCD / Controller // #if HAS_WIRED_LCD   #define BTN_EN1 PB2   #define BTN_EN2 PB1   #define BTN_ENC PE7   #if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306)     #define LCD_PINS_DC PE13 //38 // Set as output on init     #define LCD_PINS_RS PE14 //41 // Pull low for 1s to init     // DOGM SPI LCD Support     #define DOGLCD_CS PE10 //19     #define DOGLCD_MOSI PE9 //42     #define DOGLCD_SCK PE12 //18     #define DOGLCD_A0 LCD_PINS_DC   #else     #define LCD_PINS_RS PE10     #define LCD_PINS_ENABLE PE9     #define LCD_PINS_D4 PE12     #if ENABLED(MKS_MINI_12864)       #define DOGLCD_CS PE13       #define DOGLCD_A0 PE14     #endif     #if ENABLED(ULTIPANEL)       #define LCD_PINS_D5 PE13       #define LCD_PINS_D6 PE14     #endif     #define LCD_PINS_D7 PE15 // 40   #endif   // Alter timing for graphical display   #if HAS_MARLINUI_U8GLIB     #ifndef BOARD_ST7920_DELAY_1       #define BOARD_ST7920_DELAY_1 DELAY_NS(96)     #endif     #ifndef BOARD_ST7920_DELAY_2       #define BOARD_ST7920_DELAY_2 DELAY_NS(48)     #endif     #ifndef BOARD_ST7920_DELAY_3       #define BOARD_ST7920_DELAY_3 DELAY_NS(600)     #endif   #endif #endif

Распиновку брал с гитхаба:

RUMBA32 https://github.com/makerbase-mks/MKS-RUMBA32/blob/master/hardware/MKS%20RUMBA32%20V1.0_002/MKS%20RUMBA32%20V1.0_002%20PIN.pdf

RUMBA https://raw.githubusercontent.com/Aus3D/RUMBA-Plus/master/Resources/Images/PinoutDrawing.png

(тут распиновка для RUMB+, но, судя по конфигурации в марлине, они совпадают)

Те же настройки, но с подключенным и активированным в прошивке Reprap Discount 2004 экраном дают весьма положительный результат. Все работает, экран показывает.

Помогите, чем можИте, пожалуйста. Очень нравится маленький ОЛЕД экранчик, менять его на что-то другое желания нет.

Ответы на вопросы