• AVR Freaks

Touch Input on PIC32 GUI Development board with PCAP Touch

Author
Nagendra
New Member
  • Total Posts : 16
  • Reward points : 0
  • Joined: 2016/06/15 08:16:53
  • Location: 0
  • Status: offline
2016/06/27 10:06:42 (permalink)
0

Touch Input on PIC32 GUI Development board with PCAP Touch

Hello All,
I am working on a PIC32 GUI development board with PCAP touch, using MPLAB Harmony. I used Harmony graphic composer to create screens and required widgets. I have created a screen with simple static text and a Button. Now when I am trying to use touch input the display is behaving like a static display.(i.e without touch sense). I have enabled and selected all required touch drivers and touch support services from harmony. Harmony auto generated all the code and I can see it is using external interrupt0 for touch read. But I couldn't see the events happening which I generated using HGC. My question is do I need to write any code in any of the functions or any help regarding where I am doing wrong will be helpful.
- I have tested example codes provided by Microchip and they are working fine on my board. I couldn't co-relate my project with the example completely as the example project wasn't created using HGC.
- I am using Harmony V1.07.
Thank You.
-Nagendra.
#1
grafican
Starting Member
  • Total Posts : 51
  • Reward points : 0
  • Joined: 2014/01/23 02:08:39
  • Location: 0
  • Status: offline
Re: Touch Input on PIC32 GUI Development board with PCAP Touch 2016/06/28 05:27:29 (permalink)
4 (1)
Hello Nagendra,
 
Please verify whether the touch controller interrupt pin is mapped correctly in MPLABX IDE using MPLAB Harmony Configurator (MHC). The touch controller interrupt pin is connected to PIC32 Micro-Controller Pin. The Micro-Controller Pin need to be mapped as external interrupt pin. You can verify if the Micro-Controller Pin connected to the touch controller interrupt is mapped correctly using "Pin Diagram" from MHC. If it is not correctly map you can change it by using "Pin Table" from MHC. You can further run the application in debug mode and verify by putting break point in the touch ISR. If the application hits the break point on touch input the interrupt pin is correctly mapped.
#2
Nagendra
New Member
  • Total Posts : 16
  • Reward points : 0
  • Joined: 2016/06/15 08:16:53
  • Location: 0
  • Status: offline
Re: Touch Input on PIC32 GUI Development board with PCAP Touch 2016/06/28 07:46:52 (permalink)
0
Hello @Graphican, Thank you for your Reply.
The interrupt pin is configured properly i.e external interrupt0 is selected as source of interrupt for touch driver and this pin is mapped properly to microcontoller pin (pin72 INT0 of PIC32MX795F512L). You can see these in Images attached. But yes when I debugged using  breakpoint it never hits that breakpoint means its not sensing that touch at all. My other doubt is is somehow do I need to make my screen active. But I couldn't find any property/function related to this. This is because I couldn't see any type of touch sense from my screen. (But my touch screen is functioning properly with example code snippets).
 
Thank you.
-Nagendra.
 

Attached Image(s)

#3
NKurzman
A Guy on the Net
  • Total Posts : 18984
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Touch Input on PIC32 GUI Development board with PCAP Touch 2016/06/28 08:44:54 (permalink)
3 (1)
Is the communication to the IC during init successful?
Do the Sample Apps work on you board?
#4
Nagendra
New Member
  • Total Posts : 16
  • Reward points : 0
  • Joined: 2016/06/15 08:16:53
  • Location: 0
  • Status: offline
Re: Touch Input on PIC32 GUI Development board with PCAP Touch 2016/06/28 08:47:41 (permalink)
0
Yes The sample apps working fine on my board. I don't see any issue.!
TY.
 
#5
Paul PortSol
Super Member
  • Total Posts : 635
  • Reward points : 0
  • Joined: 2015/07/03 11:52:03
  • Location: Newfoundland, Canada
  • Status: offline
Re: Touch Input on PIC32 GUI Development board with PCAP Touch 2016/06/28 10:06:17 (permalink)
0
I had some issues with the MEBII 4.3" with Harmony V10701. The BSP wasn't quite right, things like External Memory didn't work.
It seems to be fixed in HarmonyV108 (Use the MHC in the install folder, read the Harmony V108 readme).
 
I have a very simple app running on the PIC32MZ+MEBII and pcap is working in HarmonyV108.
#6
Paul PortSol
Super Member
  • Total Posts : 635
  • Reward points : 0
  • Joined: 2015/07/03 11:52:03
  • Location: Newfoundland, Canada
  • Status: offline
Re: Touch Input on PIC32 GUI Development board with PCAP Touch 2016/06/28 10:07:43 (permalink)
0
* For the MEBII I only had to select the BSP, I didn't have to set any of the touch options manually.
* Not so quick with my resistive touch :(
#7
Nagendra
New Member
  • Total Posts : 16
  • Reward points : 0
  • Joined: 2016/06/15 08:16:53
  • Location: 0
  • Status: offline
Re: Touch Input on PIC32 GUI Development board with PCAP Touch 2016/06/28 11:03:32 (permalink)
0
Hi @Paul: I don't have any MEB externally as all my controllers are(PIC32 Controller,Touch controller,RAM)  on a single board connected internally.(You can have a look @ "PIC32 GUI Dev board with PCAP touch"). For me the stopping point is touch. I couldn't figure out whats going wrong.! And as you said I also selected BSP and I didn't select touch touch options manually. They all auto selected my MHC and I just cross verified them.
The screen is created using Harmony Graphics composer and code being generated automatically.When I upload Hex file I am able to see screen and widgets but they are not sensing touch at all.
You can see my test screen in the image attached,though I am pressing the button, No sense from that!
TY.
-Nagendra 

Attached Image(s)

#8
grafican
Starting Member
  • Total Posts : 51
  • Reward points : 0
  • Joined: 2014/01/23 02:08:39
  • Location: 0
  • Status: offline
Re: Touch Input on PIC32 GUI Development board with PCAP Touch 2016/06/29 02:12:55 (permalink)
0
Could you please also share the MHC configuration for external interrupt. You must have set the external interrupt to correct source, just in case if it is not please verify. Please debug the application with optimization zero, if the break point in touch ISR is still not working the touch will not work.
#9
mvns_in
Senior Member
  • Total Posts : 141
  • Reward points : 0
  • Joined: 2013/06/08 00:12:35
  • Location: 0
  • Status: offline
Re: Touch Input on PIC32 GUI Development board with PCAP Touch 2016/07/12 01:55:38 (permalink)
0
Hi Nagendra,
 
I hope you missed to configure "External Input pin".
PFA, which gives information on how to configure the "External Input pin" using MHC.
 
Hope this helps your requirement.
 
Regards,
Mvns_in
#10
Nagendra
New Member
  • Total Posts : 16
  • Reward points : 0
  • Joined: 2016/06/15 08:16:53
  • Location: 0
  • Status: offline
Re: Touch Input on PIC32 GUI Development board with PCAP Touch 2016/07/12 09:28:50 (permalink)
0
@mvns_in: The problem was with I2C driver pins which were overlooked by me. The default configuration of touch to this specific BSP selecting I2C driver pins which are incorrect according to development board connections.
Thank you. :)
#11
Jump to:
© 2020 APG vNext Commercial Version 4.5