Problem with Touchscreen

It works only after switching on and then not always. After reboot does not work.

  1. Arduino Due is a Chinese clone.

  2. Screen - https://www.geeetech.com/wiki/index.php/3.2TFT_LCD
    3.2" Color TFT LCD 320 x 240 Resolution 65,536 Colors (16 Bit)
    Powerful 16 Bit Microcontroller(SSD1289) Built-in video RAM buffer
    Integrated Resistive Touchscreen Integrated SD card 5V Operating Voltage
    LED Backlight
    The touch IC is XPT2046
    https://misc.ws: LCD_ID_Reader Version 1.2 It produces the code: 0x8989

  3. No Adapter shield.

  4. Wires checked for contact. Replaced several times. The problem is not in them.
    UTFT myGLCD(TFT_PROC, TFT_PIN_RS, TFT_PIN_WR, TFT_PIN_CS, TFT_PIN_RST); // Remember to change the model parameter to suit your display module!
    #define TFT_PROC ITDB32S //3.2
    #define TFT_PIN_RS 38
    #define TFT_PIN_WR 39
    #define TFT_PIN_CS 40
    #define TFT_PIN_RST 41
    #define TFT_PIN_RD 42
    Data pin D0-D7 -> 30-37, D8-D15 ->22-29

URTouch myTouch(TS_PIN_CLK, TS_PIN_CS, TS_PIN_IN, TS_PIN_OUT, TS_PIN_IRQ); // Initialize touchscreen
UTFT_Buttons myButtons(&myGLCD, &myTouch); // Finally we set up UTFT_Buttons :slight_smile:
#define TS_PIN_CLK 53 //URTouch(byte tclk, byte tcs, byte tdin, byte dout, byte irq);
#define TS_PIN_CS 49
#define TS_PIN_IN 51 //MOSI
#define TS_PIN_OUT 50 //MISO
#define TS_PIN_IRQ 48

  1. URTouch v 2.02

  2. I have a very large code, so my questions relate to examples provided with the library.

In this case, the touchscreen only works when the power is turned on, and then in 80%.
When overloaded, the touchscreen does not work.

TFT 3.2.jpg

Go on. 41 posts. You should know how to use the Forum.

  1. post link to your actual Due
  2. post link to your actual screen
  3. post link to any Adapter shield (if used)
  4. or photo of actual wiring if you are not using commercial shield.
  5. UTouch has been replaced by URTouch for several years.
  6. post "buildable" code. Your earlier question had several "coding" errors e.g. wrong array size, wrong function use, ...

It takes you 10 - 20 minutes to write a question and provide relevant information.
For this effort, you will get useful replies. Often a solution in the first reply.

If you write a 1 minute question, you have to wait for hours for any reply. Which tends to ask for the information you could have provided in the first place.

David.

Good afternoon.
Thanks so much for the valuable comments.

Can I use a different set of libraries?

Wrote everything that was asked.
Help someone.

It is fine to edit a historic post. Just make as BIG NOTE in the edit.
And post a new message to explain your edit. (you did not edit #0 until 10 days after my request in #1)

Your UTFT constructor looks fine. I would expect all the examples to work 100% with that constructor.

Your URTouch constructor looks fine. Please post the results from the Calibration sketch.

URTouch can only bit-bash in software. You can use any GPIO pins.

If you want to use the SD card you need to use the Hardware SPI pins (74-76) on the 3x2 SPI header.
It also means that you have to use a proper hardware SPI Touch library e.g. XPT2046_TouchScreen.h

David.