Hello Again
I am currently implementing the code for the Touch Panel part based on the XPT2046 controller.It uses a SPI interface. It is almost done (I havent tried it yet)
However I just noticed something.
Take a look at the datasheet
https://www.waveshare.com/w/upload/9/98/XPT2046-EN.pdf
You can see there is a PENIRQ output. "Theoretically" this seems to be a "interrupt" pin.
Following the ideas of this thread
https://www.electro-tech-online.com/threads/pic-spi-with-interruptions.145357/
and since SPI is always started by the master, I was thinking of using interruptions so that the LCD can notify the PIC (master) to start transmition whenever it has been touched, through an interruption.
And for this I thought of using the PENIRQ pin, since.. you know... it is supposed to trigger an interrupt.
BUT, then I notice what it says on page 25 of the datasheet
So, I am understanding that the "interruption" is only enabled whenever the master sends a control byte with a PD0= 0 to the slave!!
So, ok the interruption will tell me when the transmission has finished, but what use is this!. How use is this "interruption" if to use the interruption I have to be constantly looping and sending control bytes from the master??
Isnt supposed that interruptions save me from doing these pooling wasteful thing???
Am I understanding this wrong???
Any comment greatly appreciated