Jump to content

USB->SPI STM32_Mini12864 + Bigtreetech mini 12864 v2 = black display


Recommended Posts

Hello

Please help me to fix this problem.

I need a long cable for display. Can't use EXP ports on main board with long cable bcs it produces error with registers in my SPI TMC2240.

I bought such board STM32_Mini12864 https://github.com/VoronDesign/Voron-Hardware/tree/master/STM32_Mini12864/  It's for FYSETC Mini 12864 Display but pinout looks like my Bigtreetech mini 12864 v2 This board uses STM32F042F6 microcontroller.

 

I flashed the STM32_Mini12864 board, wrote config for it (example) and successfully connected to it:

Quote

mcu menu(stm32f042x6)
Version: v0.12.0-114-ga77d0790
Load: 0.02, Awake: 0.00, Freq: 48 MHz,

My configuration for STM32_Mini12864:

 

[mcu menu]
# Uncomment serial and update with proper path
# Find serial path by running terminal command: ls /dev/serial/by-id/*
serial: /dev/serial/by-id/usb-Klipper_stm32f042x6_120008800543304846333520-if00 
restart_method: command

[display]
lcd_type: uc1701
kill_pin: !menu:PF0
spi_bus: spi1
cs_pin: menu:PA4
a0_pin: menu:PA2
rst_pin: menu:PA3
contrast: 63
encoder_pins: ^menu:PA0, ^menu:PA1
click_pin: ^!menu:PB1

## Alternatively, some micro-controller boards may work with software spi:
# I found these pins in the STM32F042x6 datasheet!
#spi_software_miso_pin: menu:PA6
#spi_software_mosi_pin: menu:PA7
#spi_software_sclk_pin: menu:PA5


[output_pin BEEPER_pin]
pin: menu:PF1
pwm: True
value: 0
shutdown_value: 0
cycle_time: 0.001
scale: 1000
 
[gcode_macro M300]
gcode:
    # Use a default 1kHz tone if S is omitted.
    {% set S = params.S|default(1000)|int %}
    # Use a 10ms duration is P is omitted.
    {% set P = params.P|default(100)|int %}
    SET_PIN PIN=BEEPER_pin VALUE={S} CYCLE_TIME={ 1.0/S if S > 0 else 1 }
    G4 P{P}
    SET_PIN PIN=BEEPER_pin VALUE=0

# name of neopixel should match name referenced in printer.cfg
# if there are other gcode_macros referencing the led display (e.g delayed gcode_macro)
[neopixel fysetc_mini12864]
pin: menu:PA13
chain_count: 3
color_order: RGB
initial_RED: 1.0
initial_GREEN: 1.0
initial_BLUE: 1.0

But display doesn't work correctly:

  1. The display is black;
  2. Rotation or clicking the encoder kills printer (need to reboot)

Only kill button works correctly.


I added klippy.log after rotation of the encoder. 

 

image.jpeg

 

Edited by pasha4ur
Link to comment
Share on other sites

14 minutes ago, atrushing said:

The BTT and Fysetc Mini12864 displays have their EXP ports rotated differently. The first section of this Voron guide explains how to change the connector housings so that the pinout aligns properly.

I rotated the image with the Fysetc pinouts. Looks like same as BTT

image.thumb.jpeg.c134c687e13c461247017d6498ec6cb8.jpeg

 

Link to comment
Share on other sites

11 minutes ago, pasha4ur said:

I rotated the image with the Fysetc pinouts. Looks like same as BTT

It is the header for each ribbon cable that needs to be rotated on the back of the Mini12864. Fysetc and BTT do not use the same plug orientation so the signals get crossed.

mini12864_header_flip.thumb.jpg.0dc7563ca122578a1e420392da82685c.jpg

Link to comment
Share on other sites

16 minutes ago, atrushing said:

It is the header for each ribbon cable that needs to be rotated on the back of the Mini12864. Fysetc and BTT do not use the same plug orientation so the signals get crossed.

mini12864_header_flip.thumb.jpg.0dc7563ca122578a1e420392da82685c.jpg

this board don't use cables.

image.thumb.png.7fba3167b5bd05af3461182b8dd717d5.png

I rotated wires on 180* and now I get error "Shutdown due to kill button!" from start.

I changed "kill_pin: ^menu:PF0" to "kill_pin: menu:PF0".

Now it works few moment. Then I hear something like a quiet sparkling current probably from the speaker and I get this error again.

image.thumb.png.19297f1ed32c57581bee5d995c3d6b81.png

 

 

 

 

 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...