SSD1289 Touch issues When repowering or Resetting

I have a Sainsmart 3.2 touch LCD and shield.

Knowing what I know now, I would never rebuy anything Sainsmart, but too late now.

First issue I had was blurry images, which was resolved by modifying the SSD1289 driver in the UTFT Drivers.

The picture is clear now. I did touch calibration sketch (changed the screen to SSD1289) and loaded the calibration in the URtouchCD.H file.

The issue I am having now is:

I then load quick paint example and change the screen to SSD1289, then upload.

After I compile and load the program everything is working as expected.

THE ISSUE


BUT...After you reset or re power, the screen looks great, but the touch function is all messed up.

If you select somewhere on the screen only the top left is showing colors and not where you press.

If you reload the program again, it will work until you repower or reset again. Then touch is messed up.


I know Sainsmart is sainshit, but I have it now, its too late and want to get it to work.

IF anyone can help I would be very appreciated.

video of issue at

Matt

Just initialise the Touch twice. That will probably put the XPT2046 chip straight again.

I presume that you are using a proper 40-pin display Adapter Shield. Examine both Display and Adapter for incorrect jumpers, solder splashes, bad joints etc.

David.

I have tried to use the command
myTouch.InitTouch();
a second time as well as add delays just before and just after it.

not change to the issue. After upload it works, if I cycle power it is messed up until I reload. its very strange.

That seems very odd. The URTouch library just bit-bangs the XPT2046. Receives the raw touch position from the physical panel.
Then the raw X,Y is adjusted according to calibration and rotation. You see the puxel coordinates.

So I suggest that you diagnose what the raw X, Y values are. Do they make sense?
Are they different at Reset?

Note that the Due board does not Reset properly.
The Mega2560 works fine.

David.

As odd as is sounds, the XY coordinates are significantly different after re-powering compared to uploading.

Oddly enough, if I over write a different program, the first time I upload it functions the same as after a power up. If I upload a second time it works normally until I repower.

I have tried a NEW GENUINE Arduino Mega 2560 with the same results. The research I have done is telling methat the issue is likely the sainsmart shield, and Henning will not support anything sainsmart (for which I do not blame him), so I am basically waiting to get a new shield delivered from a source that Henning supports.

I have read the documents and now picked one he recommends from ITEAD, but am waiting for delivery.

Needless to say I wish I knew a little more before ordering. But in my case the research didn't start until I ran into issues.

Many people own 40-pin SSD1289 / ILI9341 Displays with an appropriate Adapter Shield for a Mega2560.
I do not own one.

The Touch is controlled by XPT2046 or equivalent Touch Controller chip. They all have the same pinout and basic commands.

I suggest that you run a simple Touch sketch that displays the Raw ADC values returned by the XPT2046 on the Serial Terminal. Do you get consistent values for X, Y?

Examine the soldering on the Sainsmart Adapter. They have a reputation to uphold.
Also examine the soldering on your 40-pin display. Do you have good connections between the bare XPT2046 pins and the 20x2 header?

Quite honestly, there is not much to go wrong. If the Touch glass is not broken and the chip is well soldered, everything should be fine.

David.

Same problem here, Mega 2560 and Sainsmart SSD1289. Works fine on upload, goes bonkers after a power cycle.

Hi!
I'll start by stating that I realize this post is old but I'm responding to help other users who may be attempting to use this same display.

I have the same Sainsmart LCD and was having the same problems until I stumbled across some feedback on Amazon from a different users of the same screen. I had been using the standard libraries that the seller instructions mentioned on Amazon. The other user mentioned to use <UTouch.h> and <UTouchCD.h> instead of <URTouch.h> and <URTouch.h>.
As soon as I made that simple change, my project worked perfectly!