cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

JoLo_284096
New Contributor II

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
Reply
1 Solution
EvPa_264126
Valued Contributor II
0 Likes
Reply
5 Replies
EvPa_264126
Valued Contributor II

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
Reply
JoLo_284096
New Contributor II

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
Reply
EvPa_264126
Valued Contributor II
0 Likes
Reply
EvPa_264126
Valued Contributor II

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.

JoLo_284096
New Contributor II

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