3.5" LCD for Arduino Mega 2560 not working, only white screen

Anyone knows which library is used for this LCD on arduino mega 2560. i have tried almost all (HCTFT & UTFT) but none of these is working. In the backside of LCD no controller is mentioned. pics are attached

It has 7 resistor packs. So is probably 8080-16 interface. But it might be 8080-8.

There is no way to read these write-only Shields.

You can try ILI9481, ILI9486, R61581 with UTFT. (8080-16)

Or you can try HX8357B or C with TFT_HX8357. (8080-16)

Or you can try multiple 320x480 controllers with MCUFRIEND_kbv as USE_SPECIAL with either 16-bit or 8-bit.

David.

david_prentice:
It has 7 resistor packs. So is probably 8080-16 interface. But it might be 8080-8.

There is no way to read these write-only Shields.

You can try ILI9481, ILI9486, R61581 with UTFT. (8080-16)

Or you can try HX8357B or C with TFT_HX8357. (8080-16)

Or you can try multiple 320x480 controllers with MCUFRIEND_kbv as USE_SPECIAL with either 16-bit or 8-bit.

David.

Thanks David, i have tried all you mentioned but mcufriend_kbv library is only for arduino uno, if u have this library for mega then plz send b/c i spend about two days to solve this LCD problem but still no success

Yes, it is designed for write-read Shields e.g. Uno-style Shields.

But you can always use a SPECIAL.

From the mcufriend_how_to.txt file :

  1. If you do not have a standard Uno Shield, you can add a SPECIAL to the mcufriend_special.h
    Edit mcufriend_shield.h: #define USE_SPECIAL
    Edit mcufriend_special.h: e.g. #define USE_MEGA_16BIT_SHIELD
    If your "special" is write-only, the library can not read the ID. It always returns 0xD3D3

I suggest that you try all the 320x480 IDs from the how_to list with USE_MEGA_16BIT_SHIELD
e.g. tft.begin(0x9090);
And then repeat with USE_MEGA_8BIT_SHIELD

David.

Still unable to start LCD, tried almost all libraries and tweaks as mentioned in this forum, but only white screen, but in UTFT_geometry_demo there is a LCD fluctuation after 15 seconds of programming.

If you want help, take notes as you make each test. (with pencil and paper)

Then you can actually report something.

in UTFT_geometry_demo there is a LCD fluctuation after 15 seconds of programming.

What constructor?
What example?
What UTFT version?
Where did you get this version?

The official UTFT distribution has no "UTFT_geometry_demo"

David.

I have tested TFT_HX8357 library with example of “UTFT_demo_480_320”. after uploading program, LCD displays various colors but no text was displayed, i m writing program if anyone know how to display the text then please write to this post.
default program is shown here, however i have commented these line //randomSeed(analogRead(0));
//Serial.begin(38400);
if i uncomment these line LCD does not show any thing

// Demo based on:
// UTFT_Demo by Henning Karlsen
// web: http://www.henningkarlsen.com/electronics
/*

The delay between tests is set to 0. The tests run so fast you will need to
change the WAIT value below to see what is being plotted!

This sketch uses the GLCD and font 2 only.

Make sure all the required fonts are loaded by editting the
User_Setup.h file in the TFT_ILI9341 library folder.

If using an UNO or Mega (ATmega328 or ATmega2560 processor) then for best
performance use the F_AS_T option found in the User_Setup.h file in the
TFT_ILI9341 library folder.

 #########################################################################
 ###### DON'T FORGET TO UPDATE THE User_Setup.h FILE IN THE LIBRARY ######
 ######            TO SELECT THE FONTS YOU USE, SEE ABOVE           ######
 #########################################################################
*/

// Delay between demo pages
#define WAIT 1000 // Delay between tests, set to 0 to demo speed, 2000 to see what it does!

#define CENTRE 240

#include <TFT_HX8357.h> // Hardware-specific library

TFT_HX8357 tft = TFT_HX8357();       // Invoke custom library
 
#define TFT_GREY 0x7BEF

uint32_t runTime = 110;

void setup()
{
 //randomSeed(analogRead(0));
 //Serial.begin(38400);
// Setup the LCD
 tft.init();
 tft.setRotation(1);
}

