Freetonics Ethermega and ilI9341 (adafruit 2.8" display)

Hello,
I have an Arduino Uno, and Arduino Mega working ok with Adafruit 2.8 inch ILI9341. However, I cannot get it working with a ETHERMEGA.
Example adafruit sketches and my sketch load ok to the Ethermega.
Serial monitor starts OK and i can see ethernet loading ok, and some program runtime messages.
Serial monitor also indicates that the touch screen is working ok as it is logging touch messages and co-ordinates to the serial monitor.

The backlight of the tft turns on, but no display.
I have two screens and have tested both on the UNO and they are working ok. Just not EtherMega.

I have changed the SPI pin assignments to avoid EtherMega pin 4 (SD Card) and also avoiding pin 10 (Ethernet).

#define TFT_DC 5
#define TFT_CS 6
#define TFT_MOSI 51
#define TFT_CLK 52
#define TFT_RST 2
#define TFT_MISO 50
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_CLK, TFT_RST, TFT_MISO);

I’d greatly appreciate anyone helping me identify if I’m using some wrong pin assignments. maybe I’m using something that is reserved for another purpose on the EtherMega?

Fritzing image of setup attached also (my fist one ever!)

  • Fritzing source file with code inserted

The CS line in your Fritzing diagram is connected to analog pin 6, but you defined the pin in the snippet as digital pin 6.

Without setting the correct chip select pin, you can not talk to the device.

You say, in the snippet, that the reset pin is pin 2, but there is nothing connected to pin 2 in the Fritzing diagram.

The absolute voltage rating of the serial lines is, according the Adafruit's documentation 4.9V. Connecting that device directly to a 5V device is not a good idea.

Thanks Paul,
You were correct. Thanks for your fresh eyes on the problem.
Pin 5 and Pin 6 were both connected to the Analog side instead of the Digital side.
I moved them over and everything works great.

Many thanks

Charles