Pages: 1 2 3 [4] 5   Go Down
Author Topic: utouch ssd1963 5 inch problem  (Read 6341 times)
0 Members and 1 Guest are viewing this topic.
Oslo, Norway
Offline Offline
Full Member
***
Karma: 6
Posts: 126
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Queens, New York
Offline Offline
Faraday Member
**
Karma: 83
Posts: 3390
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

Offline Offline
Jr. Member
**
Karma: 1
Posts: 63
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Remember remember, the 4th of...July!  Duh.

Oslo, Norway
Offline Offline
Full Member
***
Karma: 6
Posts: 126
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 63
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Remember remember, the 4th of...July!  Duh.

Oslo, Norway
Offline Offline
Full Member
***
Karma: 6
Posts: 126
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

France
Offline Offline
God Member
*****
Karma: 34
Posts: 977
Scientia potentia est.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Oslo, Norway
Offline Offline
Full Member
***
Karma: 6
Posts: 126
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

France
Offline Offline
God Member
*****
Karma: 34
Posts: 977
Scientia potentia est.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Oslo, Norway
Offline Offline
Full Member
***
Karma: 6
Posts: 126
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Code:
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);
}
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 63
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


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.
Logged

Remember remember, the 4th of...July!  Duh.

Oslo, Norway
Offline Offline
Full Member
***
Karma: 6
Posts: 126
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 35
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: November 30, 2013, 11:35:38 am by MaikB85 » Logged

Pages: 1 2 3 [4] 5   Go Up
Jump to: