Due with st7781 2.4" TFT touch module.


I have a $5 TFT with touch module, like this film .
Most important is, the used chips are 5V tolerant, but this module is 3.3 volt, you can safe connect it to Due.
5V is used only for backlight, and no connect to any data pins.
This cheapest module works fine with Uno and Mega, but not with Due.
It is no wonder, because Due is very different hardware.
I changed the Uno/Mega library and it looks like I’m close to success, but I ran out of ideas.

What works ?
TFT works.
Example graphictest runs fine and fast.

What not works ?
SD card, but I think there are many working libraries, just search.
Touch not works.
Example touchscreendemoshield works and returns some values by serial, that mean hardware is connected well.
But example tftpaint not works.
I think the problem is, the touch pins are shared with TFT data.
AVR ports are different of ARM ports.
It is 4-wire resistive touch, read by ADC.
Something goes wrong, and program can’t read true values.

The files are in attachment.

Is someone wants to play with it?


dueTFTst7781.zip (127 KB)

ARDUINO uno + tft7781 made in china, NOT work