Other Parts Discussed in Thread: TSC2007
We designed custom hardware including the TSC2003 controller. We are dealing with the following problem. Occasionally, the TSC2003 reports an erroneous press. When this happens, the X coordinate is wrong, while the Y coordinate is correct.
We noticed that when the reported X coordinate is erroneous, the z1 value is 0. This is the code that implements the conversions following a touch event.
/* y- still on; turn on only y+ (and ADC) */
tc->y = tsc2007_xfer(tsc, READ_Y);
/* turn y- off, x+ on, then leave in lowpower */
tc->x = tsc2007_xfer(tsc, READ_X);
/* turn y+ off, x- on; we'll use formula #1 */
tc->z1 = tsc2007_xfer(tsc, READ_Z1);
tc->z2 = tsc2007_xfer(tsc, READ_Z2);
/* Prepare for next touch reading - power down ADC, enable PENIRQ */
If we understand correctly, z1=0 is inconsistent in the sense that z1 should never be 0. Is it possible that z1=0 is due to a hardware problem? In general, what could explain such an inconsistent value?
Thank you in advance.