XPT2046 & ADS7843 touch screen controller setup problem.

Thread Starter

Spottymaldoon

Joined Dec 4, 2015
63
With a PIC 32MX I have been struggling to get a touch screen working via SPI using the most popular China-made 7"TFT ensemble. The board comes equipped with an XPT2046 resistive touch screen controller which, in frustration, I have now replaced with a TI ADS7843 (but no improvement).

I only need 8 bit resolution for the XY coordinates but I'm getting wildly inconsistent (low) numbers for my XY. The main reason for this post is to ask you to please look at the scope traces in the attachment.

Obviously, the top trace is the SPI clock; the next shows the X and Y commands b'11011000' and b'10011000' and the final trace shows the two 8 bit 'replies' from the controller chip.

My question is shouldn't the replies have the same duration as the (master) clocking - because they are obviously slower. The clock frequency of ~1.3MHz should be well within the capability of this chip. TOUCH_SCREEN_SCOPE25JUN17.jpg
 

Thread Starter

Spottymaldoon

Joined Dec 4, 2015
63
Replying to myself, the clock pulse (end) triggers each bit coming back from the slave and what seems to be happening in the traces is that, after the last returned bit of the response, the baseline is not returned to zero - making it look as if the response byte is longer than the 8 clock bits. The two responses can then be read as 01110011 and 11010011 which still don't correspond to a sensible XY value.

What I'd appreciate would be a response from somebody who has had success working with either of these chips as I am at a brick wall right now.
 
Top