White Background & Backlight Only on 2.8” TFT Touch Shield


Overview

My first post back from hiatus talked about how I was getting into hardware components and programming them. Although I’ve had both hardware and software experience, the experience of producing home-grown hardware/software solutions is something new to me. It is very fascinating though and I am absolutely gitty about it… just ask my coworkers. I can’t shut up about it.

As you may have read in the previous post, after careful consideration I ordered up a bunch of hardware. For the sake of this article, however, only two items will be important from that list. They are the Seeeduino Mega 2560 ADK dev board and the 2.8″ TFT Touch Shield. The problem I was experiencing was that when I plugged the 2.8″ TFT Touch Shield (“shield”) into the Seeeduino Mega 2560 ADK (“Seeeduino”), all I got was a white background with the backlight on. There was nothing else going on. I tried just about every library under the sun, every example, my own code, searching Google for solutions, etc. I saw that lots of folks were having this problem, but no one had any solutions. So, I eventually posted the problem to the Seeduino forums.

I didn’t get any replies, only more people with the same issue getting in on the action. Fortunately someone at Seeeduino took pitty on me and emailed me about it. After a couple of emails back and forth it turns out the fix is quite easy. It has to do with the Mega 2560 pinout being different than the standard arduino/seeeduino. As you can see in the image below, the regular Arduino (Uno for instance) has 14 Digital I/O pins and 6 analog input pins whereas the Mega 2560 has 54 digital I/O pins and 16 analog input pins.

Due to this difference the screen has to use different pins. Unfortunately the example sketches in the TFT library don’t tell you that you have to change anything so what you wind up with on the Mega 2560 boards is the TFT screen with a blank white background and the backlight on.

Note: If you don’t have the TFT library, you can obtain it here.

Here’s how to fix it.

  1. Open Notepad
    1. Click Start > All Programs > Accessories > Click Notepad
  2. Click File > Open
  3. Browse to C:\Program Files\Arduino\Libraries\TFT\
  4. To the right of File name, select “All Files (*.*)” from the drop down list
    1. It will currently have “Text Documents (*.txt)” selected, disallowing you to see the TFT.h file.
  5. Select TFT.h and click Open
  6. Scroll down to where it says “#define SEEEDUINO” (approximately line 29)
  7. Change the word SEEEDUINO to say MEGA.
  8. Click File > Save
  9. Close Notepad

Congratulations! You’ve successfully fixed the TFT library so that you can use it with a Arduino or Seeeduino Mega 2560 or Mega 2560 ADK! On my board I tested it out and everything was great after that! Try the drawCircle sketch from the library examples once you fix this.

Advertisements

13 thoughts on “White Background & Backlight Only on 2.8” TFT Touch Shield

  1. Thank you! Been looking for the solution around for a month all over the place. Now my 2.8″ TFT Touch Shield v1.0 by Seeed Studio works with my Arduino Mega ADK.

    1. No problem! I’m glad I could help! I ran into this problem and worked on it forever. Then I got a hold of Seeed Studios. They researched it and got me going. I figured the answer needed to be online for other people to find though.

    1. This was a fix specifically aimed at the MEGA. If the UNO is doing it, I would contact the company you purchased the screen from to obtain support. I always purchase from Seed Studios since they’re great with support.

  2. yes! this day will henceforth be known as ‘nathon saves the day’ day. i am feeling a group field trip coming on to Shenzen China to meet frankie & loovie and jackie chan…

  3. Thank you Nathon! It took several evenings of searching to find your site and the real solution. I wish Seeed would post this somewhere more prominently. The display now works great with my Mega.

  4. Hi,
    I replaced the word, but still not wroking, the same problem looks, however Im using mega and your tft library.
    Do I need to modify anything else in the program? or even in the hw – new connections, links?
    Thanks,
    Akos

    1. Those changes should work. I’d try making sure the screen is plugged in correctly, delete the library and download it again, then try the default TFT sketch.

    1. These steps were only for the MEGA since it changes the underlying library to use the MEGA definition. I’m not sure why it would work on the UNO and not the MEGA. You’ll probably need to contact the screen vendor or manufacturer for further troubleshooting steps. Sorry I couldn’t help further.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s