TI E2E Community
Other Analog & Touch
We are trying to interface TCS2007 with LPC1788. For writing the drivers we are using the drivers provided on TI website as reference. In the file "TSC2007Touch.cpp" there is a funtion which converts raw data to LCD usable coordinates and this function depends on max and min boundaries for x and y coordinates.
I would appreciate if you could explain how these values are calculated. I have read the pdf for the driver but couldn't get anything from there.
Theoretically, the touch coordinate range from TSC2007 is either from 0 to 255 (if under 8-bit resolution) or from 0 to 4095 (if under 12-bit resolution).
In practice, the min to max range could be narrower, mainly for two concerns:
(1) the touch panel's pigtail resistance. Refer to section 4.3 of the application report slaa298; and
(2) touch system noise. Someone may ignore the last one or two unstable digitals of the raw data, caused by noise. (BTW: a better way is to reduce touch system noise, instead of the system resolution. To reduce noise, refer to app note sbaa155a).
Thanks a lot, now i understand how the range is caculated but i have doubts regarding mapping the coordinates obtained to my LCD resolution.
1. I'm using a 320x240 TFT LCD with touch screen and using 12 ADC mode of TSC2007.
so the conversion formula should be,
For X: (320/(MAX range - MIN range))* (X measurement), where max range= 3900, min range= 200
This should give me coordinate touched on x axis according to my LCD. Is this right or am i missing something.
Your formula is basically correct. For more accurate expression, however, you may refer to the application article slyt277. In practice, a 3, 4, or 5 points calibration is usually needed.
Best regards,Wendy F.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.