Page 1 of 1

GLCD with touch

Posted: Mon Jul 09, 2018 10:23 am
by gonzogonzo
Hello,

I would like to simulate a GLCD with touch but I do not understand how simulating touch; i have download example "GLCD4.3touch" and use and simulation GLCD is ok but touch is for for me a "black hole".
There is someone can help me with refering to this example?

Thank in advance and sorry for my poor english.

Re: GLCD with touch

Posted: Mon Jul 09, 2018 11:28 am
by medelec35
Hi gonzogonzo,
Can you post a link to the example please.
It saves people searching for it.

Martin

Re: GLCD with touch

Posted: Mon Jul 09, 2018 11:58 am
by gonzogonzo

Re: GLCD with touch

Posted: Tue Jul 10, 2018 3:51 pm
by medelec35
I see what you mean,
I could not get the touch side to simulate either.

Re: GLCD with touch

Posted: Tue Jul 10, 2018 4:08 pm
by gonzogonzo
medelec35 wrote:I see what you mean,
I could not get the touch side to simulate either.

Thanks medelec35,
i am working on prototype...

Re: GLCD with touch

Posted: Tue Jul 10, 2018 4:11 pm
by medelec35
Was it that specific gLCD or will any be ok so long as touch part works?
I have found an example with a different controller that works and can upload it if that will help?
Unless it's specifically XPT2046 then I have not got a working example that will simulate touch.

Re: GLCD with touch

Posted: Thu Jul 12, 2018 2:53 pm
by Benj
Hello,

The touch sensor IC basically allows you to overlay the display with a resistive film. When this film is touched you get a resistance on the X and Y axis that the touch controller IC can read to determine the position of the touch.

It looks like the XPT2046 component does not simulate but should work fine on the real hardware.

Re: GLCD with touch

Posted: Sun Jul 15, 2018 9:34 am
by gonzogonzo
Hi medelec35 and Benj,

sorry for my reply delay but i am not at home;
my hardware use gLCD Ili9341 320X240 and touch XPT2046 and now i have made a prototype (with PIC) that work very well with software write in Flowcode V7 (only a little problem with touch solved with a sorte of antidebounce).
Problem is that there is not touch simulation and this delay development software; but all is working...
If You can explain like i can made simulation of touch would be great!

Thank again

Re: GLCD with touch

Posted: Thu Aug 01, 2019 10:43 am
by AbhijitR
Hello!

I am trying to use the 2.8 in SPI touch screen display (display chip is ILI9341 and inbuilt touch panel is XPT2046) along with PIC18F46K22, my first doubt is am I using the correct PIC chip to work with this display for a very basic display operation, no graphics for the moment, only display and touch.

I connected the PIC and only the display as per the information provided in the component properties, with few print screen macros, it worked well after few changes and notes from the forum.

Later I tried to connect the touch panel connections with the PIC as per the properties window and then nothing works, as if the PIC is freeze, I really do not understand what's going wrong, is it some connection problem or something to do with the SPI settings for the touch panel, I am puzzled.

I am using FC8, V8.1.1.11

Thank you.

Regards
Abhi

Re: GLCD with touch

Posted: Thu Aug 01, 2019 3:46 pm
by Benj
Hi Abhi,

Can you attach your program that demonstrates the issue and we will investigate for you.

Re: GLCD with touch

Posted: Fri Aug 02, 2019 12:44 pm
by AbhijitR
Hi! Ben
good afternoon

Following you reply, I am attaching the FC as well the picture of the display for your knowledge, do let me know if you need some more information.

Thank you, hear you soon.

Regards
Abhi

Re: GLCD with touch

Posted: Tue Aug 06, 2019 4:13 am
by AbhijitR
Hello! Ben
Good morning

Any update regarding my previous post, do you think some problems with the chip settings or component properties.

Thank you, hear you soon.

Regards
Abhi

Re: GLCD with touch

