I have 3 ili9341 glcd and can not get touch to work...I have tried so many times to get the xpt2046
demo to respond to touch. screen display is fine.
The ili9341 displays have xpt2046 chip.
I have to use logic level converter so all pins are 3.3v logic except irq which goes low when screen touched
Image of connections-
I tried using software spi for screen and touch and I am getting dots and x,y results
but the screen seems inverted as touch positions.
It's astart and suggests there's something wrong with my wiring,
although hardware spi works for the display..software is much slower.
seems I can't use hardware spi for display and software spi for touch...
which is what arduino do for this display ie bitbang the touch.
Get back on this. shows display touch works.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Using portrait the touch demo works quite well using software spi.
The pen touch is near. using a finger gives dots under finger so precise enough to use
for "buttons". Really nice demo.
How to get it to work with HardwareSPI is my problem.
as I said HardwareSPI graphics work fine...and quite fast but using HardwareSPI touch
does not work..althouh the screen display works.
anyway to play with this now it works..sort of.
How to rotate the screen and touch co-ordinates to match...answers on a postcard.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's nice when it works but I tried 3.3V vin nano and loads of time doing hardware spi
but software spi works. It's interesting. https://youtu.be/U7jrMP0MwD8
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
#defineGLCD_DCDIGITAL_8' Data command line #define GLCD_CS DIGITAL_10 'Chipselectline#defineGLCD_RESETDIGITAL_9' Reset line #define GLCD_DI XPT2046_DI DIGITAL_12 'Datain|MISO#defineGLCD_DOXPT2046_DODIGITAL_11' Data out | MOSI #define GLCD_SCK XPT2046_SCK DIGITAL_13 'ClockLine
all lines are 3.3V logic.
#defineGLCD_DIXPT2046_DIDIGITAL_12' Data in | MISO #define GLCD_DO XPT2046_DO DIGITAL_11 'Dataout|MOSI#defineGLCD_SCKXPT2046_SCKDIGITAL_13'ClockLine
are joined. do I need some resistors in the lines?
Last edit: stan cartwright 2020-09-28
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If clock,mosi and miso are shared then it's down to cs lines to select spi...so I read.
not a clue as it's complicated but is explained and I can see it in action in the gcb includes.
Was ili9341 actually tested for touch?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have 3 ili9341 glcd and can not get touch to work...I have tried so many times to get the xpt2046
demo to respond to touch. screen display is fine.
The ili9341 displays have xpt2046 chip.
I have to use logic level converter so all pins are 3.3v logic except irq which goes low when screen touched
Image of connections-
I tried using software spi for screen and touch and I am getting dots and x,y results
but the screen seems inverted as touch positions.
It's astart and suggests there's something wrong with my wiring,
although hardware spi works for the display..software is much slower.
seems I can't use hardware spi for display and software spi for touch...
which is what arduino do for this display ie bitbang the touch.
Get back on this. shows display touch works.
Using portrait the touch demo works quite well using software spi.
The pen touch is near. using a finger gives dots under finger so precise enough to use
for "buttons". Really nice demo.
How to get it to work with HardwareSPI is my problem.
as I said HardwareSPI graphics work fine...and quite fast but using HardwareSPI touch
does not work..althouh the screen display works.
anyway to play with this now it works..sort of.
How to rotate the screen and touch co-ordinates to match...answers on a postcard.
It's nice when it works but I tried 3.3V vin nano and loads of time doing hardware spi
but software spi works. It's interesting. https://youtu.be/U7jrMP0MwD8
I tried this in the touch demo. Draws on the screen..but x,y seem inverted
but really simple.
Why does the ILI9341 328p xpt2046 touch demo use TFT_NAVY
instead of ILI9341_NAVY when I've used #define GLCD_TYPE GLCD_TYPE_ILI9341 ?
GCB is so intrigueing.
https://www.youtube.com/watch?v=YwXN9Wq3H44&feature=youtu.be
In my original post the wiring is as suggested ie
all lines are 3.3V logic.
are joined. do I need some resistors in the lines?
Last edit: stan cartwright 2020-09-28
How to use hardware spi for the display and bitbang the touch connections like arduino do...
what I read.
If clock,mosi and miso are shared then it's down to cs lines to select spi...so I read.
not a clue as it's complicated but is explained and I can see it in action in the gcb includes.
Was ili9341 actually tested for touch?