Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Display 12864 on SKR E3 Mini] How to adapt the BTT 12864 v1 at SKR E3 Mini V3? #650

Closed
Luismiguelfco opened this issue Jun 1, 2022 · 68 comments

Comments

@Luismiguelfco
Copy link

Hello Guys.

Recently i bought the SKR E3 mini V3 and a BTT 12864 display. But after bought that, i saw that's incompatible. :(

So, i started to search about the BTT display pinout and SKR E3 pinout. I found this pinout below:

Pinout

So i connected the respective pins of BTT on SKR, and i tested all compatibles displays on Marlin, but it doesn't work :(

I think that to display the most important pins are: LCD_RST(D4), LCD_CS(EN), LCD_RS, 5V and GND. The display turn on the backlight led, but no show anything.

I would like to know if somenone knows if there's a different protocol on BTT display, because SKR support some 12864 displays. Or what is the model of de uC that control de LCD.

I already tested the connection sugested to SKR E3 1.2 and 2.0 and it doesn't works too. :/

Someone to give some support to me? :D

@radek8
Copy link

radek8 commented Jun 1, 2022

You can also make the Y cable yourself.

image

@Luismiguelfco
Copy link
Author

You can also make the Y cable yourself.

image

Hi @radek8, thank you for the answer.

I tryed your pinout, but it doesn't work. 😢 The led turn on, but nothing is showed in the screen.

I tested it using "CR10_STOCK_DISPLAY" on Marlin, and after that also i tryed "MKS_12864"

@radek8
Copy link

radek8 commented Jun 4, 2022

What model of display do you have exactly?
Can you send photos from both sides?

@Luismiguelfco
Copy link
Author

What model of display do you have exactly? Can you send photos from both sides?

https://pt.aliexpress.com/item/1005001729266611.html?spm=a2g0o.order_list.0.0.57e9caa4GigTjQ&gatewayAdapt=glo2bra

Pinout display

@radek8

This comment was marked as outdated.

@radek8

This comment was marked as outdated.

@radek8
Copy link

radek8 commented Jun 4, 2022

You will allow
#define FYSETC_MINI_12864_2_1

or

#define BTT_MINI_12864_V1

You comment in line "pins_BTT_SKR_MINI_E3_V3.h" line 261

image

You make your own cable:

image

@Luismiguelfco
Copy link
Author

You will allow #define FYSETC_MINI_12864_2_1

You comment in line "pins_BTT_SKR_MINI_E3_V3.h" line 261

image

You make your own cable:

image

I got this error on VS Code:

In file included from Marlin\src\lcd\dogm\marlinui_DOGM.cpp:42:
Marlin\src\lcd\dogm\marlinui_DOGM.cpp: In static member function 'static void MarlinUI::init_lcd()':
Marlin\src\lcd\dogm\marlinui_DOGM.h:225:23: error: 'DOGLCD_CS' was not declared in this scope; did you mean 'DOGLCD_ | ^~~~~~~~~
Marlin\src\lcd\dogm\marlinui_DOGM.cpp:267:14: note: in expansion of macro 'U8G_PARAM'
267 | u8g.init(U8G_PARAM);
| ^~~~~~~~~
Marlin\src\lcd\dogm\marlinui_DOGM.h:225:34: error: 'DOGLCD_A0' was not declared in this scope; did you mean 'DOGLCD'?
225 | #define U8G_PARAM DOGLCD_CS, DOGLCD_A0 // HW-SPI
| ^~~~~~~~~
Marlin\src\lcd\dogm\marlinui_DOGM.cpp:267:14: note: in expansion of macro 'U8G_PARAM'
267 | u8g.init(U8G_PARAM);
| ^~~~~~~~~
Compiling .pio\build\STM32G0B1RE_btt\src\src\lcd\menu\menu_bed_leveling.cpp.o
*** [.pio\build\STM32G0B1RE_btt\src\src\lcd\dogm\marlinui_DOGM.cpp.o] Error 1
=========================================== [FAILED] Took 35.54 seconds ===========================================

@radek8
Copy link

radek8 commented Jun 4, 2022

You have a different version of Marin than I do.
That's why you commented on the wrong line.

I wrote that you have to comment on line 261.
So you commented on the wrong line.
Send me your pin set, I'll tell you which line to comment on.

@radek8
Copy link

radek8 commented Jun 4, 2022

