ESP32-S3 ST7796 Parallel #1824
Replies: 4 comments 6 replies
-
I need more information to spot what you may have done wrong. I have it working with this setup:
This is the output of the Read_User_Setup example sketch@
|
Beta Was this translation helpful? Give feedback.
-
All I can say is wow.....After investigation, using pins>31 adds a high level of complexity. Regardless, I made some changes in case anyone else required the parallel bus to be on pins >31:
You can see I removed the use of PARALLEL_INIT_TFT_DATA_BUS because this would use a 64bit mask / 2 x 32 bit masks (one for each GPIO.out_w1tc struct) and went with the slower 'define set_mask(C)' in order to save on memory. In addition, I used two sets of masks for the pins (those in 0-31 and those in 32-53) and revised the tft_write functions accordingly. Of course, this will be literally twice as slow as I'm having to write the masks to IO twice - but it's working. Luckily, my pins are split D0-D3 > 31, D4 - D7 <32 so the code at least looks neat. My only problem now is that no matter what I do, I can't get the screen to map correctly. I know the above is working because the screen initialises and commands work - including colors being displayed correctly (if the mask/remapping above was wrong, all the commands would be gibberish!): The screen is supposed to be 480x320, and the red rectangle is drawn this size - you can see that it's offset and truncated. 0,0 should be the top left of the screen, but it's actually the top right of the red rectangle. Rotation aside, I've attempted to change the column/row mapping without any results. Any pointers anyone? Thanks in advance for all of your help, it's greatly appreciated. |
Beta Was this translation helpful? Give feedback.
-
Any news on this? I have a similar question related to the WT32-SC01 plus display which also uses paralel 8 bit but also above 32 pin assigned to databus. https://www.antratek.com/media/wysiwyg/pdf/WT32-SC01-Plus-V1.3-EN.pdf Description | Module Pin | Remark |
Beta Was this translation helpful? Give feedback.
-
Hi, Sorry for the late reply. You need to edit the appropriate header file for your CPU. I've attached my adjusted ESP32 S3. Most of the code already has support for pins > 31 - e.g.:
However, you'll need to make the most changes when pushing data to the 8 bit bus. A single byte is used to load the 8 bits - In the code below, you can see that I've added a second mask as my 8 bit bus uses 4 pins <32 and 4 pins > 31:
Likewise, when sending the data, the second mask requires adding.
This works fine - but every data write is now has 2 operations instead of 1, so there's a performance impact. I wasn't needing anything crazy like 30fps (just updating real-time data every 500ms) so it didn't matter. Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
Hi Everyone,
I'm attempting to get this library working on an S3 with ST7796 in Parallel mode.
Previously, I had great success with an S2 and IL9341 - the entire project (which includes RS485, rotary encoder, buttons, etc.) all work perfectly without any changes - I was hoping the S3 wasn't so different when it comes to getting the LCD operating.
I have proof that the S3/ST7796 Parallel 8080-8 combination operates because some low level driver code was written and tested using LVLG.
At present I get a blank white screen. I've verified the pin mapping (with the LVGL example). At present, the only obvious problem is that I have no TFT_RD pin and I'm unsure what to do regarding that.
#499 mentions 7796 and parallel but I'm not sure if anything came of it.
Any hints?
Thanks in advance for your time and effort.
Beta Was this translation helpful? Give feedback.
All reactions