3.5" TFT LCD NOT WORKING - white screen, ID =0x0

Greetings Arduino comunity!

I have bought this 3.5" TFT LCD from ebay, and I can't get it to work no matter what I do, what library I use or what tutorial I follow ... All I have is white screen shining brightly and that's it (mind the attached pictures). It supposedly uses one of these controllers: ili9481, ili9468, ili9488, hx8357 or r61581.

I am frustrated to the point of registering on this forum after 10 years of using arduino, just for this one problem - imagine the pain if you can :smiley:

I really need some help and guidance - I would appretiate any help greatly.

My setup is 3.5" TFT LCD with Arduino UNO R3. I do plan to use this LCD with Arduino Mega mini later, but I would just like to get it working first.

I have managed to do some tests, that would be way more helpful were there any guidelines on how to interpret them, if you are not the guy that programmed them ... But anyway, here are the results:


LCD_ID_readreg

Read Registers on MCUFRIEND UNO shield
controllers either read as single 16-bit
e.g. the ID is at readReg(0)
or as a sequence of 8-bit values
in special locations (first is dummy)

reg(0x0000) 00 00 ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 00 00 00 00 Manufacturer ID
reg(0x0009) 01 01 01 01 01 Status Register
reg(0x000A) 00 08 Get Power Mode
reg(0x000C) 00 66 Get Pixel Format
reg(0x0061) 01 01 RDID1 HX8347-G
reg(0x0062) 00 00 RDID2 HX8347-G
reg(0x0063) 01 01 RDID3 HX8347-G
reg(0x0064) 00 00 RDID1 HX8347-A
reg(0x0065) 01 01 RDID2 HX8347-A
reg(0x0066) 00 00 RDID3 HX8347-A
reg(0x0067) 01 01 RDID Himax HX8347-A
reg(0x0070) 00 00 Panel Himax HX8347-A
reg(0x00A1) 01 01 01 01 01 RD_DDB SSD1963
reg(0x00B0) 00 00 RGB Interface Signal Control
reg(0x00B4) 00 00 Inversion Control
reg(0x00B6) 00 00 00 00 00 Display Control
reg(0x00B7) 01 01 Entry Mode Set
reg(0x00BF) 01 01 01 01 01 01 ILI9481, HX8357-B
reg(0x00C0) 00 00 3A 00 02 10 20 00 00 Panel Control
reg(0x00C8) 00 00 00 00 00 00 00 00 00 00 00 00 00 GAMMA
reg(0x00CC) 00 00 Panel Control
reg(0x00D0) 00 44 00 Power Control
reg(0x00D2) 00 04 12 00 00 NVM Read
reg(0x00D3) 01 05 13 01 ILI9341, ILI9488
reg(0x00D4) 00 06 12 00 Novatek ID
reg(0x00DA) 00 00 RDID1
reg(0x00DB) 01 01 RDID2
reg(0x00DC) 00 00 RDID3
reg(0x00E0) 00 00 62 82 56 00 00 00 00 00 00 00 00 00 00 00 GAMMA-P
reg(0x00E1) 01 01 63 83 57 01 01 01 01 01 01 01 01 01 01 01 GAMMA-N
reg(0x00EF) 01 2D 17 17 2D 01 ILI9327
reg(0x00F2) 00 00 00 00 00 00 00 00 00 00 00 00 Adjust Control 2
reg(0x00F6) 00 00 00 00 Interface Control


diagnose_TFT_support

Diagnose whether this controller is supported
There are FAQs in extras/mcufriend_how_to.txt

tft.readID() finds: ID = 0x0

MCUFRIEND_kbv version: 2.9.9

This ID is not supported
look up ID in extras/mcufriend_how_to.txt
you may need to edit MCUFRIEND_kbv.cpp
to enable support for this ID
e.g. #define SUPPORT_8347D

New controllers appear on Ebay often
If your ID is not supported
run LCD_ID_readreg.ino from examples/
Copy-Paste the output from the Serial Terminal
to a message in Displays topic on Arduino Forum
or to Issues on GitHub

Note that OPEN-SMART boards have diff pinout
Edit the pin defines in LCD_ID_readreg to match
Edit mcufiend_shield.h for USE_SPECIAL
Edit mcufiend_special.h for USE_OPENSMART_SHIELD_PINOUT


diagnose_Touchpins

Making all control and bus pins INPUT_PULLUP
Typical 30k Analog pullup with corresponding pin
would read low when digital is written LOW
e.g. reads ~25 for 300R X direction
e.g. reads ~30 for 500R Y direction

Testing : (A1, D7) = 34
Testing : (A2, D6) = 24
Diagnosing as:-
YP,YM: (A1, D7) = 34
XM,XP: (A2, D6) = 24


graphics_test

Serial took 0ms to start
ID = 0x0

Your TouchScreen looks normal.

reg(0x00D3) 01 05 13 01   ILI9341, ILI9488

The ID is probably 0x1301 but I have no idea what manufacturer or part number it might be.

