Dear All,
I have facing the /PENIRQ problem. I did tried a lot of testing and changing a few ADS7843 and TFT-touch-screen but still no working.
I would like to compare the result with you all.
1) I'm using 3.2" screen. I did measure the touch screen resistance for the X-,X+ is ~300Ohm and Y-,Y+ is ~400Ohm. (without connecting to ADS7843 device)
2) Connect touch screen pin X-,X+,Y-,Y+ to ADS7843 and measure the voltage at point X-,X+,Y-,Y+. (ADS7843 operate at 3.3V and /PENIRQ external pull up 100K Ohm)
No touch on screen:
X+ = 2.315V
Y+ = 2.315V
X- = 0.000V
Y- = 0.000V
/PENIRQ = 3.3V
Touch on screen:
X+ = 2.315V
Y+ = 2.315V
X- = 2.315V
Y- = 2.315V
/PENIRQ = 3.3V
I wonder why the /PENIRQ wouldn't pull to low as per datasheet said once the /PENIRQ is pulled LOW, a voltage typically will not exceeding 0.65V.
Is it we need to initialize the ADS7843 using coding before we can use the PENIRQ?
void GetScrXY(int *x, int *y)
{
unsigned char msb, lsb;
// Get X coordinate
CS = 0;
dly(6);
spi_write(0xD0);
dly(80); // BUSY
msb= spi_write(0x00); // msb
lsb = spi_write(0x00); // lsb
CS = 1;
*x = (msb*0x100) | lsb;
dly(100);
// Get Y coordinate
CS = 0;
dly(6);
spi_write(0x90);
dly(80); // BUSY
msb= spi_write(0x00); // msb
lsb = spi_write(0x00); // lsb
CS = 1;
*y = (msb*0x100) | lsb;
}
void Check_PENIRQ(void)
{
int x,y;
GetScrXY(&x, &y) ;
if(PENIRQ)
LED = 0;
else
LED = 1;
}
Is there anyone can help me and give some advice?
Thank you,..