Help needed ILI9488 with touch display

For general Flowcode discussion that does not belong in the other sections.
MJU20
Posts: 336
http://meble-kuchenne.info.pl
Joined: Tue Dec 08, 2020 5:11 pm
Has thanked: 93 times
Been thanked: 67 times

Help needed ILI9488 with touch display

Post by MJU20 »

Hello there,

After a lot of tinkering and solving various issues, I finally got my ILI9488 display to work. I encountered problems with the Dupont wires, which took hours of testing to identify. But now, the display part is functioning properly.

However, the touch functionality of the display isn’t responding. The touch chip is marked "hr2046," which indicates it’s likely an XPT2046 chip.

I followed the display's pin configuration and initially tried to connect the touch functionality to the same SPI bus as the display, with each having its own CS pin. This didn’t work, so I assigned dedicated pins on the ESP32_Wroom for each touch pin.

My test program is simple: it should flash the onboard LED of the dev board when the display is touched. Unfortunately, this doesn’t seem to be working.

Can anyone share their thoughts on the program and wiring for this display? Any suggestions for adjusting the settings, wiring, or the program itself?

Any help is appreciated.
TestMetTouch.fcfx
(17.78 KiB) Downloaded 132 times

chipfryer27
Valued Contributor
Posts: 1528
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 353 times
Been thanked: 549 times

Re: Help needed ILI9488 with touch display

Post by chipfryer27 »

Hi

No hardware so I can't really be of much help. I notice though that if I open your chart and try to run in simulation or even just compile to "C" Flowcode gives me warnings that the touch (xpt2046) has unconnected pins. Maybe double check pins are properly assigned? Also, do you need to set "Link To" from the touch to display?

Regards

Edit..
PS you only flash for 150mS. Your eyes must be better than mine to register that quick <s>

medelec35
Matrix Staff
Posts: 1913
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 619 times
Been thanked: 644 times

Re: Help needed ILI9488 with touch display

Post by medelec35 »

Hello.
I have noticed that you have not selected XPT2046 within properties and selected the display within the LinkTo.
Can you try that and see it touch then works?
Although I believe that only affect simulation.
Martin

MJU20
Posts: 336
Joined: Tue Dec 08, 2020 5:11 pm
Has thanked: 93 times
Been thanked: 67 times

Re: Help needed ILI9488 with touch display

Post by MJU20 »

Thanks to medelec35 and chipfryer27 for your help.

I am no longer receiving notifications from this forum whenever there’s a response to a post. I’ll have to look into this issue, as I hadn’t seen your replies.

Meanwhile, I’ve made some progress on this project but am still encountering a few strange issues.

- I have now placed both the display and the touch controller on separate SPI buses, which is working.
- I still don’t understand why it didn’t work when they were on one bus with separate CS lines.
- I used my logic analyzer to monitor the data on the bus, and I’m almost certain that the touch IRQ pin was going low with each touch. At the moment, however, this IRQ pin stays low after the first touch.
- The IRQ pin not reacting to touches might be something discussed on this forum. For the first touch, it’s HIGH, and then it goes LOW on the first touch, but it stays LOW after that (https://community.st.com/t5/stm32cubeid ... d-p/658862).
- The solution would be to disable the IRQ for communication and enable it afterward. This might need to be looked at within the XPT2046 component.
- I filed a complaint with AliExpress because I ordered a capacitive display but received a resistive one, which caused some confusion at first.

Anyway, I’m now getting X and Y coordinate readings from the display, but it seems like there’s a touch even when there isn’t one. This complicates the timing for correct sampling.

Resistive displays don’t seem as good, honestly. I hope AliExpress sends the capacitive one soon.

Thanks again for your suggestions—I really appreciate how you always come up with great ideas!

jgu1
Posts: 774
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 669 times
Been thanked: 173 times

Re: Help needed ILI9488 with touch display

Post by jgu1 »

Hi MJU!

I have a setup with ESP32 and a Ili9488 diplay I use as standerd when I start a project, and it work and you can test the different thing´s. I can share if you want?

Br Jorgen

jgu1
Posts: 774
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 669 times
Been thanked: 173 times

Flowcode v10 Re: Help needed ILI9488 with touch display

Post by jgu1 »

Hi Mju!

I have a testprogram with an ESP32 and an Ili9488 I use as standard startup test program when I start a new project. I work, I can share if you want?

Br Jorgen

MJU20
Posts: 336
Joined: Tue Dec 08, 2020 5:11 pm
Has thanked: 93 times
Been thanked: 67 times

Re: Help needed ILI9488 with touch display

Post by MJU20 »

Hey JGU1,

Thanks, I've got the display running. But I'm not that happy with the resistive touch screen.
I've ordered a capacitive one and hoping to test this soon.

chipfryer27
Valued Contributor
Posts: 1528
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 353 times
Been thanked: 549 times

Re: Help needed ILI9488 with touch display

Post by chipfryer27 »

Hi MJU20

Interested in reading your comparison when it arrives.

Regards

MJU20
Posts: 336
Joined: Tue Dec 08, 2020 5:11 pm
Has thanked: 93 times
Been thanked: 67 times

Re: Help needed ILI9488 with touch display

Post by MJU20 »

It arrived :-)

First test works fine! Much better then the resistive one...
The file is just a test so don't bother diving into it..
ILI.jpg
ILI.jpg (232.1 KiB) Viewed 5504 times
Attachments
Capacitive1.fcfx
(24.23 KiB) Downloaded 106 times

jgu1
Posts: 774
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 669 times
Been thanked: 173 times

Re: Help needed ILI9488 with touch display

Post by jgu1 »

Hi MJU!

Thank you for sharing. I like to give it a go with capasitiv touch, will you share the link to the seller :)

THank in advanse.

Br Jorgen

Post Reply