Most 320x480 displays are "MIPI-style". They have consistent User commands. The Manufacturer registers differ.

I suggest that you try forcing some "likely" IDs e.g. all the 320x480 IDs from mcufriend_how_to.txt like 0x8357, 0x9090, 0x9481, 0x9486, 0x9487, ...

Don't worry about mirroring or reversed colours. Just look for a "good steady picture" with vibrant colours. Write the results on paper i.e. any non-White Screen IDs.

Please let me know how you get on.

David.

Hey David, thanks for your quick reply! I really appretiate your effort in helping me out here.

I might be doing something wrong but I have no idea what it is ...

I have modified the begining of the MCUFRIEND_kbv.cpp file (I hope it's what you were talking about when you said forcing ID's) to these ID's:

"#define SUPPORT_8357
#define SUPPORT_8357D_GAMMA
#define SUPPORT_9090
#define SUPPORT_0099
#define SUPPORT_9342
#define SUPPORT_9481
#define SUPPORT_9486
#define SUPPORT_9487
#define SUPPORT_9488
#define SUPPORT_5310
#define SUPPORT_1581
#define SUPPORT_68140
#define SUPPORT_7796
#define SUPPORT_1511

#include "MCUFRIEND_kbv.h"
#if defined(USE_SERIAL)
#include "utility/mcufriend_serial.h"
//uint8_t running;
#elif defined(MBED)
#include "utility/mcufriend_mbed.h"
#elif defined(__CC_ARM) || defined(__CROSSWORKS_ARM)
#include "utility/mcufriend_keil.h"
..."

Test results:


LCD_ID_readreg

Read Registers on MCUFRIEND UNO shield
controllers either read as single 16-bit
e.g. the ID is at readReg(0)
or as a sequence of 8-bit values
in special locations (first is dummy)

reg(0x0000) 00 00 ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 00 00 00 00 Manufacturer ID
reg(0x0009) 01 01 01 01 01 Status Register
reg(0x000A) 00 08 Get Power Mode
reg(0x000C) 00 66 Get Pixel Format
reg(0x0061) 01 01 RDID1 HX8347-G
reg(0x0062) 00 00 RDID2 HX8347-G
reg(0x0063) 01 01 RDID3 HX8347-G
reg(0x0064) 00 00 RDID1 HX8347-A
reg(0x0065) 01 01 RDID2 HX8347-A
reg(0x0066) 00 00 RDID3 HX8347-A
reg(0x0067) 01 01 RDID Himax HX8347-A
reg(0x0070) 00 00 Panel Himax HX8347-A
reg(0x00A1) 01 01 01 01 01 RD_DDB SSD1963
reg(0x00B0) 00 00 RGB Interface Signal Control
reg(0x00B4) 00 00 Inversion Control
reg(0x00B6) 00 00 00 00 00 Display Control
reg(0x00B7) 01 01 Entry Mode Set
reg(0x00BF) 01 01 01 01 01 01 ILI9481, HX8357-B
reg(0x00C0) 00 00 3A 00 02 10 20 00 00 Panel Control
reg(0x00C8) 00 00 00 00 00 00 00 00 00 00 00 00 00 GAMMA
reg(0x00CC) 00 00 Panel Control
reg(0x00D0) 00 44 00 Power Control
reg(0x00D2) 00 04 12 00 00 NVM Read
reg(0x00D3) 01 05 13 01 ILI9341, ILI9488
reg(0x00D4) 00 06 12 00 Novatek ID
reg(0x00DA) 00 00 RDID1
reg(0x00DB) 01 01 RDID2
reg(0x00DC) 00 00 RDID3
reg(0x00E0) 00 00 62 82 56 00 00 00 00 00 00 00 00 00 00 00 GAMMA-P
reg(0x00E1) 01 01 63 83 57 01 01 01 01 01 01 01 01 01 01 01 GAMMA-N
reg(0x00EF) 01 2D 17 17 2D 01 ILI9327
reg(0x00F2) 00 00 00 00 00 00 00 00 00 00 00 00 Adjust Control 2
reg(0x00F6) 00 00 00 00 Interface Control


diagnose_TFT_support

Diagnose whether this controller is supported
There are FAQs in extras/mcufriend_how_to.txt

tft.readID() finds: ID = 0x0

MCUFRIEND_kbv version: 2.9.9

This ID is not supported
look up ID in extras/mcufriend_how_to.txt
you may need to edit MCUFRIEND_kbv.cpp
to enable support for this ID
e.g. #define SUPPORT_8347D

New controllers appear on Ebay often
If your ID is not supported
run LCD_ID_readreg.ino from examples/
Copy-Paste the output from the Serial Terminal
to a message in Displays topic on Arduino Forum
or to Issues on GitHub

Note that OPEN-SMART boards have diff pinout
Edit the pin defines in LCD_ID_readreg to match
Edit mcufiend_shield.h for USE_SPECIAL
Edit mcufiend_special.h for USE_OPENSMART_SHIELD_PINOUT


diagnose_Touchpins