void loop()
{
 int buf[478];
 int x, x2;
 int y, y2;
 int r;

 runTime = millis();
// Clear the screen and draw the frame
 tft.fillScreen(TFT_BLACK);

 tft.fillRect(0, 0, 480, 13, TFT_RED);

 tft.fillRect(0, 305, 480, 320, TFT_GREY);
 tft.setTextColor(TFT_BLACK,TFT_RED);

 tft.drawCentreString("* TFT_HX8357 *", CENTRE, 3, 1);
 tft.setTextColor(TFT_YELLOW,TFT_GREY);
 tft.drawCentreString("Adapted by Bodmer", CENTRE, 309,1);

 tft.drawRect(0, 14, 479, 305-14, TFT_BLUE);

// Draw crosshairs
 tft.drawLine(239, 15, 239, 304, TFT_BLUE);
 tft.drawLine(1, 159, 478, 159, TFT_BLUE);
 for (int i=9; i<470; i+=10)
   tft.drawLine(i, 157, i, 161, TFT_BLUE);
 for (int i=19; i<220; i+=10)
   tft.drawLine(237, i, 241, i, TFT_BLUE);

// Draw sin-, cos- and tan-lines  
 tft.setTextColor(TFT_CYAN);
 tft.drawString("Sin", 5, 15,2);
 for (int i=1; i<478; i++)
 {
   tft.drawPixel(i,159+(sin(((i*1.13)*3.14)/180)*95),TFT_CYAN);
 }
 
 tft.setTextColor(TFT_RED);
 tft.drawString("Cos", 5, 30,2);
 for (int i=1; i<478; i++)
 {
   tft.drawPixel(i,159+(cos(((i*1.13)*3.14)/180)*95),TFT_RED);
 }

 tft.setTextColor(TFT_YELLOW);
 tft.drawString("Tan", 5, 45,2);
 for (int i=1; i<478; i++)
 {
   tft.drawPixel(i,159+(tan(((i*1.13)*3.14)/180)),TFT_YELLOW);
 }

 delay(WAIT);

 tft.fillRect(1,15,478-1,304-15,TFT_BLACK);
 tft.drawLine(239, 15, 239, 304,TFT_BLUE);
 tft.drawLine(1, 159, 478, 159,TFT_BLUE);

// Draw a moving sinewave
int col = 0;
 x=1;
 for (int i=1; i<(477*15); i++) 
 {
   x++;
   if (x==478)
     x=1;
   if (i>478)
   {
     if ((x==239)||(buf[x-1]==159))
       col = TFT_BLUE;
     else
       tft.drawPixel(x,buf[x-1],TFT_BLACK);
   }
   y=159+(sin(((i*0.7)*3.14)/180)*(90-(i / 100)));
   tft.drawPixel(x,y, TFT_BLUE);
   buf[x-1]=y;
 }

 delay(WAIT);
 
 tft.fillRect(1,15,278-1,304-15,TFT_BLACK);

// Draw some filled rectangles
 for (int i=1; i<6; i++)
 {
   switch (i)
   {
     case 1:
       col = TFT_MAGENTA;
       break;
     case 2:
       col = TFT_RED;
       break;
     case 3:
       col = TFT_GREEN;
       break;
     case 4:
       col = TFT_BLUE;
       break;
     case 5:
       col = TFT_YELLOW;
       break;
   }
   tft.fillRect(150+(i*20), 70+(i*20), 60, 60,col);
 }

 delay(WAIT);
 
 tft.fillRect(1,15,478-1,304-15,TFT_BLACK);

// Draw some filled, rounded rectangles
 for (int i=1; i<6; i++)
 {
   switch (i)
   {
     case 1:
       col = TFT_MAGENTA;
       break;
     case 2:
       col = TFT_RED;
       break;
     case 3:
       col = TFT_GREEN;
       break;
     case 4:
       col = TFT_BLUE;
       break;
     case 5:
       col = TFT_YELLOW;
       break;
   }
   tft.fillRoundRect(270-(i*20), 70+(i*20), 60, 60, 3, col);
 }
 
 delay(WAIT);
 
 tft.fillRect(1,15,478-1,304-15,TFT_BLACK);

// Draw some filled circles
 for (int i=1; i<6; i++)
 {
   switch (i)
   {
     case 1:
       col = TFT_MAGENTA;
       break;
     case 2:
       col = TFT_RED;
       break;
     case 3:
       col = TFT_GREEN;
       break;
     case 4:
       col = TFT_BLUE;
       break;
     case 5:
       col = TFT_YELLOW;
       break;
   }
   tft.fillCircle(180+(i*20),100+(i*20), 30,col);
 }
 
 delay(WAIT);
 
 tft.fillRect(1,15,478-1,304-15,TFT_BLACK);

// Draw some lines in a pattern

 for (int i=15; i<304; i+=5)
 {
   tft.drawLine(1, i, (i*1.6)-10, 303, TFT_RED);
 }

 for (int i=304; i>15; i-=5)
 {
   tft.drawLine(477, i, (i*1.6)-11, 15, TFT_RED);
 }

 for (int i=304; i>15; i-=5)
 {
   tft.drawLine(1, i, 491-(i*1.6), 15, TFT_CYAN);
 }

 for (int i=15; i<304; i+=5)
 {
   tft.drawLine(477, i, 490-(i*1.6), 303, TFT_CYAN);
 }
 
 delay(WAIT);
 
 tft.fillRect(1,15,478-1,304-15,TFT_BLACK);

// Draw some random circles
 for (int i=0; i<100; i++)
 {
   x=32+random(416);
   y=45+random(226);
   r=random(30);
   tft.drawCircle(x, y, r,random(0xFFFF));
 }

 delay(WAIT);
 
 tft.fillRect(1,15,478-1,304-15,TFT_BLACK);

// Draw some random rectangles
 for (int i=0; i<100; i++)
 {
   x=2+random(476);
   y=16+random(289);
   x2=2+random(476);
   y2=16+random(289);
   if (x2<x) {
     r=x;x=x2;x2=r;
   }
   if (y2<y) {
     r=y;y=y2;y2=r;
   }
   tft.drawRect(x, y, x2-x, y2-y,random(0xFFFF));
 }

 delay(WAIT);
 
 tft.fillRect(1,15,478-1,304-15,TFT_BLACK);

// Draw some random rounded rectangles
 for (int i=0; i<100; i++)
 {
   x=2+random(476);
   y=16+random(289);
   x2=2+random(476);
   y2=16+random(289);
   if (x2<x) {
     r=x;x=x2;x2=r;
   }
   if (y2<y) {
     r=y;y=y2;y2=r;
   }
   tft.drawRoundRect(x, y, x2-x, y2-y, 3,random(0xFFFF));
 }

 delay(WAIT);
 
 tft.fillRect(1,15,478-1,304-15,TFT_BLACK);

 for (int i=0; i<100; i++)
 {
   x=2+random(476);
   y=16+random(289);
   x2=2+random(476);
   y2=16+random(289);
   col=random(0xFFFF);
   tft.drawLine(x, y, x2, y2,col);
 }

 delay(WAIT);
 
 tft.fillRect(1,15,478-1,304-15,TFT_BLACK);

 for (int i=0; i<10000; i++)
 {
   tft.drawPixel(2+random(476), 16+random(289),random(0xFFFF));
 }

 delay(WAIT);

 tft.fillRect(0, 0, 480, 320, TFT_BLUE);

 tft.fillRoundRect(160, 70, 319-160, 169-70, 3,TFT_RED);
 
 tft.setTextColor(TFT_WHITE,TFT_RED);
 tft.drawCentreString("That's it!", CENTRE, 93,2);
 tft.drawCentreString("Restarting in a", CENTRE, 119, 2);
 tft.drawCentreString("few seconds...", CENTRE, 132, 2);

 tft.setTextColor(TFT_GREEN,TFT_BLUE);
 tft.drawCentreString("Runtime: (msecs)", CENTRE, 280, 2);
 tft.setTextDatum(TC_DATUM);
 runTime = millis()-runTime;
 tft.drawNumber(runTime, CENTRE, 300,2);
 tft.setTextDatum(TL_DATUM);
 delay (10000);
}

