thanks alot! ill give it a try! i doubt i have a screen configuration editor because im running headless and the dts overlay settings did not workwhy don't you simply use Screen configuration editor for rotating it?Hey thanks a lot for this! this works flawlessly. In my specific usecase I would like to rotate it 90 degrees clockwise, Would you be willing to share the wavesku19650.txt file and how you add rotation to the config?ST7789 TCON
This has been tested with waveshare SKU:19650 but should be applicable to other waveshare products using the same display (i.e. SKU:14972, SKU:15867, SKU:25586)
The displays has 240x240pixels resolution
https://www.waveshare.com/pico-lcd-1.3.htm
wavesku19650.bin.zip
Download/unzip the file and copy it to required folderadd below to your config.txtCode:
sudo cp wavesku19650.bin /lib/firmwareIMG_20230911_141652.jpgCode:
# waveshare 1.3in - 240x240pixel - SKU19650dtoverlay=mipi-dbi-spi,speed=48000000dtparam=compatible=wavesku19650\0panel-mipi-dbi-spidtparam=write-only,cpha,cpoldtparam=width=240,height=240,width-mm=23,height-mm=23dtparam=reset-gpio=24,dc-gpio=25,backlight-gpio=23
afk atm so you will have to have some patience before I'm able to share. you will need to change the init command sequence for rotating the screen; requires a new bin file.
EDIT: here is my initial command sequence for that module. Should be easy for you to create a .bin file with the rotation you needCode:
# waveshare 1.3in 240x240pixels - SKU 19650# https://www.waveshare.com/pico-lcd-1.3.htm# by aBUGSworstnightmare# wavesku19650.txtcommand 0x01# MIPI_DCS_SOFT_RESETdelay 150# dts has rotate=0command 0x36 0x00# MIPI_DCS_SET_ADDRESS_MODE# dts has rotate=90 -> driver converts to: MADCTL_MX | MADCTL_MV#command 0x36 0x60# MIPI_DCS_SET_ADDRESS_MODE# dts has rotate=180 -> driver converts to: MADCTL_MX | MADCTL_MY#command 0x36 0xC0# MIPI_DCS_SET_ADDRESS_MODE# dts has rotate=270 -> driver converts to: MADCTL_MV | MADCTL_MY#command 0x36 0xA0# MIPI_DCS_SET_ADDRESS_MODE# 16-bit data bus for 16-bit/pixel (RGB 5-6-5-bit input) 65K-Colorcommand 0x3a 0x05# MIPI_DCS_SET_PIXEL_FORMAT# RGB interface controlcommand 0xB1 0x20 0x02 0x14# Porch settingcommand 0xB2 0x0C 0x0C 0x00 0x33 0x33# Gate controlcommand 0xB7 0x35# VCOM settingcommand 0xBB 0x19# LCM controlcommand 0xC0 0x2C# VDV and VRH command enablecommand 0xC2 0x01 0xFF# VRH setcommand 0xC3 0x12# VDV setcommand 0xC4 0x20# Frame rate control in normal modecommand 0xC6 0x0F# Power control 1command 0xD0 0xA4 0xA1# Positive voltage gamma controlcommand 0xE0 0xD0 0x04 0x0D 0x11 0x13 0x2B 0x3F 0x54 0x4C 0x18 0x0D 0x0B 0x1F 0x23# Negative voltage gamma controlcommand 0xE1 0xD0 0x04 0x0C 0x11 0x13 0x2C 0x3F 0x44 0x51 0x2F 0x1F 0x1F 0x20 0x23# Display inversion oncommand 0x21 # MIPI_DCS_ENTER_INVERT_MODE# Sleep outcommand 0x11 # MIPI_DCS_EXIT_SLEEP_MODE# Display oncommand 0x29# MIPI_DCS_SET_DISPLAY_ONdelay 100command 0x13# MIPI_DCS_ENTER_NORMAL_MODEdelay 20
Statistics: Posted by takti — Wed Aug 27, 2025 10:31 pm