TI E2E Community
Other Analog & Touch
TSC2046E X and Y Data Interacting
We are using the TSC2046E to read a 4-wire resistive touch panel and using the internal reference..
The TSC2046E is being driven by an FPGA. We are using commands 0x93 and 0xD3 to read the x/y position (we also tried 0x90 and 0xD0). The TSC2046E with this FPGA code worked fine on the previous board but on this board, changes on one coordinate effect the other coordinate. There are no changes between boards in area the TSC2046E circuit other than a change on the pins used to connect the FPGA to the TSC2046E. We have looked at the signals in the FPGA using SignalTap and verified that they look correct. We have scoped the pins on the TSC2046E and verified that they have the same signals that we see in the FPGA.
We tried substituting resistors for the touch screen and got different readings when the 3 resistor net was connected to X+ Y+ X- and Y+ X+ Y- (e.g. the X and Y readings did not swap when the resistor nets were connected across the associated inputs)
Note, there is a typo on the schematic, C222 is 10nF, just like C221, C223, and C224.
What is the SPI speed and how long is the interval between reading Y (0x90) and reading X (0xD0)?
Also, for debug purpose -- removing the caps C221 and C222 makes any difference?
4035.PCD TSC2046E Timing0001.pdf
The I2C waveform shows some problem. Comparing with the I2C data reading waveform (24 DCLK cycle per reading) shown in Figure 9 of the d/s SBAS417, your I2C DCLK provides only 21 DCLKs in a readying frame.
Thus, it seems not a hardware problem but some problem at the FPGA software.
The waveform is generated by the FPGA to communicate with the TSC2046. Unlike an SPI or I2C, it does not operate in 8 bit chunks. Instead it sends the 8 bit command to the TSC2046, waits for busy to go high and then low, and then reads the next 8 or 12 bits (depending on the command) from the TSC2046. This code worked on the previous board. If there needs to be more clocks, I can easily add them, but I do not see where those are required in the specification. Thank you for your assistance.
I tested the following suggestions:
1) Removed C221 and C222. No change in the data read from the touch panel.
2) Reduced the frequency of DCLK to 2MHz. No change in the data read from the touch panel.
3) Added 4 more DCLK cycles before raising nCS (still at 2MHZ). No change in the data read from the touch panel.
4) Reduced the frequency of DCLK to 1MHz (still with the extra DCLK cycles). No change in the data read from the touch panel.
Tomorrow I will take pictures of the signals connecting the TSC2046 to the touch panel and post them to this forum.
Thank you again for all of your help, in the words of Edison, "I have not failed. I've just found 10,000 ways that won't work".
Besides the SPI waveform, please also get the /PENIRQ waveform (which tells a lot about the TSC itself), and the X+, X-, Y+, and Y-.
Additionally, please also email me the related source code (with explanation) or the details of your program description.
Red (10V per division) is X+, Yellow (2V per division) is X-, H 10uS per division:
Red (10V per division) is Y+, Yellow (2V per division) is Y-, H 10uS per division:
Waveform, DCLK is 1 MHz:
The PENIRQ is not connected to to FPGA so adding it to the waves would not be easy. If you need that data to diagnose the problem, I could get a technician to add a jumper wire sometime this afternoon. Please send me your e-mail address for the source code.
Thank you very much,
The analog interface waveforms seem totally out off normal, which may be because you do not take long enough data.
What data did you read from TSC2046 with such analog signals? During the period, Is any touch is applied to the touch panel, and is the I2C active (working state)?
Attached is what you may expect from the TSC2046 analog interface waveform, where, ch#1 ~4 are X+, X-, Y+, Y- respectively. I also marked the periods when the TSC is sample/read X, Y, Z1 and Z2.
OK, don't worry about the /PENIRQ at this moment, and let's focus on analog interface for now!
Best regards,Wendy F.
Based on our discussion the last Friday, I would like to check your touch panel first.
To check the touch panel -- disconnect the touch panel from the system, and
using an ohmmeter to measure the resistance between the X+ and the X-; and the Y+ and Y-, which should be typically between 200 ~ 900 ohms. And measure the resistance e a X pin (X+ or X-) and a Y pin (Y+ or Y-), which should be almost infinite or as least hundreds Mohms.
With touch on the panel:
measure the resistance between the X+ and the X-; and the Y+ and Y-, which should be exactly the same as that without touch. And measure the resistance between a X pin (X+ or X-) and a Y pin (Y+ or Y-), which should be some hundreds ohms to a couple of Kohms, depending by the touch pressure and stronger touch results in lower ohms and weak touch results in higher ohms.
The next, we have to check the connection between the touch panel and the TSC. Generally speaking, the connetion should be designed as simple, as sesure, as short as possible. To make sure the connection is good, you may power up the system, but do NOT run any software/firmware, and then use a voltmeter to measure the TSC2046 analog pins --
TSC2046 X+ pin or X- pin should be high; Y+ pin or Y- pin should be low;
TSC2046 X+ pin, X- pin, Y+ pin, or Y- pin should all be low.
Please check yours and let me know if yours are not match the above.
Do not hear your further response and am wondering if the issue had been found and the problem had been fixed!
Would provie the TSC2046 EVM source code to me?
sent it to the below e-mail account. plz
E-mail : email@example.com
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.