line 261 leave uncommented

You have to comment on the line I took

// #error "CAUTION! FYSETC_MINI_12864_2_1 and clones require wiring modifications. See 'pins_BTT_SKR_MINI_E3_V3_0.h' for details. Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning"

@Luismiguelfco
Copy link
Author

line 261 leave uncommented

You have to comment on the line I took

// #error "CAUTION! FYSETC_MINI_12864_2_1 and clones require wiring modifications. See 'pins_BTT_SKR_MINI_E3_V3_0.h' for details. Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning"

Man, it's working!!!!! :DDDD

I tryed the latest version of marlin and did exactly what you said, and it's working!!! Really thank you!

I just need to finish the test regarding neo pixel, but the image is aleady on the screen.

Finishing i post the result's here and i will make a video to help another people.

Thank you a lot radek!!! I'm almost buying another display.

@radek8
Copy link

radek8 commented Jun 4, 2022

Unfortunately, this is an atypical display for this board.
The buzzer won't work for you.
The SD card reader on the display will probably not work either.
The pins have nowhere to connect.

@Luismiguelfco
Copy link
Author

Unfortunately, this is an atypical display for this board. The buzzer won't work for you. The SD card reader on the display will probably not work either. The pins have nowhere to connect.

No problem if the SD or buzzer wont work.

About the Neopixel, i uncommented the lines regarding that, and RGB backlight is working.

But i facing another problem. When the pin DIN is connected to LCD, the display doesn't show anything, only the RGB backlight work; if i disconect the DIN pin, the backlight doesn't work, but the image is showed on the screen. Maybe could it be a contrast setup?

At monday i will buy a flat cable and new connectors to make a permanent cable, i'm using wire jumpers to make the conection today.

Monday i'll be back here with more news about the display :D

@radek8
Copy link

radek8 commented Jun 5, 2022

The BTT manual introduces another parameter change.
In the file: Marlin\src\lcd\dogm\marlinui_DOGM.cpp
change parameter:
void MarlinUI::_set_contrast() { u8g.setContrast(contrast); }
change to:
void MarlinUI::_set_contrast() { u8g.setContrast(255); }

You can try ...

@radek8
Copy link

radek8 commented Jun 5, 2022

Other parameters recommended by BTT for this display

image

@radek8
Copy link

radek8 commented Jun 5, 2022

I found another configuration for your display.

If you need to change the RGB-color manually, then you need to enable the LED_CONTROL_MENU in configuration_adv.h. If you don't need it, you can skip this step.

@Luismiguelfco
Copy link
Author

The BTT manual introduces another parameter change.
In the file: Marlin\src\lcd\dogm\marlinui_DOGM.cpp
change parameter:
void MarlinUI::_set_contrast() { u8g.setContrast(contrast); }
change to:
void MarlinUI::_set_contrast() { u8g.setContrast(255); }

You can try ...

I changed this function and all is working!!!

Really thank you man!

IMG_20220605_172029.jpg

@radek8
Copy link

radek8 commented Jun 5, 2022

Congratulations, you endured a successful end.

@KingBain
Copy link

Hello,
I have an skr mini e3 v3 and a BTT mini12864 v1 . With that combination, which pins do I connect to make the reset button work ?

@radek8
Copy link

radek8 commented Jul 15, 2022

image

@KingBain
Copy link

Ive double checked my wiring and I have what you show above. Reset button isn't working.

Wondering maybe, if KILL_PIN needs to be defined in marlin for reset to work ?

@KingBain
Copy link

for others going through this, you need to connect both reset pins
image

@Wavegreen
Copy link

Hi, I have tried a few different connections already but can't get my screen to work. BTT support has also not been helpful. What would my connections have to be for a standard CR-20 display and an SKR MINI E3 V3.0? I have added some pictures.
Thanks in advance!
IMG_0674
IMG_0673

@radek8
Copy link

radek8 commented Sep 25, 2022

@Wavegreen
What type of display is used in the CR-20?
Can you unscrew the display and take a picture from the other side?

@Wavegreen
Copy link

@radek8 thanks for your reply!
The display is the default display that comes with the CR-20. From forums it is apparently the same as the one from a CR-10 but not sure.
I tried googling around for shops to get a model number for the screen but haven't had any luck.
A start would be: https://www.diyelectronics.co.za/store/displays/2301-replacement-lcd-display-for-cr-20-and-cr-20-pro-creality-original.html but it does not give any details that could lead me to a pinout.

