Go Down

Topic: utouch ssd1963 5 inch problem (Read 8 times) previous topic - next topic

doc_norway

How about actually reading the UTouch manual, and especially the part about calibrating.

Proper calibration of the touch screen is REQUIRED when using anything other than a 3.2" display module and may be required even with those as there are minor difference in every single touch screen.

With proper calibration the getX() and getY() functions will be scaled correctly.

/Henning

HazardsMind

He's right, I completely forgot about the calibration sketch. The offset values for X and Y need to be calibrated. Once you calibrate the screen with the touch pad, it will give you offset values that you need to change.
My GitHub:
https://github.com/AndrewMascolo?tab=repositories

JHawk88

I read the manual and did the calibration a long time ago.  I went ahead and did it again for doc_norway's sake.

The values:
CAL_X: 0x01F5C7C2
CAL_Y: 0x01FE4837
CAL_S: 0x001DF31F

Just by looking at those values, I shouldn't have to tell you that that just messed it up worse.  Wouldn't be asking these questions if I hadn't already gone through the manual....thank you.  So back to the original question.  How can I map my display?
Remember remember, the 4th of...July!  Duh.

doc_norway

CAL_S: 0x001DF31F


This line tells me that you have not followed the instructions in the manual.
If you had set the TOUCH_ORIENTATION correctly it should be 0x8031F1DFUL.

From the UTouch manual: 3.   Make sure the TOUCH_ORIENTATION define is correct. You can find a list of the correct parameter for all the tested displays in the UTouch_Supported_display_modules PDF.

From the UTouch_Supported_display_modules.pdf:





ModuleTOUCH_ORIENTATION
ITDB02-5.0LANDSCAPE
TFT01-5.0LANDSCAPE
5.0" TFT LCD ModuleLANDSCAPE

Notice the pattern? Every 5" module I have seen should have TOUCH_ORIENTATION set to LANDSCAPE...
This is also true for the module used in the video shown earlier in this thread.

/Henning

JHawk88

Orientation: Landscape
LCD Define: ITDB50 which 5.0"

Calibration Coords:
CAL_X: 0x020D87E0
CAL_Y: 0x01F54701 (Not so sure bout those last 2 digits)
CAL_S: 0x8031F1DF

Two times calibrate with slightly diff coords.

Did it work either time?  No.

X and Y read 799, 0 respectively all over the screen
Remember remember, the 4th of...July!  Duh.

doc_norway


CAL_X: 0x020D87E0
CAL_Y: 0x01F54701
CAL_S: 0x8031F1DF


The data you got here is normally in indication of a defective touch screen (or a completely incompatible display module)...

/Henning

guix

Sorry Henning, but I have to say that the calibration sketch doesn't work as it should (using the latest touch library).

I have a 3.2" display from Sainsmart (SSD1289). The default calibration values are OK, hopefully because when I try to calibrate it myself (and I'm very careful to press center of the crosses), the resulting calibration values are not accurate at all. So I use default values, they aren't perfect but it's OK for my use.

doc_norway

doesn't work as it should


This does not provide me with any information at all...

The calibration sketch have been tested on all the supported displays, but the SainSmart module will never be among them. SainSmart products are generally of so low quality that I say far away from them.

/Henning

guix

Sainsmart, Elecfreaks, Itead... same products, different names.

Anyway, it worked well with older version of Utouch, and you can see I'm not the only one to have problems with the calibration sketch.

doc_norway


Sainsmart, Elecfreaks, Itead... same products, different names.


If they are really the same product, please explain this:
I checked the emails I got over a six month period, and the percentage of emails ultimately caused by hardware problems turned out like this:
- ITead: 1.6%
- ElecFreaks: 1.8%
- SainSmart: 98.3%

Does not look like they are the same products to me...

/Henning

kortium

I have same problem and I opened utouch.cpp and make some change  with disp_x_size and disp_y_size

Code: [Select]
void UTouch::InitTouch(byte orientation)
{
orient = orientation;
_default_orientation = CAL_S>>31;
touch_x_left = (CAL_X>>14) & 0x3FFF;
touch_x_right = CAL_X & 0x3FFF;
touch_y_top = (CAL_Y>>14) & 0x3FFF;
touch_y_bottom = CAL_Y & 0x3FFF;
//disp_x_size = (CAL_S>>12) & 0x0FFF;
//disp_y_size = CAL_S & 0x0FFF;
disp_x_size = 800;
disp_y_size = 480;
prec = 10;

pinMode(T_CLK,  OUTPUT);
    pinMode(T_CS,   OUTPUT);
    pinMode(T_DIN,  OUTPUT);
    pinMode(T_DOUT, INPUT);
    pinMode(T_IRQ,  OUTPUT);

digitalWrite(T_CS,  HIGH);
digitalWrite(T_CLK, HIGH);
digitalWrite(T_DIN, HIGH);
digitalWrite(T_CLK, HIGH);
}

JHawk88



If they are really the same product, please explain this:
I checked the emails I got over a six month period, and the percentage of emails ultimately caused by hardware problems turned out like this:
- ITead: 1.6%
- ElecFreaks: 1.8%
- SainSmart: 98.3%

Does not look like they are the same products to me...

/Henning


Sorry, not trying to beat a dead horse here.  But have you considered that maybe a big reason why those percentages are that way is that people only buy from SainSmart?  If 1400/1500 buy from SainSmart, I would imagine you would get percentages like that.
Remember remember, the 4th of...July!  Duh.

doc_norway


Sorry, not trying to beat a dead horse here.  But have you considered that maybe a big reason why those percentages are that way is that people only buy from SainSmart?  If 1400/1500 buy from SainSmart, I would imagine you would get percentages like that.


I think you have misunderstood what the percentages represents...
They represent the amount of messages I got where the root cause of the problems was a hardware fault or issue, and are a percentage of the total amount of messages regarding that particular vendor.

It has been a while since I did the count so I do not remember the exact figures any longer but the total number of messages was somewhere around 2500 and they were divided by the vendors almost equally (approx: 30% (SainSmart)/33% (ElecFreaks)/37% (ITead)).

Example: Say I got 1000 messages regarding ITead modules then 16 of those messages were about problems caused by hardware faults.

/Henning

eclipsegst

Hello,

I solved the problem by adding some delay before SPI reading when CS is driven. According to datasheet it needs minimum 200ns when data is valid. After this mod (I used 2us delay) I'll get very steady readings.
Also I put some debounce for reading touchscreen "keys", now it works perfectly.

MaikB85

#59
Nov 29, 2013, 08:25 pm Last Edit: Nov 30, 2013, 05:35 pm by MaikB85 Reason: 1
Can you explain what you did exactly for proper working? Have the Same Problem. I did the calibration and it is better now, but not very good precision


[EDIT] Did calibration again and in my sketch set precision to High. Now it's good for my touch application
[EDIT2] Ok for small buttons it is not good working. particularly on the borders of the screen.

Go Up