-
Hi, folks I recently bought this kit I want to code using micropython. The code in repo micropython-nano-gui looks perfect for what I want to do. The micropython version I'm running is ESP32_GENERIC-SPIRAM-20241129-v1.24.1.bin. I have not been able to draw successfully. My file color_setup.py is:
In main.py I have:
All the other files were downloaded from github in the last couple of days. When I run the code the screen flashes as the back light is turned on. Any suggestions/ideas would be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 14 comments 4 replies
-
I can't see any errors here and your general approach looks spot-on. I tend to find that a completely blank display (rather than corruption etc.) is usually down to a wiring problem. |
Beta Was this translation helpful? Give feedback.
-
Peter, apologies for this long message. A character fault of mine ... I'm confused too. Potentially, the Waveshare Pico you refer to is an example.
Not definitive, but this strongly suggests the Waveshare Pico does not use an ILI9488. The display I bought from Thingpulse does not have ILI9488 printed on it. When I was trying to debug my display not working I spotted commands "All Pixels OFF" (0x22) and "All Pixels ON" (0x23) in the 9488 specification. Just now, I checked the ILI9486 and ST7789 specs I do not see these two commands. My next step was to read through the sample Arduino/C++ app provide by my hardware vendor. I found the driver TFT_eSPI always write 3 bytes via SPI using this macro:
They do this for both the ILI9486 and ILI9488. I modified your driver to do the same and changed the 0x3a command to have data 0x66. I really can't tell you anything else. I am happy because I have my display working. Since I benefit from you providing these drivers, I would like to give back if I can. |
Beta Was this translation helpful? Give feedback.
-
The ST7789 is rated at 240x320 max, wherease the WS display is 480x320 (based on datasheets of both chips). I can therefore categorically state that they are not using ST7789. Alas Waveshare's documentation is frequently, er, sub-optimal. We end up with the following observations:
In the absence of definitive information on what you are driving, I wouldn't accept a PR. I need a manufacturer's datasheet to validate any driver. |
Beta Was this translation helpful? Give feedback.
-
Peter, I understand your reasoning. We have two vendors claiming they are using an ILI9488 yet the behaviors are different. How do you feel about naming the driver thingpulse_grande.py (or similar) and clearly identifying the driver is specific to this kit? |
Beta Was this translation helpful? Give feedback.
-
Well both may be wrong :) My problem is that I cannot support a driver when I don't own the hardware; a problem magnified by the fact that the display driver chip is unknown (and demonstrably not what the manufacturer claims). If you publish your driver I will link to it in |
Beta Was this translation helpful? Give feedback.
-
Peter, please be patient with me ;-) I spent quite some time looking at the ILI9488 and ILI9486 specs.
The bullet for 565 should not have been included. Note that 4.7.2.1 describes a 3 bit per pixel format and 4.7.2.2 an 18 bit per pixel format. The Waveshare page says under section Pinout:
On the Waveshare page I found the waveshare schematic for their board. The board I have from Thingpulse uses the SPI pins on the ILI9488. I believe this explains why 5-6-5 works for Waveshare but not for Thingpulse. Looking at the ILI9486 spec the same is true. |
Beta Was this translation helpful? Give feedback.
-
You have clearly gone into this quite deeply - I hadn't seen that schematic. I have encountered the use of SPI to parallel converters on some of their displays. I believe this is done for the Arduino community to achieve high speed and 5V tolerance. The question at issue is whether a consequence of this design is to provide support for RGB565 which would otherwise be absent. I still have doubts that the ILI9488 does not support RGB565 on SPI. I could expand on my reasons but there is little point: it either does or does not. I'm adopting the empirical approach. I've ordered a board from eBay. It comes in two versions, a 4.0" board with ILI9486 (which I already have) and a 3.5" with ILI9488. We'll see if the 3.5" version works with my driver. It's evident from the PCBs that neither has chips for parallel conversion. I'll report back when the board arrives and I've had a chance to test it. |
Beta Was this translation helpful? Give feedback.
-
Just to keep you posted I'm still waiting for this display. The vendor dispatched it over a week ago, sadly with Evri. I've asked him to chase them. |
Beta Was this translation helpful? Give feedback.
-
The display has arrived and, as you predicted, it does not work with the ILI9486 driver. Please could you submit a PR with your driver. I suggest we simply name it |
Beta Was this translation helpful? Give feedback.
-
Hi Peter, I will have a pull request later in the week. In your documentation you should make it clear that someone using an ILI9488 with a parallel interface will be better off using the ili9486 driver. |
Beta Was this translation helpful? Give feedback.
-
Hi Carl, Apologies if you already know what follows, but the frequency of an SPI interface is typically lower than that specified in the code. To find the actual clock rate for speed testing, issue I look forward to trying your driver. |
Beta Was this translation helpful? Give feedback.
-
Hi Carl, As a matter of interest did you consider an approach whereby the LUT remained RGB565, with expansion to 18 bit occurring in the Viper code? Although off the top of my head I think your approach is probably cleanest. |
Beta Was this translation helpful? Give feedback.
-
Peter, I added some comments to the pull request. |
Beta Was this translation helpful? Give feedback.
-
Answering my own question. No, it seems I was the first person to try using ThingPulse ESP32 Color Kit Grande. I worked with Peter to develop a new driver specifically for the ili9488 in SPI mode. Some vendors do serial to parallel conversion on their display board. Thanks Peter, for helping me get this board working. |
Beta Was this translation helpful? Give feedback.
Answering my own question.
No, it seems I was the first person to try using ThingPulse ESP32 Color Kit Grande.
I worked with Peter to develop a new driver specifically for the ili9488 in SPI mode.
The ili9488 only supports 5-6-5 pixel format (2 bytes per pixel) when using a parallel interface,
When using SPI a 6-6-6 pixel format (3 bytes per pixel) is required.
Some vendors do serial to parallel conversion on their display board.
So even though the microcontroller is using SPI the ILI9488 will support the 5-6-5 pixel format.
In this case the ili9486 driver can be used.
Writing 3 bytes per pixel is slower than 2 bytes per pixel.
So, the il9486 driver is preferred when it works.
Thanks Pete…