Paralell TFT w/ SPI 2046 touch on DUE

Folks, I am trying to use a 16 bits parallel display (ST7796) with a SPI touchscreen (XPT2046) attached on Arduino DUE. The display works well but no way to get the touchscreen working... I think the reason is why there is no SPI pins on the 2x18 pinhead right side DUE connector. Does anybody face out this problem already ? Thanks

The display is this one:
http://www.lcdwiki.com/3.95inch_Arduino_Display-Mega2560

Ooops.... already fixed using URTouch library...

Antonio , which one driver you use ?

Hello,
have anyone else this display?

http://www.lcdwiki.com/3.95inch_Arduino_Display-Mega2560

The display works well but I stuck with Touch.Who can show me one example for touch .

The touch use Tclk (52) , Tcs (53) , Tdin (51) , Rdout (50) and Tirq (44)

David P. :I try MCUFRIEND_kbv , but TouchScreen ts = TouchScreen(XP, YP, XM, YM, 300); is not corresponding.

You should use XPT2046_Touchscreen.h or URTouch.h library for this shield.

The TouchScreen.h library is for Resistive screens (without controller)

David.

I try URTouch and it works , but it works only with UTFT driver ILI9481 and the picture is reverse.
I should use ILI9488 or ST7796 but I have white screen.

Whit XPT2046_Touchscreen I am confused .I don't know to setup. Please can You show me TouchTest.ino ?

No, UTFT does not support ST7796

Install XPT2046_Touchscreen via the IDE Library Manager.

There should be examples.
If you have a problem with an "example", quote library example name

Your link shows a shield with USE_MEGA_8BIT_PORTC_SHIELD with MCUFRIEND_kbv (needs Beta from GitHub)
If you configure for 16-bit you can use USE_MEGA_16BIT_SHIELD with MCUFRIEND_kbv.

The 16-bit display should work with many other libraries.

David.

Hello David ,

yes I use 16 bit Shield .

And I start with XPT2046_Touchscreen .
I have correct reading of x and x bat it works only without T_IRQ.Is it OK ?

#include <XPT2046_Touchscreen.h>
#include <SPI.h>

#define CS_PIN  53
// MOSI=11, MISO=12, SCK=13

XPT2046_Touchscreen ts(CS_PIN);
//#define TIRQ_PIN  44
//XPT2046_Touchscreen ts(CS_PIN);  // Param 2 - NULL - No interrupts
//XPT2046_Touchscreen ts(CS_PIN, 255);  // Param 2 - 255 - No interrupts
//XPT2046_Touchscreen ts(CS_PIN, TIRQ_PIN);  // Param 2 - Touch IRQ Pin - interrupt enabled polling

void setup() {
  Serial.begin(38400);
  ts.begin();
  ts.setRotation(1);
  while (!Serial && (millis() <= 1000));
}

void loop() {
  if (ts.touched()) {
    TS_Point p = ts.getPoint();
    Serial.print("Pressure = ");
    Serial.print(p.z);
    Serial.print(", x = ");
    Serial.print(p.x);
    Serial.print(", y = ");
    Serial.print(p.y);
    delay(30);
    Serial.println();
  }
}