defragster
Senior Member+
I tried a hardware driven interrupt version of XPT2046_Touchscreen/ /examples/TouchPaint/TouchPaint.ino
It failed to function even after resolving the cascading issue.
I punted and started up a TimerInterrupt that will check for touch and works exactly the same as I modeled the Interrupt version. Somewhere the HDW interrupt chain is broken where the timer chain thrives?
Infact with three lines swapped the hardware version works intermittently where the Timer version works well - the initial touch may take 50ms to be caught - but then input is read every 10ms during the touch. So that is polling 20 times/sec and sometimes a touch is missed. Any touch is recorded then if the user app asks or not. From there as often as the user requests touch data it will be provided during a touch - on the adjustable 10ms boundary.
<edit>: the hardware interrupt is alive just fine and cascading badly. The problem is the restraint I put on it somehow makes it miss too many touches and fails to report them. I cleaned the edges and made it work on the timer and all is as expected. Time or HDW it should work the same - or at least show something different than I was seeing.
It failed to function even after resolving the cascading issue.
I punted and started up a TimerInterrupt that will check for touch and works exactly the same as I modeled the Interrupt version. Somewhere the HDW interrupt chain is broken where the timer chain thrives?
Infact with three lines swapped the hardware version works intermittently where the Timer version works well - the initial touch may take 50ms to be caught - but then input is read every 10ms during the touch. So that is polling 20 times/sec and sometimes a touch is missed. Any touch is recorded then if the user app asks or not. From there as often as the user requests touch data it will be provided during a touch - on the adjustable 10ms boundary.
<edit>: the hardware interrupt is alive just fine and cascading badly. The problem is the restraint I put on it somehow makes it miss too many touches and fails to report them. I cleaned the edges and made it work on the timer and all is as expected. Time or HDW it should work the same - or at least show something different than I was seeing.
Last edited: