Touch detect using Touch_calibrate from emWin library

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
ShKr_3646021
Level 2
Level 2
First like received 10 replies posted 5 replies posted

Hi all,

I am trying to calibrate resistive touch screen of a 3.5" TFT LCD using PSoC 5LP and emWin library.

I was able to use Touch_sample.c to verify touch detection and moved on to do touch calibration. I am using Touch_calibrate.c sample code from emWin but wasn't successful. I tried to debug and what looks like the code is stuck at while(TouchState.Pressed != 1)  and doesn't seem to end the loop.

Any solutions with this regard would be very helpful.

I have attached the c code for reference.

Thanks and regards,

Shamili

0 Likes
3 Replies
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

DId calibration of the touch screen work correctly?  I'm talking about the GUI_TOUCH_Calibrate() in LCDConf.c. Are all the points for top, bottom, right and left configured correctly?

I looked at all the steps, the hardware routines seem to be configured correctly. Please run the calibration again, the code exists the while loop only when the button is pressed and this press isn't being detected.

Regards,

Dheeraj

0 Likes

GUI_TOUCH_Calibrate() helped me to get the values for top, bottom, right and left. But the run-time calibration doesn't detect the touch.

Regards,

Shamili

0 Likes