Closed JeremiahGillis closed 2 years ago
I did some investigation today. The answer is that the LCD panel driver requires different clock, HSYNC, and VSYNC settings. I think the SSD1963 was driving the LCD panel driver too fast, causing it to get lost, possibly resetting. I was able to fix this by changing some of the getInitCommands
in Panel_SSD1963.hpp
. I have not figured out the exact timings yet as I am waiting for the LCD panel driver datasheet.
I can create a PR once I figure everything out in case someone want to use this display and controller. In addition, I want to enable 16-bit parallel mode which requires changes to the same file.
@JeremiahGillis I'm sorry for the delay in responding.
I will buy the same one and check it out. Is the one in this URL the same one?
https://www.buydisplay.com/5-inch-tft-ssd1963-lcd-module-optl-touch-screen-display-480x272-arduino
I'm sorry for the delay in responding.
No problem. I purchased this one. However I don't think there is any need for you to spend money on it.
I was able to get this working after some experimentation. It required different timings and settings in the getInitCommands
function. What was strange was that even with the correct timings, the display still didn't work correctly. It seems that the panel size in 0xB0
has to be correct. That is, it cannot be changed later on in Panel_SSD1963::init
function. I did a lot of debugging and implemented setHSync
and setVSync
so it could be called from the sketch. I will look into this further when I get a chance and report back to see why the panel size cannot be changed later on as you intended.
Is the intention to change settings in the panel files like Panel_SSD1963.hpp
? I think it would be better if the init could be passed from a sketch or C file outside the library.
One last thing for my understanding, does Parallel16
require a certain data format? For example, the SSD1963 has the data format below. Does your library work with when using 8 bits for every color as shown, requiring three cycles? Or, does it only work for 565 format, requiring one cycle?
Right now I am just using Parallel8
on ESP32-S2. I may change some settings in the panel driver so I can use Parallel16
for improved animation.
@JeremiahGillis
Is the intention to change settings in the panel files like Panel_SSD1963.hpp? I think it would be better if the init could be passed from a sketch or C file outside the library.
I am also wondering how to implement this correctly. When LGFX was first developed, we were dealing with ILI9341, ST7735, etc., which have fixed initialization commands. Therefore, there was no need to implement variability in the initialization process.
Frankly speaking, LovyanGFX's support work for SSD1963 is incomplete.
I supported SSD1963 at the request of a user, but I do not understand the specification in detail. Also, since I only own one, I have not been able to test the support for multiple different resolutions at all. In that sense, I feel the need to purchase another SSD1963.
One last thing for my understanding, does Parallel16 require a certain data format? For example, the SSD1963 has the data format below. Does your library work with when using 8 bits for every color as shown, requiring three cycles? Or, does it only work for 565 format, requiring one
Although the LGFX is capable of supporting both RGB565 and RGB888, Panel_SSD1963 has fixed it to only RGB888. I've already forgotten the reason for this restriction. Probably because I couldn't find a way to switch the mode of SSD1963 at runtime during my previous support work. This constraint is implemented by setColorDepth_impl, so commenting out this function will allow you to change it at runtime.
gfx.setColorDepth(16); // RGB565
gfx.setColorDepth(24); // RGB888
…I'll still buy another SSD1963. I was convinced that I would need it in order to proceed with the discussion with you.
…I'll still buy another SSD1963.
Sounds good. I'll sponsor you to help pay for it.
We can improve this driver together and complete the work. I'll post what I learn later this week. Just let me know when you get a chance to work with the hardware.
@JeremiahGillis Sorry for the late reply. I Updated LovyanGFX develop branch. SSD1963 now works with ESP32-S2 Bus_Parallel16. This has been confirmed to work on a panel I have owned for some time.
And, I have obtained a 480x272 panel from BuyDisplay that is identical to the panel you own. I will begin to confirm that it works in the near future.
@JeremiahGillis I just updated the develop branch again. It now automatically adjusts timing parameters based on resolution.
I have successfully gotten the EastRising panel to work. I am able to display it probably without any problems.
@lovyan03 Sorry for the delay, I was traveling for work. Thanks for the changes! I can confirm the changes work with my screen in both Parallel 8 and 16. Your implementation is much better for anyone who might need to change the screen timings.
I'll let you know if I find any other issues. I see that you started to make changes for ESP32-S3
. Do you have an idea when you might add Parallel 8 & 16 support? I plan to move this project to an ESP32-S3
when I create a PCB.
@JeremiahGillis I greatly appreciate your support for me ! I am also pleased that the library updates I have made have been helpful to you.
I would like to start work on the ESP32-S3 parallel as soon as possible, preferably within a month, but I do not yet know how long it will take to complete. I have a lot to look into because S2 and S3 have completely different DMA peripheral mechanisms.
I would like to proceed in a manner that meets your expectations.
@lovyan03 The sooner the better for me. Obviously you have a lot going on and we are at your mercy. I appreciate everything you have done so far!
I tried to direct message you on twitter, but it says you cannot be direct messaged. When you have a moment, please view my GitHub profile, get my email address, and contact me. I would like to propose something privately.
@JeremiahGillis Thank you very much ! I now follow you on Twitter. You can now send me DMs.
I am using an ESP32-S2-DevKitM-1 with an SSD1963 controller and a 480x272 Display. I encounter the issue in the video below. The second part of the video is slowed down to help identify the issue.
https://user-images.githubusercontent.com/13179985/152696489-5335b128-8249-4746-b2ce-c9f14776b1ef.mp4
You can see that frame pauses and all pixels start to turn white. When the display starts to function correctly again, the block jumps forward to where is was supposed to be without any issue. This tells me that
loop()
is executing periodically.I have tried different example projects and encounter the same issue. It is more prevalent on darker backgrounds. I can see that the backlight is not flickering. The voltage at the SSD1963 Controller Board does fluctuate a bit, but remains at least at 3.0 V. I have supplied 3.3V from power supply and that doesn't help. Right now the boards are connected together with 6" jumpers. This isn't ideal but should still work for testing prior to a board layout.
Here is a screenshot of the WR pin from my oscilloscope:
I can get detailed data of all the important pins with my Seleae Logic Pro if needed. I am using
Ardunio IDE 2.0.0-rc3
withESP32 Arduino 2.0.2
andLovyanGFX 0.4.12
.Does anyone know what the problem might be?
Sketch: