Resistive touch with the Segger EmWin Problem

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.
JoLo_284096
Level 4
Level 4
First like received

Dear All,

   

I am having problem with a resistive touch and the EmWin Library. I am using CY8CKIT050 kit and a GLCD bought to Mikroelectronika, called PSOC TFT Expansion Board, which is a color display 320x240px Touchpanel. This module use ILI9441 driver. Please find attached the documentation of this GLCD.

   

I have installed the EmWin library and able to build and program all the sample codes coming with the library except the two samples regarding touch panel (TOUCH_Calibrate.c and TOUCH_Sample.c). Even I am able to run these two programs in the emWIN Simulator downloaded from Segger.

   

 I have tested the display with the code supported by Mikroelectonika so the dsplay and the hardware setup ( pins assigments) works perfect so I think is not a hardware problem.

   

I am using PSOC Creator 4.0.

   

I leave my project so you can have a look. Any comment would be appreciated.

   

Thanks in advance,

   

Joaquin.

0 Likes
1 Solution
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received
0 Likes
5 Replies
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

PSoC Creator  4.0 Update 1 (4.0.0.432)
OS Version: Microsoft Windows

   

Errors found while loading "C:\PSoC__\Test__\Interfaces_\LCD_\ILI9341\Test_1.cydsn\User\Library\mE Library\mikromedia_for_PSoC.cylib\TP\TP.cysch" file. This file would not be considered in the update process.

   

Where are these files:
#include <Cross platform\utils.hutils.h>   //  Found in Cross platform
#include "debug.h"
#include "sensors_psoc.h"

0 Likes
lock attach
Attachments are accessible only for community members.
JoLo_284096
Level 4
Level 4
First like received

Oh, yes, sorry, I have clean up the project, leaving only the relevant parts regarding GLCD. Please try with this new file compresed project.

0 Likes
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

There is a post with a similar problem:
Use the resistive touch with the Segger Emwin and Psoc5LP.
 

0 Likes
lock attach
Attachments are accessible only for community members.
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

It seems MainTask () does not work and there are no settings for TP.
My touch is defective, but a simple test for the tap it performed,
LED P6_2 lights up when touch  pressed.

lock attach
Attachments are accessible only for community members.
JoLo_284096
Level 4
Level 4
First like received

Hello,

   

Thank you very much for your support.

   

Your project does not work when I open it, I dont know why.

   

After some headache, I solved my problem. Basically two thing were missing:

   

(1) A call every 100 times/second  to GUI_TOUCH_Exec(), as explained in the Manuals for this library. I was supposing that in the samples supported by Cypress I was done but It wasn´t.

   

(2) A correct values for calibration, obtained with the sample file Touch_calibration() sample file.

   

#define TOUCH_ADC_TOP    262
#define TOUCH_ADC_BOTTOM 2540
#define TOUCH_ADC_LEFT   353
#define TOUCH_ADC_RIGHT  2293

   

I leave you here the project as a "template" in case can be of some usefull for anyone using the same setup.

   

Thanks anyway for your support