What MCU/Processor/Board and compiler are you using?
What LVGL version are you using?
What do you want to achieve?
I have a parallel screen working under TFT esp but it doesn’t allow me to handle a spi touchscreen so I wanted to let lvgl do that part with a XPT2046 and I would like to learn how to config also a TFT screen from the driver list in lvgl instead to use tft esp one.
What have you tried so far?
I first tried with LV_arduino 3.0.1 but I am not really getting help with that. I got errors and I try the https://github.com/lvgl/lv_drivers and the https://github.com/lvgl/lv_port_esp32 to get the XPT2046 to work without any result. On the readme website, it only helps to get it to work with the selection screen but that is not in the Arduino environment and has to config the files by hand + in the readme it only helps if you have the basic tft esp screen is accepted.
So you probably need some library for XPT2046. Because you didn’t put any info about your hardware (even in your another post here LV_Arduino-3.0.1 esp32 add xpt2046 with a parallel screen) - for example used/free gpio, used module (wroom/wrover/???), nobody can suggest any working one - you have to search for it and make it working by yourself. After you get LVGL library working and XPT2046 library working we can help you to move further. As embeddedt wrote you for the first question - error you have posted came not from lv_drivers so it seems like it is specific to your environment - again, you didn’t post any info about your environment, installed libraries, installed core version, … so only you can search and find the source of the problem.
for example used/free gpio, used module (wroom/wrover/???)
I used ESP32 TTGO T8 16mb. I Might think focus first on the touchscreen because the tft screen works in parallel from out the TFT esp now. It would be nice to have tft esp lib to work with the screen but parallel and spi don’t compile.
I use Arduino IDE 1.8.12 I use now LVGL V7.7.1 and the other called LV_Arduino-3.0.1 because that is the last one.
I hope that this helps now? for learning, other screens without TFT_ESP lib can be checked after that. Or is it possible to let TFT_esp handle the spi touchscreen with the parallel screen would be better if somebody knows how to do that?
Hmm, still not very helpfull - you wrote that the LCD has parallel interface. Does your explanation mean that the SSD1963 uses (some) another pins and the XPT2046 is connected to GPIO 21, 19, 23 and 18? If so you have to search for Arduino XPT2046 library - there is plenty of them, some are also listed in official Arduino library repository (did you look here? https://www.arduino.cc/reference/en/libraries/thingpulse-xpt2046-touch/ ). You have to choose one, which suits your needs and try to make it work. After you choose one and make it work (and solve the calibration) we can guide you of how to write driver input to the LVGL.
Yes, exactly - imagine that the TFT_eSPI is here just as an ultra-fast disply driver, LVGL is… well LVGL , supported by TFT_eSPI. For the touch support in LVGL you need some library (at the same level as TFT_eSPI) integrated into your sketch. After every piece is working alone we can help you to glue all this together.
Does your explanation mean that the SSD1963 uses (some) another pins and the XPT2046 is connected to GPIO 21, 19, 23 and 18?
Yes, because parallel doesn’t use SPI pins and also yes GPIO are connected to the XPT2046 pins also mentioned which one. nothing else is connected on this pins yet.
https://github.com/lvgl/lv_drivers and the https://github.com/lvgl/lv_port_esp32 this lib has them. But I didn’t get them to work. because they are ported for the LVGL and I am not sure how to implement them yet. In the readme file helps to use TFT esp lib and yes I already have other rpi screen working with it but that screen is totally handled by TFT esp lib. Only problem for me now is that parallel tft configuration can’t be handle with the SPI touchscreen together yet. So for now I try to get it to work wit LVGL but use external configuration is unknown for me. documentation to use TFT esp make good sense for me. What I understand I have to change indev_drv.read_cb. For what I see this lib has most option https://github.com/lvgl/lv_drivers under indev directory. maybe also in the future the display drivers.
Hope you can help me with some hints or direction to add this.
I thought it was compatible with it because it was written for esp32 and LVGL. So I need a other way to get it to work. Hmmm so that was not clear for me and that was the confused part from it. So there is no arduino drivers for the xpt2046 lib yet for LVGL?
I think that the LVGL is driver-agnostic (which is absolutely perfect IMO) so there needs to be written drivers (or libraries in the Arduino world) with some glue code. TFT_eSPI is one of them. When I wrote lvgl arduino port I was too lazy and I did have very good experience with the TFT_eSPI s I’ve used it in the example. There was once upon a time discussion here https://github.com/lvgl/lv_arduino/issues/6 , but I was short of time. Anyway you can use any Arduino XPT2046 library if it:
work on your platform (ESP32 here)
suit your hardware connections
I think that I have to explain point 2 little bit more:
I don’t know exactly how your parallel interface work - I’m not sure that the ESP32 has enough GPIOs to drive it directly so maybe you use some SPI->GPIO extender. If this is your case you have to choose xpt library which allows you to specify SPI instance, or uses SPI transactions (in case of shared SPI).
So to answer your question - maybe there is library, which can be directly used with LVGL, but is depends on your hardware. Anyway you have to write some glue code to made it work with LVGL same way, as I wrote the code for TFT_eSPI. With the glue code we can help you…
The parallel screen is driven with 8bit data-line instead 16bit. so that is possible without a io-expander. Problem is that tft_espi can’t handle parallel and spi configuration now. That would be better but for now I also want to know how to select your own hardware in lvgl. I have xpt2046 working with rpi screen, but they both got driven by spi. Only this moment my screen is driven by parallel and my touchscreen still on spi.
There is no problem at all then - do as I and @embeddedt suggested - find the xpt2046 library for Arduino platform and ESP32 target and make it work on your hardware. After that we can help you to write the glue. There is nothing we can do otherwise.
I don’t have the link anymore but if you look it up ssd1963 7inch, 5 inch or 4.3inch you can find it easy. Keep in mind that this is still in development and voltage levels. It looks like plenty of things need still to be glued to get it to work altogether.
@Pablo2048 that did the trick. Had to change somethings, but also had some older experience from RPI screen on SPI with LVGL. I would say SPI screens are much better to use. The problem is I didn’t find a good spi screen with 7inch or bigger. I can say the spi screens have a faster refresh rate because the parallel screen is pretty slow.