It looks extremely similar to the BTT 12864 display without reset button and sd card reader. I did try the connections of that screen with mine but haven't had any luck. I did double check connections but it is possible that I made an error of course.

IMG_0686
IMG_0685

@radek8
Copy link

radek8 commented Sep 26, 2022

In the sample configuration for CR-20 it is defined:
#define MKS_MINI_12864
https://github.com/MarlinFirmware/Configurations/tree/bugfix-2.1.x/config/examples/Creality/CR-20
So it will be his clone.
I assume you are compiling your own Marlin.
Send Marlin configuration files.
Send a photo of the cable to the display on the SKR side.

@michaelsheridan23
Copy link

@radek8 any idea on my issue above (from 5 days ago)? Is that normal behavior for this setup? Or do I just have something wrong? Thanks!

@radek8
Copy link

radek8 commented Jan 9, 2023

I do not own this display or this SKR board.
So I can't try to simulate the mentioned problem.
If you shut down the printer and the display remains blank, what happens when you click on the encoder or turn it? Will the display be rendered?

@radek8
Copy link

radek8 commented Jan 9, 2023

Can you try initializing the EEPROM?
Use the M502 command to set the default values and use the M500 command to save them. Reset the printer.
Then try if your problem persists.

@radek8
Copy link

radek8 commented Jan 9, 2023

If it doesn't help, try adding the following line (at position 347) to the file "pins_BTT_SKR_MINI_E3_V3_0.h"
and recompile Marlin
#define LCD_CONTRAST 255

image

@landlord101
Copy link

Hello
I tried both pinouts one pn the e3 v3 page and one on the commons page, code is getting compiled without any issue for btt12864, commented the error also.
It still isnt working, m using the latest marlin bugfix build. Even i get no backlight while plugging it in.please help!

@lipe1234645
Copy link

@radek8, Hello, I am unable to connect my BTT 12864 v3 to my skr mini e3 v2, do you know how to connect?

@radek8
Copy link

radek8 commented Mar 9, 2023

BTT 12864 v3???
For the BTT 12864 V1 and SKR E3mini V2 connection, see here.

#686

@radek8
Copy link

radek8 commented Mar 9, 2023

@lipe1234645
Use the latest Marlin with bug fixes
Older versions may contain bugs that cause the display to not work.

@lipe1234645
Copy link

@radek8 deu esse erro

In file included from c:\marlin-bugfix-2.1.x\marlin\src\hal\hal.h:30:0,
from Marlin\src\HAL\STM32F1../../inc/MarlinConfig.h:31,
from Marlin\src\HAL\STM32F1\HAL.cpp:30:
c:\marlin-bugfix-2.1.x\marlin\src\hal\stm32f1\hal.h:172:1: error: expected ';' before 'typedef'
typedef int8_t pin_t;
^~~~~~~
In file included from c:\marlin-bugfix-2.1.x\marlin\src\hal\hal.h:30:0,
from Marlin\src\HAL\STM32F1../../inc/MarlinConfig.h:31,
from Marlin\src\HAL\STM32F1\HAL.cpp:30:
c:\marlin-bugfix-2.1.x\marlin\src\hal\stm32f1\hal.h:97:3: error: static assertion failed: SERIAL_PORT must be from 1 to 5. You can also use -1 if
the board supports Native USB.
static_assert(false, "SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.")
^~~~~~~~~~~~~
In file included from c:\marlin-bugfix-2.1.x\marlin\src\hal\hal.h:30:0,
from Marlin\src\HAL\STM32F1../../inc/MarlinConfig.h:31,
from Marlin\src\HAL\STM32F1\HAL_SPI.cpp:32:
c:\marlin-bugfix-2.1.x\marlin\src\hal\stm32f1\hal.h:172:1: error: expected ';' before 'typedef'
typedef int8_t pin_t;
^~~~~~~
In file included from c:\marlin-bugfix-2.1.x\marlin\src\hal\hal.h:30:0,
from Marlin\src\HAL\STM32F1../../inc/MarlinConfig.h:31,
from Marlin\src\HAL\STM32F1\HAL_SPI.cpp:32:
c:\marlin-bugfix-2.1.x\marlin\src\hal\stm32f1\hal.h:97:3: error: static assertion failed: SERIAL_PORT must be from 1 to 5. You can also use -1 if
the board supports Native USB.
static_assert(false, "SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.")
^~~~~~~~~~~~~
*** [.pio\build\STM32F103RC_btt_maple\src\src\HAL\STM32F1\HAL.cpp.o] Error 1
*** [.pio\build\STM32F103RC_btt_maple\src\src\HAL\STM32F1\HAL_SPI.cpp.o] Error 1
========================================================== [FAILED] Took 59.58 seconds ==========================================================

Environment Status Duration


STM32F103RC_btt_maple FAILED 00:00:59.579
===================================================== 1 failed, 0 succeeded in 00:00:59.579 =====================================================

  • The terminal process "C:\Users\felli.platformio\penv\Scripts\platformio.exe 'run'" terminated with exit code: 1.
  • Terminal will be reused by tasks, press any key to close it.

@radek8
Copy link

radek8 commented Mar 9, 2023

@lipe1234645
Marlin configuration error.
(badly defined serial ports)

You have to download Marlin.
Edit the configuration files according to your configuration and compile the FW.
If you want to update new versions often, use Desktop GitHub, which will synchronize changes and new versions with your settings.

A common mistake is to download a new Marlin and copy the configuration file from the old version of Marlin into it.
Configuration files of different versions of Marlin are not compatible with each other.

@lipe1234645
Copy link

lipe1234645 commented Mar 9, 2023

@radek8 Eu tentei compilar novamente e deu certo, só o display que não aparece nada

@radek8
Copy link

radek8 commented Mar 9, 2023

Use English.
Use the thread related to the same HW as you have.
This thread deals with connecting the display to the SKR mini E3 V3
You write that you have an SKR mini E3 V2. The V2 version has a thread here: #686

@PangiLukas
Copy link

Hi, Recently i bought the BTT SKR E3 mini V3 and i have home MKS LCD12864B V1.0. in latest marlin 2.1.2 i define it as lcd and use mks mini12864 pinout for wiring but it doesnt work. Only 2pins what im trusting is 5V and GND. I try finding pinout individual for this lcd but nothing found. Can someone please help me?IMG_20230421_224405.jpg

IMG_20230421_224425.jpg

Thanks so much

@radek8
Copy link

radek8 commented Apr 21, 2023

@PangiLukas
Bad combination of display and control board
The SKR has an EXP3 connector
The display has an EXP1 and EXP2 connector

You would have to use a Y cable.
The card reader on the display will not work in this connection.

@PangiLukas
Copy link

PangiLukas commented Apr 21, 2023

I have alright mks tft32_L v4.0 can it work?
@radek8 IMG_20230421_231034.jpg

@radek8
Copy link

radek8 commented Apr 21, 2023

The MKS LCD12864B V1.0 display will work in Marli mode.
The SD card reader will only work on the SKR

@radek8
Copy link

radek8 commented Apr 21, 2023

The TFT display will also work but it will be connected via the serial port.
Unfortunately the display is MSK and the Marlin board is from BTT.
Each uses a different connector. So you have to make your own cable.

In Marlin, you have to activate the serial port and set the communication speed to the same as that of the TFT

@PangiLukas
Copy link

Yeah, all this setting i still do. But at lcd is not show, it only light up. If there is no way to configure with working sd.it is not usable for me. I try to find display from btt. Thanks for all @radek8

@radek8
Copy link

radek8 commented Apr 22, 2023

You misunderstood me.
The SKR E3 mimi V3 board has only 1 EXP3 connector.
You can use it to connect the display and use Merlin mode.
You can use the SD card on the SKR, but not on the display, the SD card communicates via the EXP2 connector.
You would have to buy a board that has two connectors (EXP1 and EXP2).

The second option is to use the SD card on the TFT touch screen.
The TFT display has its own processor and communicates via a serial port.
So you can use your MKS TFT32_L v4.0. Your SD card will work there.
However, MKS TFT32_L v4.0 does not have Marlin mode, but that doesn't matter.

@PangiLukas
Copy link

So for tft 32 its enough to connect via tft serial port 5v/gnd/tx/rx and in firmware set number of serial port and baudrate?

@radek8
Copy link

radek8 commented Apr 23, 2023

Yes

@AleEZVillaseca
Copy link