Posted: Thu Aug 08, 2019 6:51 am
by AbhijitR
Hello! Team

Following my previous chats regarding my doubt about the display with touch which I am not able to work with, if someone could correct or should I drop the plan to use it.

Thank you.

Regards
Abhi

Re: GLCD with touch

Posted: Sat Aug 17, 2019 5:09 pm
by AbhijitR
Hello! Team (Ben)

Following my previous post regarding the touch screen (using XPT2046 component) I progressed further with the working, but again got stuck up, only one coordinate is displayed on the screen (probably Y axis) I do not understand why the other coordinate is not able to read, I thought the chip (XPT2046) on the display might be the problem so I replaced that with new one but still the same result, I also installed the FC 8.2.1.13 but still the same.

Is it possible for someone to check if there is some problem with the flowchart or something wrong with the component macro or I need to buy a new display assuming the display is faulty.

NOTE: the LED A0 in the loop switch ON when the touch panel/screen is touched and is switched OFF too once the finger is removed, but only one coordinate value is read.

Hope to receive some answer from experts.

Thank you.

Regards
Abhi

Re: GLCD with touch

Posted: Mon Aug 19, 2019 10:41 am
by AbhijitR
Hello!

Any help possible on my previous post regarding the touch screen.

Thank you

Re: GLCD with touch

Posted: Mon Aug 19, 2019 1:02 pm
by Benj
Hello Abhi,

Have you tried the change the SPI bus channel for the XPT2046 to Software and see if this makes any difference. Aha I see you've now managed to get past the lockup. Any idea what was causing this?

Have you got a schematic or datasheet for the touch sensor on the display. Just to check if the various configuration settings are correct.

Re: GLCD with touch

Posted: Mon Aug 19, 2019 1:50 pm
by AbhijitR
Hello! Ben

Finally!, thanks for the reply, your word is final, always, many many thanks for the suggestion, yes now I can read both the coordinates, for your knowledge, as you said I just changed the bus setting to "software" and kept the same pins as before and it works.

Previously I made a mistake in the connections of the touch panel, I connected the T_DO pin of the display to MOSI and T_DIN to MISO, exact reverse, it took me some time to realize my mistake.

For my knowledge can you brief what made the touch screen work by changing the setting to software, it was like "Abracadabra" and it worked.

I have attached the datasheet of that chip which I replaced assuming the previous one was damaged, but now I think it should have worked, but its okay, it is better late then never, I am happy the touch panel is working, I will explore some more and hope it will work without any trouble.

Humbly Thank you again.

Regards
Abhi

Re: GLCD with touch

Posted: Mon Aug 19, 2019 4:05 pm
by Benj
Hi Abhi,

The software channel simply uses standard I/O pins to re-create the bus. It is slower then the hardware peripheral and requires the microcontroller to sit and create the bus.

The hardware channels use the internal peripheral to create the bus. It will run without the microcontroller having to think about it but there is obviously something not quite right with this. Maybe the default SPI mode is slightly off and needs changing. I can look into this.

Re: GLCD with touch

Posted: Mon Aug 19, 2019 5:56 pm
by AbhijitR
Hi! Ben

Many thanks for the explanation, it was so easy to understand then reading the datasheet, :D .

Okay, regarding the investigation about the SPI for XPT2046, I had a thought in my mind, correct me if I am wrong,
there are 3 MACRO's, Initialize, ReadCoord and SampleSensor, and all work well, except the read coordinate (0) which is for X axis, in my opinion the truth table (table 4 and may be 5 in the datasheet, page 15) which control/command the reading function of the X axis is missing something, you are the correct person to know, I just had a thought in my mind.

I am sure you will find the answer thank you Ben and hear you soon.

Regards
Abhi

Re: GLCD with touch

Posted: Fri Aug 23, 2019 2:40 am
by AbhijitR
Hello! Ben

Any news/update regarding the XPT2046 SPI to read the x coordinate using hardware instead of software channel.

Thank you.

Regards
Abhi