Hi, I'm newbie with displays, and after more or less difficulties, I could make the things runing,
I share some observations:
On arduino UNO, after mapping correctly the pins according to display design, it is working quite well with a library called TFTLCD, found in this forum:
http://misc.ws/2013/11/08/touch-screen-shield-for-arduino-uno/Connected to Arduino MEGA, is is more complicated, the TFT pins D0 to D7 must be connected to pins 22 to 29, the other pins are unchanged (MEGA has strange port arrangement connected to digital pins 0 to 13, therefore the library is not able to use the shield directly connected to MEGA). I have made the tes and it is working well also.
The touchscreen share the same pins as TFT, therefore it can be used only when LCD_CS is high (LCD outputs are high impedance). To run the touchscreen alone, on UNO, this is added in setup():
pinMode(A3, OUTPUT);
digitalWrite(A3, HIGH);
The SD card is also working well... BUT there is a problem: the voltage given to the SD is 4.3V, and the absolute maximum voltage allowed for SD is 3.6V... DANGER to burn the SD card. This is caused by the HC245 buffer, which is not a level shifter, it has internal diodes between I/O and VCC and it push up the VCC3.3V by taking current on the arduino I/O. When Arduino is connected to USB (USB voltage on my computer=4.6V), the SD is powered at 3.9V; but with the jack, the SD has 4.3V.
I am not sure how to solve that... adding level shfters somewhere... The most safe is not using the SD slot at all.
About the libraries for TFT:
The author Mike McCaule, explained he has used the Adafruit TFT library, and modified several elements: capability to mirror X and Y, update the pins for UNO and MEGA, and use a faster method for rotation.
Anyway, it is very slow. This display is able to show moovies at 60fps, but filling it with plain color, it takes ~0.3 second on Arduino.
320x240=76800 pixels with 16MHz processor, that means ~70 CPU clock per pixel, it seems not very optimized...
Also the tested library has poor text function (the text background is always transparent, making problems to overwrite an existing text; font management does not exist, writing bigger than 8point font is managed by zoom 2, 3, 4, ... times the 8point font, the result is slow and ugly).
The display has some hardware accelerator (scrolling functions, layers management,...), but this is not used with the library; except rotation.
Does someone here has made comparaison between the available libraries?