Menu

Ili9341 touch

Help
2020-09-28
2020-09-29
  • stan cartwright

    stan cartwright - 2020-09-28

    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-

     
  • stan cartwright

    stan cartwright - 2020-09-28

    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.

     
  • stan cartwright

    stan cartwright - 2020-09-28

    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.

     
  • stan cartwright

    stan cartwright - 2020-09-28

    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

     
  • stan cartwright

    stan cartwright - 2020-09-28

    I tried this in the touch demo. Draws on the screen..but x,y seem inverted
    but really simple.

        GLCDRotate Portrait
        GLCDCLS TFT_NAVY
    do
    GetXY_XPT2046( XTouchPoint_XPT2046, YTouchPoint_XPT2046 )
    pset ( XTouchPoint_XPT2046, YTouchPoint_XPT2046,TFT_YELLOW )
    wait 10 ms
    loop
    

    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

     
  • stan cartwright

    stan cartwright - 2020-09-28

    In my original post the wiring is as suggested ie

        #define GLCD_DC       DIGITAL_8           ' Data command line
        #define GLCD_CS       DIGITAL_10          ' Chip select line
        #define GLCD_RESET    DIGITAL_9           ' Reset line
    
        #define GLCD_DI  XPT2046_DI     DIGITAL_12          ' Data in | MISO 
        #define GLCD_DO  XPT2046_DO     DIGITAL_11          ' Data out | MOSI
        #define GLCD_SCK XPT2046_SCK     DIGITAL_13          ' Clock Line
    

    all lines are 3.3V logic.

     #define GLCD_DI  XPT2046_DI     DIGITAL_12          ' Data in | MISO 
     #define GLCD_DO  XPT2046_DO     DIGITAL_11          ' Data out | MOSI
     #define GLCD_SCK XPT2046_SCK     DIGITAL_13          ' Clock Line
    

    are joined. do I need some resistors in the lines?

     

    Last edit: stan cartwright 2020-09-28
  • stan cartwright

    stan cartwright - 2020-09-28

    How to use hardware spi for the display and bitbang the touch connections like arduino do...
    what I read.

     
  • stan cartwright

    stan cartwright - 2020-09-29

    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?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.