Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:17 01 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : TFT cannot be calibrated

     Page 1 of 2    
Author Message
miyek.ard
Newbie

Joined: 31/03/2018
Location: Malaysia
Posts: 24
Posted: 03:23am 10 Apr 2018
Copy link to clipboard 
Print this post

Hi All,

I am using MM+ with ILI9341 LCD panel.

My TFT able to display everything, but unable to trace any touch on the screen. This comes out when I write 'OPTION LIST'
OPTION LCDPANEL ILI9341, LANDSCAPE, 2, 23, 29
OPTION TOUCH 1, 3

When I write 'GUI CALIBRATE', something is not right. If I touch target without any hold, sometimes incorrect calibration, sometimes no errors (as shown below)
Warning: Inaccurate calibration
Deviation X = -106, Y = 0 (pixels)

Done. No errors
Deviation X = -2147483648, Y = 0 (pixels)

However, when I touch the target AND HOLD, there is error as shown below.
Error: Touch hardware failure


So, I decided to just touching the target without any hold. Once there is no error, I proceed with 'GUI TEST TOUCH' command. But then, there is no white dot appeared on the display.

How should I fix this?
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1993
Posted: 08:27am 10 Apr 2018
Copy link to clipboard 
Print this post

Hi Aimi,
Can you give more information, which Backpack / Chip are you using?
Why are you on your third Backpack? ( from previous thread).
What pins are you using for T_CS and T_IRQ. Have you read page 19 of the Manual about Calibrating the screen. Do you get the coloured balls when you use 'GUI TEST LCD PANEL'
Paul.

Edit... I usually let the more experienced shedders reply but I know what it is like to post and not receive a reply for a while.Edited by palcal 2018-04-11
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 08:43am 10 Apr 2018
Copy link to clipboard 
Print this post

The "Touch hardware failure" error is generated when the touch controller chip reports that the first calibration point (top left) is the same as the top right calibration point (within 16 pixels). The controller chip does not give a reliable indication that it is working correctly so this is the only way that the firmware can detect a problem.

This could be caused by bad wiring but it also can be caused by something on the SPI bus responding at the same time as the touch controller chip because its CS line is left floating. One other cause is when the constructor squeezes the LCD into a case that is to small and the edges of the box are pressing on the display.

Finally, it could be a dead display.
Edited by Geoffg 2018-04-11
Geoff Graham - http://geoffg.net
 
miyek.ard
Newbie

Joined: 31/03/2018
Location: Malaysia
Posts: 24
Posted: 09:09am 10 Apr 2018
Copy link to clipboard 
Print this post

Paul,
I am using Micromite+ LCD Backpack (purchased here). T_CS = pin 1, T_CS = pin 3. I read how to calibrate the screen already. Colored balls comes out when I write 'GUI TEST LCDPANEL'.

Hi Geoff,
I am not using SD card. I checked the continuity, it has a good connection.
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1993
Posted: 09:27pm 10 Apr 2018
Copy link to clipboard 
Print this post

OK it should work. The only thing I can think of is a damaged screen. I had one that had a crack in the glass, it still displayed but touch would not work.
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
miyek.ard
Newbie

Joined: 31/03/2018
Location: Malaysia
Posts: 24
Posted: 01:19am 11 Apr 2018
Copy link to clipboard 
Print this post

I am sorry but I guess my TFT is just fine, the problem might comes from the Micromite itself.

I tried to connect that Micromite with another TFT, the same problem still occurs
 
miyek.ard
Newbie

Joined: 31/03/2018
Location: Malaysia
Posts: 24
Posted: 03:19am 11 Apr 2018
Copy link to clipboard 
Print this post

SOME UPDATE!

I write 'GUI CALIBRATE' and then touch the targets, the result is
Done. No errors
Deviation X = 0, Y = 0 (pixels)

Then I write 'GUI TEST TOUCH'. When I randomly touch the screen, somehow there are 3 dots appeared.

 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1993
Posted: 06:06am 11 Apr 2018
Copy link to clipboard 
Print this post

Hi Aimi,
Rather weird, It has definitely calibrated OK, I usually just drag my finger nail across the screen and it draws a trace. I take it the plastic is to stop the camera flash reflecting. Other than that maybe Matherp can help, or send a PM to WhiteWizzard.
Paul.Edited by palcal 2018-04-12
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
miyek.ard
Newbie

Joined: 31/03/2018
Location: Malaysia
Posts: 24
Posted: 06:14am 11 Apr 2018
Copy link to clipboard 
Print this post

Hi Paul,
I drag my finger nail across the screen but no trace drawn on the screen. Is there any other solution?
 
miyek.ard
Newbie

Joined: 31/03/2018
Location: Malaysia
Posts: 24
Posted: 06:31am 11 Apr 2018
Copy link to clipboard 
Print this post