Please use the code tag and put the entire sketch inside it.

It looks like you are using Bodmer's TFT_HX8357 library
Make sure that you are using a current version. e.g. from GitHub

Then try the library example.
Report any problems.

When you have a problem with an official example from a Library:

  1. quote library version. (Library Manager will tell you)
  2. quote library example sketch name.

It is always best to refer to the original example. i.e. by name or a link. Readers can obtain it from the Internet or their own library installation.
There is little point in copy-pasting a public file to a message.

If you have a problem with your code, then it i wise to attach (or paste) your whole sketch.
After all, your code was not public.

Colours are often defined in a macro. e.g. TFT_PINK
A macro called PINK will conflict with the PIN input register for PORTK on a Mega2560.

David.

It seems I got the same display, see this post.

ZinggJM:
It seems I got the same display, see this post.

i have seen your post but that thread is also unsolved, i have tried almost all libraries but on TFT_HX8357 is changing colors, UTFT library is not working, one thing i want to ask that this LCD needs only 4 wires(SPI) to work or it also needs 16 data lines from d0 to d15,

I have given you accurate advice in #1, #3, #8 and asked questions in #5.

It would take 10 minutes of your life to follow advice, take notes, report back.

If you are not prepared to make this effort, there is little that anyone can do to help you.

These displays are write-only. The Chinese Vendors know little. If bought from Ebay, they will refund you. Even if you try to ask, many will not help you. They just refund you.

David.

@trm33

And please take 2 minutes to modify your post #6 and put your code into code tags!

SPI is only for touch.

And the Touch pins are routed to GPIO pins and not the SPI pins.
The microSD is routed to the Mega2560 SPI pins but in such a way that it will not work reliably.

Believe me. None of the Red mcufriend mega2560 shields work 100%.
The Red mcufriend uno shields do work but most use the wrong 74xx245 chips.

These shields are cheap. Obviously the Ebay sellers make a profit but only if customers do not complain when they receive faulty items.

David.

I have downloaded this pic from this forum from https://forum.arduino.cc/index.php?topic=375821.0 post no.06, i want to ask that the pin configuration is same for my display (pic attached in post 1 of this thread) or it is also changed

That JPEG would apply for this USE_MEGA_8BIT_SHIELD as a USE_SPECIAL

It does not look anything like the JPEG in the Original Post.

If you are not prepared to provide accurate information, I will not bother replying.

David.

trm33:
I have downloaded this pic from this forum from https://forum.arduino.cc/index.php?topic=375821.0 post no.06, i want to ask that the pin configuration is same for my display (pic attached in post 1 of this thread) or it is also changed

Clearly different. board in #1 is 16bit, board in #14 is 8bit. My board is like #1, but without LDO.

Thanks for modifying post #6.

Please answer all questions from David completely; you can’t get better help, and with complete information, other readers can take profit.

Jean-Marc

You can try this library GxTFT with this example: GxTFT_myTFTs_graphicstest with the following line uncommented:

#include "myTFTs/my_3.5_HVGA_480x320_MEGA.h"

To see if you get output on your display. This would be an indication you have the same display.

Text will be partially inverted, because ILI9481 is used instead of ILI9486.

Hello , I have same Problems.My screen is also white.
I use this screen .

This is 3.5" LCD for Arduino Mega 2560 with 16 bit shield ( Picture is attached).
It uses ILI 9486/ILI 9588 driver.

For testing I use examples and libraries from :3.5inch Arduino Display-Mega2560 - LCD wiki

I verify the Examples without Errors but after download to Mega nothing happens .
Have somebody this Display and please show me one example .

It should work fine with UTFT v2.8.3 from RinkyDink
use MODEL = ILI9486 in the constructor

Or use Bodmer's TFT_HX8357 library from GitHub
Configure User_Setup.h for ILI9486

I would expect the lcdwiki examples to work.
Please provide links to the actual library and actual example that is giving a problem.

Note that you may have to select the correct constructor.
Copy-paste the constructor line you are using.
Do not post the whole sketch. I want to see the original code from lcdwiki. That is why I ask for the web link.

UTFT is well known but SLOW.
TFT_HX8357 is good and FAST.
LCDWIKI is probably quite slow.

David.

Thanks David ,
it was rash and effective.I try with Bodmers libraries and works fine.
So I stay with TFT_HX8357 library .