Page 1 of 1

Touch screen doesn't respond well on a mikromedia 5 for TIVA

Posted: 29 Aug 2014 10:23
by Guus2005
I found the mikromedia_5_for_TIVA.mcpar example on Libstock but i had to add a few libraries and tweak it a little to get it to work. But in the end it did.
I stripped it down to use it for my own project.
Now it doesn't work anymore. I probably stripped it too far.
I debugged it and the press action is detected but the XCoord and YCoord stay 0.
Why is that? Am i forgetting something? Does it have to do with the calibration?

For the calibration i use the one in the example:
TSC2006_SetCalibrationConsts(186, 3917, 259, 3866);
Instead of the Calibration() function which is used in other examples. But it seems to work.
I have a display of 800x480. How is it possible that those high numbers work and:
TSC2006_SetCalibrationConsts(0, 480, 0, 800); not?

Thanks for your time!
Guus

Re: Touch screen doesn't respond well on a mikromedia 5 for

Posted: 02 Sep 2014 14:05
by dejan.odabasic
Hello,
Guus2005 wrote:I debugged it and the press action is detected but the XCoord and YCoord stay 0.
Why is that? Am i forgetting something? Does it have to do with the calibration?
Please make sure that you are polling the touch panel with Check_TP() function.
Inside of this function you can see function call: TSC2006_GetCoordinates(&Xcoord, &Ycoord) this is where Xcoord and Ycoord are getting their values.
Guus2005 wrote:I have a display of 800x480. How is it possible that those high numbers work and:
TSC2006_SetCalibrationConsts(0, 480, 0, 800); not?
Calibration constant are resistive parameters of touch panel, not coordinates or dimensions.
Touchpanel controller is 12bit ADC, all values up to 4095 are valid.

Best regards.

Re: Touch screen doesn't respond well on a mikromedia 5 for

Posted: 02 Sep 2014 17:52
by Guus2005
This is a good explanation. Kudos!

Thanks!
Grtz!

Guus

Re: Touch screen doesn't respond well on a mikromedia 5 for

Posted: 05 Sep 2014 14:32
by Guus2005
I am using V-TFT also.
Each time you create code (CTRL-F9) and go to the compiler (F9) Init_GPIO(); is removed from the Main(). It should be below Start_TP();
Manually putting it back solves the problem.

Grtz,
Guus