300x250 AD TOP

Search This Blog

Paling Dilihat

Powered by Blogger.

Thursday, July 28, 2022

Using the ILI9488

The ILITEK ILI9488 is one of the larger and cheaper SPI displays available to the maker community,, available in 3.5" and 4". However, there are a few workable issues that prevent this display from being great.


Specifications

What's called ILI9488 is actually the LCD controller with an optional touch panel, you can mostly find it with XPT2046 resistive touch controller.

ILI9488 (datasheet):
- 3/4 wire SPI, software configurable
- 480x320 Pixels
- 3 modes supported: 16bit (65k colors) / 18bit (262k colors) / 24bit (16.7m colors)

XPT2046 (datasheet):
- 12bit 125khz resistive touch panel
- pressure sensitive
- temperature sensor
- 4-wire SPI
- Supports touch interrupt

5v to 3.3v regulator, please note that you should short J1 if you're using 3.3v




General Issues


The ILI9488 can be bought in two versions, one with a diode and one without, I've yet to determine the functionality of the diode, but it seems that others think the diode can prevent the display from releasing the MISO line, unfortunately I didn't keep the diode so I can't validate this claim.

The schematics are available if you want to explore it further.



LVGL Issues

When I first started working with my ILI9488 the colors were a bit off but I attributed it to cheap and low quality display which was probably defective. but then I've started wondering if its possible to fix since the controller can be configured with other voltages it pushes to the panel. 

Original Configuration (16 bit)

Once I've discovered the setting, I've changed the brightness and changed how RGB565 is parsed into the format ILI9488 expects. note its not the most optimized way, but the modification was good enough for my tests.

After the modifications


I wanted to see if the display will work at 80Mhz, unfortunately its not, but seeing some of the graphics I guess that it can be fixed with a logic analyzer and some patience.

80Mhz



ESP32 Specific Issues

While it might not be specifically ESP32 issues, its issues that you might encounter while integrating it with ESP32. The most prominent issue is the way CS works in ESP32, it seems that CS issues are common in the embedded world, the STM32 has a similar issue with NSS not properly controlled by the cube's code.

To support multiple transactions with multiple devices on the same SPI bus, the ESP32 switches off the CS signal between transactions which is great, however, the way ILI9488 works is that if you switch off CS after you've sent a read request, it switches from 4-wire SPI to 3-wire SPI. 

There are a few ways to solve this issue:
1. Use software CS, set to low before a transaction and set to high after you're done receiving.
2. Use the new SPI_TRANS_CS_KEEP_ACTIVE flag for transactions.

But wait, what's the problem with working half duplex (3-wire)? 
Well, if you share the same SPI bus with the touch panel it locks the MISO line on LOW and won't allow the touch panel from transmitting touch data.

Solutions?

Well, I've given up on getting data from the display and for most uses its good enough, so you can disconnect the MISO line from the display and keep it working for the touch panel.

Another possibility is to put a 1k resistor in series to the display MISO. This way the panel won't lock the touch and you can keep the buggy code until you can get it fixed to your satisfaction.

Unfortunately working in half-duplex is not currently possible if you're using the LVGL driver since it will attempt to set the bus to 4-wire mode for the touch panel to work.



Tags: , , ,

0 comments:

Post a Comment