Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Klipper display configuration

teeminus edited this page Apr 16, 2022 · 10 revisions

Klipper config

Setup of Klipper config

To setup Klipper to use a connected display you need to add a [display] section to your Klipper config. For reference configurations check the Klipper example configuration files or the list of known working display configs below.

Troubleshooting

If your display does not work with your display config, please check the known working configs below and see if there could be a matching config for your display. However, if this does not work either there are several different possibilities why the screen does not work:

  1. Make sure you flashed the correct firmware for your screen. Restart Klipper host and firmware after flashing the display.
  2. Check the cabling if the connectors are plugged into the correct sockets, e.g. EXP1->EXP1 etc.
  3. Check if your display backlight flashes (turns off and on again) when restarting Klipper host or firmware. If this does not happen, follow the instructions in the Migrate to new display driver section below.
  4. Flash your screen with the corresponding firmware from the binaries/_debug/ folder. This firmware adds a visual indicator to the top of the screen which shows, if the display receives data from Klipper. If data is received from Klipper, the empty space on both sides of the firmware title will be filled with pixel data which might look like noise or scrambled screen data.
    1. Check the left side of the firmware title. When restarting Klipper host or firmware, this display section should change. If that does not happen, your display pins are not configured correctly.
    2. Check the right side of the firmware title. This section should update as well when restarting Klipper host or firmware. If this section is only updated once during display start, follow the instructions in the Migrate to new display driver section below.

Migrate to new display driver

Some controlboard/display combinations do not work with the stock lcd_type: st7920 display driver. The display is not reset on restart of Klipper host or firmware which leads to either the display not updating or scrambled display content. These display should use the lcd_type: emulated_st7920 which has been introduced in Klipper v0.9.1-290. An example on how to migrate for lcd_type: st7920 to lcd_type: emulated_st7920 is shown here:

st7920 <=> emulated_st7920
lcd_type: st7920 lcd_type: emulated_st7920
cs_pin: EXP1_4 en_pin: EXP1_4
sclk_pin: EXP1_5 spi_software_sclk_pin EXP1_5
sid_pin: EXP1_3 spi_software_mosi_pin EXP1_3
spi_software_miso_pin UNUSED_PIN_ON_CONTROL_BOARD

Please note that the emulated_st7920 uses the Klipper software_spi implementation which requires the pin spi_software_miso_pin to be set even if it is not used by the display driver. You can assign any unused pin of your control to this config entry. A good choise for the dummy pin would be the d5_pin of the LCD2004 display driver which - for the most control boards - is labeled by EXP1_6. However, this might be different on your specific setup so please verify that yourself.

A comparison of a successful migration is shown below:

[display]
lcd_type: st7920
cs_pin: EXP1_4
sclk_pin: EXP1_5
sid_pin: EXP1_3
encoder_pins: ^EXP2_5, ^EXP2_3
click_pin: ^!EXP1_2
   
[display]
lcd_type: emulated_st7920
en_pin: EXP1_4
spi_software_sclk_pin: EXP1_5
spi_software_mosi_pin: EXP1_3
spi_software_miso_pin: EXP1_6
encoder_pins: ^EXP2_5, ^EXP2_3
click_pin: ^!EXP1_2
   

Known working example configurations

TFT24v1.1 and BTT SKR V1.3

Tested by: CraXyOW3

[board_pins]
aliases:
    EXP1_1=P1.30, EXP1_3=P1.18, EXP1_5=P1.20, EXP1_7=P1.22, EXP1_9=<GND>,
    EXP1_2=P0.28, EXP1_4=P1.19, EXP1_6=P1.21, EXP1_8=P1.23, EXP1_10=<5V>,
    EXP2_1=P0.17, EXP2_3=P3.26, EXP2_5=P3.25, EXP2_7=P1.31, EXP2_9=<GND>,
    EXP2_2=P0.15, EXP2_4=P0.16, EXP2_6=P0.18, EXP2_8=<RST>, EXP2_10=<NC>

[display]
lcd_type: st7920
cs_pin: EXP1_4
sclk_pin: EXP1_5
sid_pin: EXP1_3
encoder_pins: ^EXP2_5, ^EXP2_3
click_pin: ^!EXP1_2

TFT24v1.1 and BTT SKR V1.4 Turbo

Tested by: MarsArtis

[board_pins]
aliases:
    EXP1_1=P1.30, EXP1_3=P1.18, EXP1_5=P1.20, EXP1_7=P1.22, EXP1_9=<GND>,
    EXP1_2=P0.28, EXP1_4=P1.19, EXP1_6=P1.21, EXP1_8=P1.23, EXP1_10=<5V>,
    EXP2_1=P0.17, EXP2_3=P3.26, EXP2_5=P3.25, EXP2_7=P1.31, EXP2_9=<GND>,
    EXP2_2=P0.15, EXP2_4=P0.16, EXP2_6=P0.18, EXP2_8=<RST>, EXP2_10=<NC>

[display]
lcd_type: st7920 
cs_pin: EXP1_4
sclk_pin: EXP1_5
sid_pin: EXP1_3
encoder_pins: ^EXP2_3, ^EXP2_5
click_pin: ^!EXP1_2

TFT24v1.1 and BTT SKR MINI v1.2

Tested by: INeDiA

[board_pins]
aliases:
    # EXP1 header
    EXP1_1=PB5, EXP1_3=PA9,   EXP1_5=PA10, EXP1_7=PB8, EXP1_9=<GND>,
    EXP1_2=PB6, EXP1_4=<RST>, EXP1_6=PB9,  EXP1_8=PB7, EXP1_10=<5V>
    
[display]
lcd_type: emulated_st7920 
en_pin: PB8
spi_software_sclk_pin: PB9
spi_software_mosi_pin: PB7
encoder_pins: ^PA9, ^PA10
click_pin: ^!PB6
spi_software_miso_pin: PA2 #this pin was unused on my board, change accordingly   

TFT35v3 and BTT SKR 2

Tested by: levidurham

[board_pins]
aliases:
# EXP1 header
EXP1_1=PC5, EXP1_3=PB1, EXP1_5=PE10, EXP1_7=PE12, EXP1_9=,
EXP1_2=PB0, EXP1_4=PE9, EXP1_6=PE11, EXP1_8=PE13, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PA6, EXP2_3=PE7, EXP2_5=PB2, EXP2_7=PC4, EXP2_9=,
EXP2_2=PA5, EXP2_4=PA4, EXP2_6=PA7, EXP2_8=, EXP2_10=

[display]
lcd_type: emulated_st7920
spi_software_miso_pin: EXP1_6
spi_software_mosi_pin: EXP1_3
spi_software_sclk_pin: EXP1_5
en_pin: EXP1_4
encoder_pins: ^EXP2_5, ^EXP2_3
click_pin: ^!EXP1_2

TFT35v3 and BTT SKR V1.4 Turbo

Tested by: Foxcor

[board_pins]
aliases:
# EXP1 header
EXP1_1=P1.30, EXP1_3=P1.18, EXP1_5=P1.20, EXP1_7=P1.22, EXP1_9=,
EXP1_2=P0.28, EXP1_4=P1.19, EXP1_6=P1.21, EXP1_8=P1.23, EXP1_10=<5V>,
EXP2_1=P0.17, EXP2_3=P3.26, EXP2_5=P3.25, EXP2_7=P1.31, EXP2_9=,
EXP2_2=P0.15, EXP2_4=P0.16, EXP2_6=P0.18, EXP2_8=, EXP2_10=

[display]
lcd_type: emulated_st7920
en_pin: EXP1_4
spi_software_sclk_pin: EXP1_5
spi_software_mosi_pin: EXP1_3
spi_software_miso_pin: EXP1_6
encoder_pins: ^EXP2_5, ^EXP2_3
click_pin: ^!EXP1_2

TFT35v3 and BTT SKR v1.3

Tested by: RomRider

[board_pins]
aliases:
    EXP1_1=P1.30, EXP1_3=P1.18, EXP1_5=P1.20, EXP1_7=P1.22, EXP1_9=<GND>,
    EXP1_2=P0.28, EXP1_4=P1.19, EXP1_6=P1.21, EXP1_8=P1.23, EXP1_10=<5V>,
    EXP2_1=P0.17, EXP2_3=P3.26, EXP2_5=P3.25, EXP2_7=P1.31, EXP2_9=<GND>,
    EXP2_2=P0.15, EXP2_4=P0.16, EXP2_6=P0.18, EXP2_8=<RST>, EXP2_10=<NC>

[display]
lcd_type: st7920
cs_pin: EXP1_7
sclk_pin: EXP1_6
sid_pin: EXP1_8
encoder_pins: ^EXP1_5, ^EXP1_3
click_pin: ^!EXP1_2

TFT35v3 and BTT SKR Pro v1.1

Tested by: teeminus

[board_pins]
aliases:
    EXP1_1=PG4, EXP1_3=PD11, EXP1_5=PG2, EXP1_7=PG6, EXP1_9=<GND>,
    EXP1_2=PA8, EXP1_4=PD10, EXP1_6=PG3, EXP1_8=PG7, EXP1_10=<5V>,
    EXP2_1=PB14, EXP2_3=PG10, EXP2_5=PF11, EXP2_7=PF12,  EXP2_9=<GND>,
    EXP2_2=PB13, EXP2_4=PB12, EXP2_6=PB15, EXP2_8=<RST>, EXP2_10=PF13

[display]
lcd_type: st7920
cs_pin: EXP1_4
sclk_pin: EXP1_5
sid_pin: EXP1_3
encoder_pins: ^EXP2_5, ^EXP2_3
click_pin: ^!EXP1_2
[display]
lcd_type: emulated_st7920
en_pin: PD10
spi_software_sclk_pin: EXP1_5
spi_software_mosi_pin: EXP1_3
spi_software_miso_pin: EXP1_6
encoder_pins: ^EXP2_5, ^EXP2_3
click_pin: ^!EXP1_2