SOME UPDATE!

I try to run GUI Tabbed Page(refer to Phil's code). When I touch the screen, "TouchDown" popped out at the prompt.

I guess, my TFT able to trace there is a touch on the screen, somehow unable to trace which part of the screen has been touched.

 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1993
Posted: 08:33am 11 Apr 2018
Copy link to clipboard 
Print this post

I really think that it is a job for Matherp, he is the TFT wizzard as well as most other things.
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10310
Posted: 10:17am 11 Apr 2018
Copy link to clipboard 
Print this post

The touch function is common to all types of MM. It is highly unlikely that there is any sort of firmware issue. The key is getting a clean calibration. Use a plastic stylus (not a finger). Dwell on the points for about a second and then release cleanly before moving onto the next.

Once calibration is successful try using a very simple program to test

[code]do
Print touch(x), touch(y)
pause 300
loop[/code]

if this doesn't give sensible results then you have either a
faulty LCD
faulty MM
faulty wiring
compromised wiring (something affecting the connections to the touch controller.)

There is nothing else possible

 
bigfix
Senior Member

Joined: 20/02/2014
Location: Austria
Posts: 129
Posted: 11:54am 11 Apr 2018
Copy link to clipboard 
Print this post

As the touch function is based on analogue voltages, there could be some environmental/power issue adding random noise to the X,Y coordinates

As Matherp mentioned, use a nonconductive stylus to avoid stray noise from your fingertip

Eventually isolate the MMite from power & other connections and run it by battery
Also go to some other place away from transmitters etc...
 
miyek.ard
Newbie

Joined: 31/03/2018
Location: Malaysia
Posts: 24
Posted: 01:21am 12 Apr 2018
Copy link to clipboard 
Print this post

  matherp said   The touch function is common to all types of MM. It is highly unlikely that there is any sort of firmware issue. The key is getting a clean calibration. Use a plastic stylus (not a finger). Dwell on the points for about a second and then release cleanly before moving onto the next.

Once calibration is successful try using a very simple program to test

[code]do
Print touch(x), touch(y)
pause 300
loop[/code]


I try as per you said, the result is "-1 -1". Is it a sensible results? (I guess not)
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 02:06am 12 Apr 2018
Copy link to clipboard 
Print this post

  miyek.ard said  
Once calibration is successful try using a very simple program to test

[code]do
Print touch(x), touch(y)
pause 300
loop[/code]

I try as per you said, the result is "-1 -1". Is it a sensible results? (I guess not)

-1 indicates that the screen is NOT touched.
So you should get -1 continually until you touch.

Jim
VK7JH
MMedit
 
miyek.ard
Newbie

Joined: 31/03/2018
Location: Malaysia
Posts: 24
Posted: 02:27am 12 Apr 2018
Copy link to clipboard 
Print this post

  TassyJim said   -1 indicates that the screen is NOT touched.
So you should get -1 continually until you touch.
Jim

I still get -1 eventho I touch the screen hundred times all over the screen
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1993
Posted: 04:57am 12 Apr 2018
Copy link to clipboard 
Print this post

Hi Aimi,
Are you sure your display has the TOUCH function. It is possible to buy displays without this function. They still have the touch pins on the back but U1 is missing from the board.
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 05:58am 12 Apr 2018
Copy link to clipboard 
Print this post

Hmmmmmm. This is interesting. What power source are you using? USB power or an external plug-pack/wall-wart thing? If external, it needs to be regulated.

Remove the protective plastic film from the LCD. The touch always just works, usually. All LCD's from tiny SPI ones up to 8" parallel ones all tend to use the same XPT2046 touch controller, and there must be literally thousands of these in use on Micromite chips now, and they 'Just work'.

Personally, I am suspicious of perhaps bad soldering on the backpack PCB - especially as you say you have tried two different LCD's, and both are bad on the touch. That suggests you should have a good look around all the soldering from the MM chip, the backpack PCB, and the connections to the actual LCD itself.

Please keep us posted on any further developments!


Smoke makes things work. When the smoke gets out, it stops!
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1993
Posted: 08:32am 12 Apr 2018
Copy link to clipboard 
Print this post

I thought of that Grogs but he got the backpack ready made from WW.
I am sure WW checks very thoroughly before shipping.
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
miyek.ard
Newbie

Joined: 31/03/2018
Location: Malaysia
Posts: 24
Posted: 09:39am 12 Apr 2018
Copy link to clipboard 
Print this post

I have U1 on my TFT board.

I did continuity test using multimeter and all connection are just fine. So I guess there is no soldering issues?

Eventho I remove the plastic film from the screen, the touch still cannot be traced.
 
     Page 1 of 2    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025