I have been struggling to get my Mega 2560 ADK and LCD 2.8″ TFT TOUCH DISPLAY (from http://iteadstudio.com) to work together and knew the problem must be with the pinouts that is different between the Uno and Mega boards. (I would suggest getting one of the Adafruit version of the TFT displays)
First thing I did was to change the pins used in the main class constructor UTFT to the following:
Even though the A2 RST pin is not available on the TFT Display. Still no luck with just a white screen.
Then, I emailed Henning Karlsen the problem and very quickly received the following response:
“First of all, the 2.8” TFT Touch Shield is not fully supported by the
library due to the lack of the RST pin.
I do not think the big USB connector is a problem as long as all pins go
almost all the way down. Your biggest problem is that the shield was
made for use on a 2009/UNO sized Arduino. If you look at the
requirements for the library you will see that the required pins are
different when using a Mega-based Arduino.
To have any chance of getting this to work you have two options:
1. Use connector wires to connect the shield to the correct pins.
2. Modify the library to use the shield pins. Please see this
com/electronics/h_utft_) How-To. Please understand that this modification impacts the speed arduino_shield_on_mega
of the display operation by 30-40%.
Even if you do either of these options there are still the issue with
the missing RST pin which may cause unforeseen problems.”
“How-To: Modifying UTFT to accept Arduino shields on an Arduino Mega
I have been getting a lot of emails asking why UTFT doesn’t work when using a shield made for an Arduino 2009 or Uno on an Arduino Mega. I will try to explain why here and also show you how to make it work.
To understand this how-to you should have a basic understanding of Bitwise logic and Bitwise operations in C. You should also have a basic understanding of how direct access to the ATmega ports work.
This How-To will only explain how to use 8bit display modules and shields on an Arduino Mega, but if you follow through you should be able to figure out the remaining bit for 16bit modules yourself.”
So I used the easy way and this produced the following “HW_AVR.h” file:
Download, UnZip, Copy and replace this HW_AVR.h file into your UTFT folder, re-compile and upload your examples and now it should work. Not sure when I will run into problems with the RST pin, but will post an update if I do.