TFT35v3 E3 and BTT Octopus Pro

Tested by: kamermans

[board_pins]
aliases:
    # EXP1 header
    EXP1_1=PE8, EXP1_2=PE7,
    EXP1_3=PE9, EXP1_4=PE10,
    EXP1_5=PE12, EXP1_6=PE13,    # Slot in the socket on this side
    EXP1_7=PE14, EXP1_8=PE15,
    EXP1_9=<GND>, EXP1_10=<5V>,

    # EXP2 header
    EXP2_1=PA6, EXP2_2=PA5,
    EXP2_3=PB1, EXP2_4=PA4,
    EXP2_5=PB2, EXP2_6=PA7,      # Slot in the socket on this side
    EXP2_7=PC15, EXP2_8=<RST>,
    EXP2_9=<GND>, EXP2_10=<5V> 

[display]
lcd_type: emulated_st7920
en_pin: EXP1_4
spi_software_sclk_pin: EXP1_5
spi_software_mosi_pin: EXP1_3
spi_software_miso_pin: EXP1_6
encoder_pins: ^EXP2_5, ^EXP2_3
click_pin: ^!EXP1_2

TFT35v3 E3 and BTT SKR V1.4

Tested by: wildjokerss

[board_pins]
aliases:
    EXP1_1=P1.30, EXP1_3=P1.18, EXP1_5=P1.20, EXP1_7=P1.22, EXP1_9=<GND>,
    EXP1_2=P0.28, EXP1_4=P1.19, EXP1_6=P1.21, EXP1_8=P1.23, EXP1_10=<5V>,
    EXP2_1=P0.17, EXP2_3=P3.26, EXP2_5=P3.25, EXP2_7=P1.31, EXP2_9=<GND>,
    EXP2_2=P0.15, EXP2_4=P0.16, EXP2_6=P0.18, EXP2_8=<RST>, EXP2_10=<NC>

[display]
lcd_type: st7920 
cs_pin: EXP1_4
sclk_pin: EXP1_5
sid_pin: EXP1_3
encoder_pins: ^EXP2_3, ^EXP2_5
click_pin: ^!EXP1_2

TFT35v3 E3 and BTT SKR V1.4 Turbo

Tested by: Sineos

[board_pins]
aliases: 
	EXP1_1=P1.30, EXP1_3=P1.18, EXP1_5=P1.20, EXP1_7=P1.22, EXP1_9=<GND>,
	EXP1_2=P0.28, EXP1_4=P1.19, EXP1_6=P1.21, EXP1_8=P1.23, EXP1_10=<5V>,
	EXP2_1=P0.17, EXP2_3=P3.26, EXP2_5=P3.25, EXP2_7=P1.31, EXP2_9=<GND>,
	EXP2_2=P0.15, EXP2_4=P0.16, EXP2_6=P0.18, EXP2_8=<RST>, EXP2_10=<NC>

[display]
lcd_type: st7920 
cs_pin: EXP1_4
sclk_pin: EXP1_5
sid_pin: EXP1_3
encoder_pins: ^EXP2_3, ^EXP2_5
click_pin: ^!EXP1_2
[display]
lcd_type: emulated_st7920
spi_software_miso_pin: EXP1_6
spi_software_mosi_pin: EXP1_3
spi_software_sclk_pin: EXP1_5
en_pin: EXP1_4
encoder_pins: ^EXP2_3, ^EXP2_5
click_pin: ^!EXP1_2

TFT35v3 E3 and BTT SKR E3 Turbo

Tested by: samia3d

[board_pins]
aliases:
    # EXP1 header
    EXP1_1=P2.8,  EXP1_3=P0.19, EXP1_5=P0.20, EXP1_7=P0.17, EXP1_9=<GND>,
    EXP1_2=P0.16, EXP1_4=<RST>, EXP1_6=P0.15, EXP1_8=P0.18, EXP1_10=<5V>

[display]
lcd_type: st7920
cs_pin: EXP1_7
sclk_pin: EXP1_6
sid_pin: EXP1_8
encoder_pins: ^EXP1_5, ^EXP1_3
click_pin: ^!EXP1_2

TFT35v3 E3 and BTT SKR Mini E3 v1.2

Tested by: emtrax-ltd

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

[display]
lcd_type: st7920
cs_pin: EXP1_7
sclk_pin: EXP1_6
sid_pin: EXP1_8
encoder_pins: ^EXP1_5, ^EXP1_3
click_pin: ^!EXP1_2

TFT35v3 E3 and BTT SKR Mini E3 v2.0

Tested by: kmarty

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

[display]
lcd_type: emulated_st7920
en_pin: EXP1_7
spi_software_sclk_pin: EXP1_6
spi_software_mosi_pin: EXP1_8
spi_software_miso_pin: PA3
encoder_pins: ^EXP1_5, ^EXP1_3
click_pin: ^!EXP1_2