Well, the first problem is that the pinInt
was left pulled to HIGH all the time. That's why the display was in interrupt mode all the time.
I pulled it LOW, and commented:
attachInterrupt(pinInt, onInterrupt, RISING);
And it's working. It would be nice if I can figure out re-enabling the interrupt functionality in the future, but now I'm quite happy I got it to work.
One issue I found, is that putting pinInt
in input mode, locks the display in constant interrupt mode, even if I'm not enabling attachInterrupt
function.
void TAMC_GT911::reset() {
pinMode(pinInt, OUTPUT);
pinMode(pinRst, OUTPUT);
digitalWrite(pinInt, 0);
digitalWrite(pinRst, 0);
delay(10);
digitalWrite(pinInt, 0);//addr==GT911_ADDR2
delay(1);
digitalWrite(pinRst, 1);
delay(5);
digitalWrite(pinInt, 0);
delay(50);
pinMode(pinInt, INPUT);
//attachInterrupt(pinInt, onInterrupt, RISING);
delay(50);
readBlockData(configBuf, GT911_CONFIG_START, GT911_CONFIG_SIZE);
setResolution(width, height);
}
So, commenting pinMode(pinInt, INPUT);
leave the pinInt
pulled down and problem solved.