Making all control and bus pins INPUT_PULLUP
Typical 30k Analog pullup with corresponding pin
would read low when digital is written LOW
e.g. reads ~25 for 300R X direction
e.g. reads ~30 for 500R Y direction

Testing : (A1, D7) = 35
Testing : (A2, D6) = 25
Diagnosing as:-
YP,YM: (A1, D7) = 35
XM,XP: (A2, D6) = 25


graphictest_kbv now just gives this error:

Sketch uses 29026 bytes (89%) of program storage space. Maximum is 32256 bytes.
Global variables use 1598 bytes (78%) of dynamic memory, leaving 450 bytes for local variables. Maximum is 2048 bytes.
Low memory available, stability problems may occur.
An error occurred while uploading the sketch

You have misunderstood. Look at setup() in graphictest_kbv.ino

    ...    
    uint16_t ID = tft.readID(); //
    Serial.print("ID = 0x");
    Serial.println(ID, HEX);
    if (ID == 0xD3D3) ID = 0x9481; // write-only shield
//    ID = 0x9329;                             // force ID
    tft.begin(ID);
}

You can force an ID by sending your own value to tft.begin e.g.

    ID = 0x8357;                             // force ID
    tft.begin(ID);
}

Run graphictest_kbv . Do you have a White Screen?
Rinse and repeat with all the other 320x480 IDs in the how_to file. e.g. 0x9090, 0x0099, 0x9481, ...

You don't need to alter any SUPPORT_xxx defines because I think SUPPORT_68140 is on by default.

David.

I thought I messed up somewhere :slight_smile: Thank you for additional clarification, I totally missed that code line.

So I changed the MCUFRIEND_kbv.cpp file back to default and than I modified graphictest_kbv.ino void setup to this (I have put the serial.print after the forced ID just to get the right ID reading printed out):

void setup(void) {
    Serial.begin(9600);
    uint32_t when = millis();
    //    while (!Serial) ;   //hangs a Leonardo until you connect a Serial
    if (!Serial) delay(5000);           //allow some time for Leonardo
    Serial.println("Serial took " + String((millis() - when)) + "ms to start");
    //    tft.reset();                 //hardware reset
    uint16_t ID = tft.readID(); //
    
    ID = 0x8357;                             // force ID

    Serial.print("ID = 0x");
    Serial.println(ID, HEX);
    tft.begin(ID);

}

Test result:

Serial took 0ms to start
ID = 0x8357

I did try all of the ID's that I have tried to define in MCUFRIEND_kbv.cpp previously.

#define SUPPORT_8357
#define SUPPORT_9090
#define SUPPORT_0099
#define SUPPORT_9342
#define SUPPORT_9481
#define SUPPORT_9486
#define SUPPORT_9487
#define SUPPORT_9488
#define SUPPORT_5310
#define SUPPORT_1581
#define SUPPORT_68140
#define SUPPORT_7796
#define SUPPORT_1511

The sad part is that all ID's were giving me the same result: white screen and test result showing the forced ID, but no other signs of life ...

I suggest that you tell the Vendor that the screen does not work. Ask for a full refund.

If the Vendor can give you a part number for the controller, I can probably get your screen to work.
Without a datasheet I can't do anything.

Please ask the Vendor to find the controller part number. She only has to email her supplier.
But it would save her paying all her customers' money back to them.

David.

David thank you so much for your effort to help me out here, your willingness to help is really appreciated.

I have contacted the seller and have also pasted a link to this thread in my message for them to check it out.
I guess now I have to wait for response from them and hope for the best ... :confused:

I will post any updates regarding this matter here in this thread.

Thanks again!

Seriously. Make it clear that you require a FULL REFUND if the Vendor can not provide a solution.

The Ebay vendor only needs to ask her Supplier for information.

Most Ebay vendors will just remain silent. Or engage in a protracted series of messages to avoid being reported to Ebay.

David.

Yeah, no reply after I told them I want a full refund or working LCD ...
I also offered to send this one back (at their expence ofc), if they wish...

You bought it from Ebay. Tell the Vendor that you will report to Ebay if she does not provide information about the controller.

Ebay will make the Vendor refund your money immediately.

Personally, I would prefer a Vendor to "make the effort to ask her Supplier" than issue a refund.

I might be able to get your screen working. You would be happy. The Vendor would be happy. Future customers would be happy.

If it is a "refund" you have to buy another screen and wait for another 2-3 weeks. (if not longer)
And you won't know if the new screen works until you receive it.

David.

I can only suggest that you buy from Adafruit, Seeed, Waveshare, ...
They have reputations to uphold. And make an effort to design their products properly.

The shield that you bought is WRONG. The backlight is supplied from the 3.3V pin.
A 3.5 inch screen require 50-80mA for the backlight. The 3.3V pin on a Uno or Mega is not specified for this current. And many "Mcufriend pcb" do not limit the backlight current. They get HOT.

I suggest that you choose a "Display Shield" and not a "40-pin display" + "Adapter Shield".
Uno-format shields will fit every Arduiono. There are Shields for Mega.

David.