LVGL_Micropython - driver for ST7701 #76
Replies: 19 comments 33 replies
-
The SPI that is used for the configuration is a bit different. It is at an extremely low speed and it needs to he handled by a special driver and not your typical SPI that is available for an MCU. I have not added the special driver yet that is needed to handle the config. You do have the ability to write your own bit bang driver in python to handle turning the pins on and off when they need to be turned on and off using the viper code emitter for MicroPython. RGB bus is going to be limited to 16 lanes for the ESP32. This is a limitation that is set by the ESP SDK. That means the maximum you can set the color depth to is going to be 16 bit which is RGB565.... Instead of using extra pins for the config SPI you can share the pins with some of the lanes for the RGB. You would have to run the config settings and then set up the bus driver and display driver. You will not be able to send any config settings while the display is active if you do this. |
Beta Was this translation helpful? Give feedback.
-
HEY!!!! I wanted to let you know that I wrote in the handling of that funky SPI config IC. I am going to key up a display driver for it right now for your display.... It shouldn't take me that long to put together for ya. Maybe 20 minutes or so. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Hello. Driver for ST7701 now work or not ? I can do some test. |
Beta Was this translation helpful? Give feedback.
-
Also infor from ESPHOME https://devices.esphome.io/devices/Guition-ESP32-S3-4848S040
|
Beta Was this translation helpful? Give feedback.
-
I did that for 480x480 square (86 Box) GUITION ESP32-4848S040 |
Beta Was this translation helpful? Give feedback.
-
Code: lcd_9bit_spi.py
lcd.py
st7701.py
|
Beta Was this translation helpful? Give feedback.
-
Absolutely right. But before that not work and not was understand problem in driver 3-wire or in setting. Now we have right setting. And can back to day ago and try use 3-wire SPI with right setting. |
Beta Was this translation helpful? Give feedback.
-
just update _st7701_type9.py now work and color right (set RED background) and without artifact. |
Beta Was this translation helpful? Give feedback.
-
for i2c touch
for 19 pin, default use as USB-. Need reconfigure firmware. sdkconfig.board
mpconfigboard.h |
Beta Was this translation helpful? Give feedback.
-
If use own board config and with own micropython i just want use make with your code as user_module. It ok for me. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
working config: on today. Work with file from repo as is. 480x480 square (86 Box) GUITION ESP32-4848S040 display PWM frequency for backlight - 2000display._backlight_pin.freq(2000)
|
Beta Was this translation helpful? Give feedback.
-
How it works. 2024-09-21.08.44.42.mp4 |
Beta Was this translation helpful? Give feedback.
-
@kdschlosser When the slider moves - lcd draws with artifacts.
|
Beta Was this translation helpful? Give feedback.
-
The result is the same with DMA, without DMA, and with Internal or PSRAM. Only if the Fullframe buffer, works without artifacts. |
Beta Was this translation helpful? Give feedback.
-
I am testing with a Waveshare 4in 480x480 LCD w ST7701 and see the same behavior as @straga regarding the buffers. I'm using display.init(13) for this display. |
Beta Was this translation helpful? Give feedback.
-
First update is without your changes I am not seeing the artifact with these settings
Possibly from changing init(type=6) to init(type=13) , which fixed colors. Rotation doesn't seem to work well Doing display.set_rotation(0) no change |
Beta Was this translation helpful? Give feedback.
-
Tested the version with y_end+=1; commented out. Artifacts are still there with //20. Rotation 90 looks different, has these horizontal lines. |
Beta Was this translation helpful? Give feedback.
-
Is it relevant to write a driver for ST7701 ?
If the SPI is just used in initialization LCD, will be possible to write a command initialization and then use parallel RGB driver?
https://focuslcds.com/journals/application-notes/3-wire-spi-parallel-rgb-interface/
The 3-wire Serial Peripheral Interface (SPI) and the 16/18/24-bit RGB parallel interface are used in a sequence to communicate data to the display. The SPI interface is first used to initialize the display parameters through command registers. Once initialized, the display can receive data over the RGB parallel interface at a higher speed. This data can be sent in segments of 16, 18 or 24-bit lengths depending on what is specified by the SPI initialization commands.
Beta Was this translation helpful? Give feedback.
All reactions