Hi
I am experimenting with the ili9341 display but the touch part seems to have bug
I just made this very simple program to test the touch.
here is what I get on the serial output
there seem to be 4 problems
1, Sample sensor always return 1 even if the screen is not touched
2, X coordination never gives output value
3, Y gives the X and Y coordination ( if I go from left to right value change also changes if I go from up and down )
4, Pressure never goes to 0 even if the display is not touched
I am using STM23F407
Any help please
XPT2046 Touch with ILI9341 Display
-
- Posts: 118
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 03, 2020 7:23 pm
- Has thanked: 34 times
- Been thanked: 16 times
-
- Matrix Staff
- Posts: 1707
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 435 times
- Been thanked: 598 times
Re: XPT2046 Touch with ILI9341 Display
Hello,
I've used this touch device recently but I'll have another look for you.
Your program looks a bit odd you call initialise and then sample with no loop. Is the initialise being called again and again. Ideally you should only call it once and then you can call sample again and again.
I've used this touch device recently but I'll have another look for you.
Your program looks a bit odd you call initialise and then sample with no loop. Is the initialise being called again and again. Ideally you should only call it once and then you can call sample again and again.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: XPT2046 Touch with ILI9341 Display
Hi Ben
This is a test macro, the loop is outside I removed the init from the loop
but I get the same results, if you say it's working fine at your side then maybe
I got a faulty display.
This is a test macro, the loop is outside I removed the init from the loop
but I get the same results, if you say it's working fine at your side then maybe
I got a faulty display.
-
- Matrix Staff
- Posts: 1707
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 435 times
- Been thanked: 598 times
Re: XPT2046 Touch with ILI9341 Display
Have you tried changing the analogue mode property setting?
Maybe also worth trying a software based SPI bus or playing with the prescale to make sure the SPI isn't going too fast?
Maybe also worth trying a software based SPI bus or playing with the prescale to make sure the SPI isn't going too fast?
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel