• AVR Freaks

Helpful ReplyHot!Focaltech FT5316 capacitive touch

Page: < 123 > Showing page 2 of 3
Author
skaptor
n00b member
  • Total Posts : 248
  • Reward points : 0
  • Joined: 2012/07/25 11:18:48
  • Location: Tilted Towers
  • Status: offline
Re: Focaltech FT5316 capacitive touch 2018/03/22 09:07:27 (permalink)
0
Hello, it still hasn't worked for me, compiler cant find
DRV_TOUCH_FT5XX6_TOUCH_BUFFER_EVENT_HANDLER definition

Porsche 718 Cayman GTS
#21
jiggoly
Junior Member
  • Total Posts : 115
  • Reward points : 0
  • Joined: 2016/01/19 15:02:48
  • Location: Spain
  • Status: offline
Re: Focaltech FT5316 capacitive touch 2018/03/22 09:17:20 (permalink)
0
Hi Skaptor, what compiler and harmony version do you use?
 
Tested with Harmony 2.05, 2.05.01 and xc32 1.44 with 1.44b patch and with xc32 2.05.
No errors, I got it working without problems.
 
#22
skaptor
n00b member
  • Total Posts : 248
  • Reward points : 0
  • Joined: 2012/07/25 11:18:48
  • Location: Tilted Towers
  • Status: offline
Re: Focaltech FT5316 capacitive touch 2018/03/22 09:28:33 (permalink)
0
same compilers and harmony version as you! I just replaced the files inside the zip to my harmony instalation

Porsche 718 Cayman GTS
#23
Michael.W.Mann
Super Member
  • Total Posts : 324
  • Reward points : 0
  • Joined: 2011/01/24 09:58:24
  • Location: Chandler, Arizona
  • Status: offline
Re: Focaltech FT5316 capacitive touch 2018/06/25 11:56:39 (permalink)
0
Now that Harmony 2.06 is released, you can find the example project software in ./apps/examples/3rd_party_display.  The related tutorial is found in Volume III > MPLAB Harmony Graphics Composer User's Guide > Advanced Topics > 
Creating a MPLAB Harmony Graphics Application Using a Third-Party Display

Michael W. Mann
Principal Applications Engineer
MCU32 Applications, Microchip
#24
Vargoth
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2018/02/26 17:18:02
  • Location: 0
  • Status: offline
Re: Focaltech FT5316 capacitive touch 2018/09/24 17:01:47 (permalink)
0
Hi Michael!
 
I was able to get the example code from the 2.06 3rd Party Display project partially working. It registers a touch and marks it on my display but then never registers another touch after the first one is displayed on the screen. My heartbeat LED still runs so the program isn't locked up but I am not sure why another touch isn't detected. Any ideas?
 
Thanks!
Patrick
#25
Michael.W.Mann
Super Member
  • Total Posts : 324
  • Reward points : 0
  • Joined: 2011/01/24 09:58:24
  • Location: Chandler, Arizona
  • Status: offline
Re: Focaltech FT5316 capacitive touch 2018/09/24 17:04:03 (permalink)
0
What's different between your hardware setup and mine?
 

Michael W. Mann
Principal Applications Engineer
MCU32 Applications, Microchip
#26
Vargoth
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2018/02/26 17:18:02
  • Location: 0
  • Status: offline
Re: Focaltech FT5316 capacitive touch 2018/09/24 17:15:00 (permalink)
0
Michael.W.Mann
What's different between your hardware setup and mine?
 




Honestly? Pretty much everything. I am using a custom board with a PIC32MZ2064DAG176 that interfaces to a NewHaven 5" 800*480 display (NHD-5.0-800480TF-ATXL#-CTP). The custom board is literally just a pin breakout board that has some linear regulators and capacitor banks to give me the 3.3VDC and 1.8VDC. No controller on the LCD so the PIC is controlling it using GLCD and internal DDR (24MHz external oscillator). Though right now, the only things in circuit are the Heartbeat LED and LCD with FT5306.
 
Thanks!
Patrick
#27
NKurzman
A Guy on the Net
  • Total Posts : 17823
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: online
Re: Focaltech FT5316 capacitive touch 2018/09/24 17:50:09 (permalink)
0
Are you reading all the touched Points?
Are you Polling ? Using the Interrupt?
Do you see the INT Line strobing while the display is touched?
#28
Vargoth
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2018/02/26 17:18:02
  • Location: 0
  • Status: offline
Re: Focaltech FT5316 capacitive touch 2018/09/24 18:05:58 (permalink)
0
NKurzman
Are you reading all the touched Points?
Are you Polling ? Using the Interrupt?
Do you see the INT Line strobing while the display is touched?



Based on the information of the example software, it should read all touched points but I am still working through trying to understand everything that the Harmony touch driver does.
 
The FT5306 is using an external interrupt line to the PIC that is handled by the Interrupt System Service. Do I have to manually clear the interrupt flag? I believe that the issue is that the PIC isn't acting on the interrupt but I am unsure why.
 
I only have a DMM available right now but I do see changes in the INT line when I touch the screen.
 
Thanks!
#29
NKurzman
A Guy on the Net
  • Total Posts : 17823
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: online
Re: Focaltech FT5316 capacitive touch 2018/09/24 19:05:43 (permalink)
0
Without a scope it is hard to tell.  But the FT5306 will keep sending an interrupt (once a second???) for as long as the screen is touched. If that is happening then it is doing it job.  I do not know what you wrote and what Harmony did. But in general the ISR could have to clear the flag. is it your ISR or theirs?
 
I have Harmony V1.11 with my own driver but something like this:
void __ISR(_EXTERNAL_1_VECTOR, ipl5AUTO) _IntHandlerExternalInterrupt1(void)
{
    touchDetectFlag = true;
    SYS_INT_SourceStatusClear(INT_SOURCE_EXTERNAL_1);

}

 
Note I am not reading the FT5306 in the interrupt.
I found it unnecessary.
 
 
 
 
post edited by NKurzman - 2018/09/24 19:23:53
#30
Michael.W.Mann
Super Member
  • Total Posts : 324
  • Reward points : 0
  • Joined: 2011/01/24 09:58:24
  • Location: Chandler, Arizona
  • Status: offline
Re: Focaltech FT5316 capacitive touch 2018/09/24 19:21:30 (permalink)
0
The interrupt line, which is active low, signals that there is a touch event to be queried via the I2C interface.  Follow the example code that comes with the tutorial as an example of what to do.

Michael W. Mann
Principal Applications Engineer
MCU32 Applications, Microchip
#31
Vargoth
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2018/02/26 17:18:02
  • Location: 0
  • Status: offline
Re: Focaltech FT5316 capacitive touch 2018/09/24 19:44:31 (permalink)
0
Found my issue. I had another I2C module that was selected in MHC but not used and somehow the touch I2C was going into the other I2C's ISR instead of it's own. Disabled the second I2C interface and it appears to be working now (screen glitches out quite a bit when pressed but the buttons work).
 
Thank you both!
#32
langadam
New Member
  • Total Posts : 1
  • Reward points : 0
  • Joined: 2018/10/15 05:38:00
  • Location: 0
  • Status: offline
Re: Focaltech FT5316 capacitive touch 2018/10/17 00:33:58 (permalink)
0
Hi Michael.W.Mann,
 
could you please attach the files again to this post?
I am not able to unzip the files here and the external download link does not contain the files anymore.
 
Would be really helpful, thank you.
Adam
#33
Tim Trudeau
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2016/12/20 07:55:04
  • Location: 0
  • Status: offline
Re: Focaltech FT5316 capacitive touch 2019/05/02 05:26:35 (permalink)
0
Hello, Michael,
I found this link about the FT5316 touch controller driver for Harmony. I am interfacing a PIC18F45K40 to a touch panel that uses the FT5216. You posted a tutorial to TransferBigFiles that is now expired. Is it possible for me to get a copy of the tutorial?  Also, the datasheet for the FT5x16 has minimal explanation of the registered. Even less on how the initialize / calibrate the touch-pad. Can you point me to any additional information? 
Thank you very much for anything you can do to help me.
#34
MikeinAZ
Administrator
  • Total Posts : 320
  • Reward points : 0
  • Joined: 2014/06/03 07:25:32
  • Location: Chandler, AZ
  • Status: offline
Re: Focaltech FT5316 capacitive touch 2019/05/02 07:45:34 (permalink)
0
Hello,
 
This solution is currently not compatible with anything other than PIC32, but it could be you can use it as a baseline.  Please also be aware that our example solution was for capacitive touch, so it did not try to address resistive.
You can find this information in Harmony v2.06 documentation, which includes both the documentation for the process to convert to your own driver, and the source code for our example.  Download Harmony and give it a try.  By the way, we strongly suggest that you use the specified hardware as an example before moving in your own direction.  If you have questions on our specific implementation we can answer them, but we will not be able to address questions about your own approach in a meaningful way.
#35
mattgreig
Starting Member
  • Total Posts : 82
  • Reward points : 0
  • Joined: 2003/11/07 12:39:01
  • Status: offline
Re: Focaltech FT5316 capacitive touch 2019/06/10 09:15:16 (permalink)
0
Hello,
 
firstly Jiggoly,
thanks for the driver. I had to modify the changes to the harmony files in 2.06, but they worked well and now I can select the FT driver in the harmony configurator and it generates the code
 
That said does anyone have an example code of this working in 2.06?
I am using a newhaven NHD-5.0-800400TF-ATXL#-CTP that has a FT5426 touch controller
 
the generated ISR for timer 9 associated with the touch  setup does not run initially as it is stoped by code
 
and the external ISR vector only clears it flag, it does work if i touch.
Should it be making some sort of read request akin to what it does on code for the 336T touch examples?
 
Thanks
 

Matt Greig
Research Associate
PART Group
BCIT Technology Centre
Burnaby,BC, Canada
#36
mattgreig
Starting Member
  • Total Posts : 82
  • Reward points : 0
  • Joined: 2003/11/07 12:39:01
  • Status: offline
Re: Focaltech FT5316 capacitive touch 2019/06/10 09:38:29 (permalink)
0
adding 
DRV_TOUCH_FT5XX6_TouchInputRead( sysObj.drvFt5xx6);
to the external interrupt now has the system reading I2C data

Matt Greig
Research Associate
PART Group
BCIT Technology Centre
Burnaby,BC, Canada
#37
mattgreig
Starting Member
  • Total Posts : 82
  • Reward points : 0
  • Joined: 2003/11/07 12:39:01
  • Status: offline
Re: Focaltech FT5316 capacitive touch 2019/06/10 13:18:59 (permalink)
0
ok 
I had to modify code to rotate touch co-ordinates to match orientation in graphics composer
I now get in
sys_touch.c 
 
registered co-ordinates correct to where i touch screen in
SYS_TOUCH_TouchMsgGet
 
and 
SYS_TOUCH_CallObservers
gets called, 
 
However I am getting no touch events
 
SYS_TOUCH_RegisterObserver
never seems to be called, should it be?
 
Thanks for any tips
 
 found solution here
 
https://www.microchip.com/forums/m1096952.aspx
 
had to de-rotate the touch axis i did before , but all is good
 
post edited by mattgreig - 2019/06/10 13:35:35

Matt Greig
Research Associate
PART Group
BCIT Technology Centre
Burnaby,BC, Canada
#38
nishchaya
New Member
  • Total Posts : 2
  • Reward points : 0
  • Joined: 2019/09/13 05:34:04
  • Location: 0
  • Status: offline
Re: Focaltech FT5316 capacitive touch 2019/09/13 09:06:23 (permalink)
0
Hi Michael, We need to use FT5426 and FT5x06 for two different applications.
Can you kindly share the attachments posted earlier (Port#7) and any latest driver in that family?
Thanks, Vishnu
#39
Michael.W.Mann
Super Member
  • Total Posts : 324
  • Reward points : 0
  • Joined: 2011/01/24 09:58:24
  • Location: Chandler, Arizona
  • Status: offline
Re: Focaltech FT5316 capacitive touch 2019/09/17 10:43:26 (permalink)
0
I've uploaded again to TransferBigFiles the information mentioned in Posts #7 and #10 above.  The files are located at http://tbf.me/a/qG9SW

Michael W. Mann
Principal Applications Engineer
MCU32 Applications, Microchip
#40
Page: < 123 > Showing page 2 of 3
Jump to:
© 2019 APG vNext Commercial Version 4.5