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.

  1. #1 by Derrick Brown on March 10, 2013 - 10:39 PM

    Thanks! This helped me alot!

  2. #2 by doc on September 14, 2013 - 3:55 AM

    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.

    • #3 by Nathon on September 14, 2013 - 7:32 AM

      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.

  3. #4 by Joseph Williams on August 15, 2014 - 6:44 PM

    I have this same problem with an Arduino Uno. Any suggestion on how to fix it? Thanks!

    • #5 by Nathon on August 15, 2014 - 9:36 PM

      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.

  4. #6 by reagan on November 14, 2014 - 7:38 PM

    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…

  5. #7 by amin on December 20, 2014 - 8:38 AM

    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.

    • #8 by Nathon on December 20, 2014 - 8:42 AM

      You’re very welcome! I’m glad I could help!

  6. #9 by Akos88 on February 8, 2015 - 11:27 AM

    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

    • #10 by Nathon on February 8, 2015 - 11:30 AM

      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.

  7. #11 by Forrest on February 6, 2016 - 10:54 PM

    I followed your steps, screen responded as described but only on my UNO, not my MEGA! I am stuck! Please assist in anyway. Thanks!

    • #12 by Nathon on February 7, 2016 - 6:40 AM

      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.

  1. Back From Hiatus with Hardware « Nathon Dalton's Blog

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.