Hello, I have the same bad decision on my hands.
but i want to connect my SKR mini e3 v3 in my btt mini display 12864 v1? The problem is that I'm using klipper, try to use the configuration given by https://lab4450.com/product/skr-mini-e3-screen-adaptor/ that uses SPI pins but it doesn't turn on. could you help me?

@radek8
Copy link

radek8 commented Jun 13, 2023

Unfortunately, I have no experience with Klipper

@lab4450
Copy link

lab4450 commented Jul 5, 2023

Hello, I have the same bad decision on my hands. but i want to connect my SKR mini e3 v3 in my btt mini display 12864 v1? The problem is that I'm using klipper, try to use the configuration given by https://lab4450.com/product/skr-mini-e3-screen-adaptor/ that uses SPI pins but it doesn't turn on. could you help me?

mail me at info@lab4450.com so we can figure this out together.

@mgcrea
Copy link

mgcrea commented Oct 30, 2023

Just created the cable between a SKR Mini E3 v2 (from a Voron 0) to a BigTreeTech Mini12864 V2.0 with everything working flor Klipper. I'm sharing this here as finding the right pinout was a painful task!

Klipper config:

######################################################################
# MKS Mini 12864 LCD
######################################################################

[display]
lcd_type: uc1701
cs_pin: EXP1_3
a0_pin: EXP1_4
rst_pin: EXP1_5
contrast: 63
encoder_pins: ^EXP1_9, ^EXP1_10
click_pin: ^!EXP1_8
spi_bus: spi1

[neopixel btt_mini12864]
pin: EXP1_6 # D5
chain_count: 3
color_order: RGB
initial_RED: 0
initial_GREEN: 0
initial_BLUE: 1

[output_pin beeper]
pin: PC14

########################################
# EXP1 / EXP2 (display) pins
########################################

[board_pins]
aliases:
    # EXP1 header
    EXP1_1=<5V>,  EXP1_3=PB15, EXP1_5=PB9, EXP1_7=<RST>, EXP1_9=PA15,
    EXP1_2=<GND>, EXP1_4=PB8,  EXP1_6=PA10,  EXP1_8=PA9,   EXP1_10=PB5,

The idea is to use the SPI1 header on the SKR mini to connect to the SPI ports of the display (SCK & MOSI pins) and use all the other pins from the EXP1 header for the display (hence the spi_bus: spi1 in the config.

Screenshot 2023-10-30 at 09 15 45

Beware the EXP1 header is mirrored in the following table (X marks the direction of the connector).

Screenshot 2023-10-30 at 09 25 32 Screenshot 2023-10-30 at 09 22 00

@kd0afk
Copy link

kd0afk commented Mar 25, 2024

Just created the cable between a SKR Mini E3 v2 (from a Voron 0) to a BigTreeTech Mini12864 V2.0 with everything working flor Klipper. I'm sharing this here as finding the right pinout was a painful task!

Klipper config:

######################################################################
# MKS Mini 12864 LCD
######################################################################

[display]
lcd_type: uc1701
cs_pin: EXP1_3
a0_pin: EXP1_4
rst_pin: EXP1_5
contrast: 63
encoder_pins: ^EXP1_9, ^EXP1_10
click_pin: ^!EXP1_8
spi_bus: spi1

[neopixel btt_mini12864]
pin: EXP1_6 # D5
chain_count: 3
color_order: RGB
initial_RED: 0
initial_GREEN: 0
initial_BLUE: 1

[output_pin beeper]
pin: PC14

########################################
# EXP1 / EXP2 (display) pins
########################################

[board_pins]
aliases:
    # EXP1 header
    EXP1_1=<5V>,  EXP1_3=PB15, EXP1_5=PB9, EXP1_7=<RST>, EXP1_9=PA15,
    EXP1_2=<GND>, EXP1_4=PB8,  EXP1_6=PA10,  EXP1_8=PA9,   EXP1_10=PB5,

The idea is to use the SPI1 header on the SKR mini to connect to the SPI ports of the display (SCK & MOSI pins) and use all the other pins from the EXP1 header for the display (hence the spi_bus: spi1 in the config.

Screenshot 2023-10-30 at 09 15 45 Beware the EXP1 header is mirrored in the following table (`X` marks the direction of the connector).

Screenshot 2023-10-30 at 09 25 32 Screenshot 2023-10-30 at 09 22 00

your code doesn't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests