Author Topic: PIC32MZ ADC Touchscreen ISR problem  (Read 1315 times)

0 Members and 1 Guest are viewing this topic.

Offline MaTechTopic starter

  • Newbie
  • Posts: 2
  • Country: de
PIC32MZ ADC Touchscreen ISR problem
« on: July 29, 2018, 04:29:30 pm »
I'm currently working on getting a 4-Wire resistive touchscreen to work with MPLAB X v4.20 and harmony v2.06.

Hardware wise I have a Pic32MZ2025DAH176 on a Custom Board and This screen (Datasheet: http://cdn-reichelt.de/documents/datenblatt/A500/ET0350G0DH6.pdf).
X+ (Pin 30, An14) and Y+ (Pin 8, AN8) have both a 100K Pullup.
X- (Pin 9) Y- (Pin 10)

I configured Harmony after an example from aria_quickstart (pic32mz_ef_sk_s1d_pictail_wqvga), but I only get -1 back from my ADC in DRV_TOUCH_ADC_Tasks().

Has anyone experience in doing this?
Thanks in advance


Edit:
I was able to narrow my problem down and it seems like it hast something to do with the ISR which is calling DRV_TOUCH_ADC_PositionDetect();.
In DRV_TOUCH_ADC_PositionDetect(); the ADC values are read and, because the ISR which should be called by a Timer is not functioning correctly I only get the default value of -1.
I've attached some pictures of my Harmony configuration for the Timer and Touch Drivers and the ISR in drv_touch_adc.c.
« Last Edit: July 30, 2018, 03:59:16 pm by MaTech »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->