XPT2046 touchscreen problem

Hello,

I bought this touchscreen:2.8inch Touch LCD Shield for Arduino
I'm using interrupt to detect touch of the screen and it works fine. Problem occurs when I try to read X, Y values using library function that was provided with the screen. This line:
Xpt.xpt2046_write_byte(0x90); generates the same interrupt and the loop goes on and on.

The function above is just SPI.transfer(). Thank you for answers.

There is an XPT2046 library which is available through the Arduino IDE. Maybe try that and see if it functions better. In the library folder, you'll find examples which detect a touch and indicate the coordinates of the touched point.