Go Down

Topic: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE (Read 10221 times) previous topic - next topic

david_prentice

#30
May 22, 2019, 04:55 pm Last Edit: May 22, 2019, 05:00 pm by david_prentice
Please do not install from ZIP.   The Library Manager is much better.   I found Adafruit Touchscreen from the Library Manager.   It will install with a click from the Manager.    (you do not need to visit Github)

You can run the LCD_ID_readreg sketch.   I might be able to help.

David.

Ricardo_da_Silva

Is that library compatible with my non Adafruit tft shield?

ok i´ll do it

Ricardo_da_Silva

This is what i got  from the 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) 00 00 00 00 00 Status Register
reg(0x000A) 00 00 Get Power Mode
reg(0x000C) 00 00 Get Pixel Format
reg(0x0061) 00 00 RDID1 HX8347-G
reg(0x0062) 00 00 RDID2 HX8347-G
reg(0x0063) 00 00 RDID3 HX8347-G
reg(0x0064) 00 00 RDID1 HX8347-A
reg(0x0065) 00 00 RDID2 HX8347-A
reg(0x0066) 00 00 RDID3 HX8347-A
reg(0x0067) 00 00 RDID Himax HX8347-A
reg(0x0070) 00 00 Panel Himax HX8347-A
reg(0x00A1) 00 00 00 00 00 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) 00 00 Entry Mode Set
reg(0x00BF) 00 00 00 00 00 00 ILI9481, HX8357-B
reg(0x00C0) 00 00 00 00 00 00 00 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 00 00 Power Control
reg(0x00D2) 00 00 00 00 00 NVM Read
reg(0x00D3) 00 00 00 00 ILI9341, ILI9488
reg(0x00D4) 00 00 00 00 Novatek ID
reg(0x00DA) 00 00 RDID1
reg(0x00DB) 00 00 RDID2
reg(0x00DC) 00 00 RDID3
reg(0x00E0) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 GAMMA-P
reg(0x00E1) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 GAMMA-N
reg(0x00EF) 00 00 00 00 00 00 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

david_prentice

That looks BROKEN to me.

You can try forcing the ID e.g.  edit setup() function in graphictest_kbv.ino

Code: [Select]

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(); //
    Serial.print("ID = 0x");
    Serial.println(ID, HEX);
    if (ID == 0xD3D3) ID = 0x9481; // write-only shield
//    ID = 0x9329;                             // force ID
    tft.begin(ID);
}

change the "force ID" line to 0x9320 or 0x9329 e.g.
Code: [Select]

    ID = 0x9329;                             // force ID


David.

Ricardo_da_Silva

Do I need to execute that code?

i´ve executed the graphictest_kbv and the result in the Serial Terminal was:

Serial took 0ms to start
ID = 0x0

(i´m using the COM8 door)

Ricardo_da_Silva

Is it possible that i´m doing something wrong?

david_prentice

#36
May 22, 2019, 06:26 pm Last Edit: May 22, 2019, 06:27 pm by david_prentice
You have "graphictest_kbv.ino" in your IDE "edit window"

Find the setup() function.   It is near line #85.   

You just need to delete the two slash characters // at the left of line #96

Then click the [Upload] icon  (second from left)

It will still report ID = 0x0 to the Serial Terminal.
But the TFT might work with ID=0x9320 or with ID=0x9329

David.

Ricardo_da_Silva

I can´t seem to find that on the edit window....

david_prentice

Use ctl-F to search for "force"  or "setup"

Ricardo_da_Silva


Ricardo_da_Silva

#40
May 22, 2019, 06:53 pm Last Edit: May 22, 2019, 06:55 pm by Ricardo_da_Silva
This is what i´ve found:

if (ID == 0xD3D3) ID = 0x9481; // write-only shield
//    ID = 0x9329;                             // force ID
    tft.begin(ID);

(in the graphictest.kbv in the examples of the MCUFRIEND_kbv)

Ricardo_da_Silva

I´ve noticed that my screen is flickering....

ivanho

Hi dave can you help me i have a white screen problem for my LCD too
and this is what i got for the LCD_IDreg

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) 95 95   ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 00 00 00 00   Manufacturer ID
reg(0x0009) 3F 3F 3F 3F 3F   Status Register
reg(0x000A) 00 00   Get Power Mode
reg(0x000C) 01 01   Get Pixel Format
reg(0x0061) 00 00   RDID1 HX8347-G
reg(0x0062) 00 00   RDID2 HX8347-G
reg(0x0063) 00 00   RDID3 HX8347-G
reg(0x0064) 00 00   RDID1 HX8347-A
reg(0x0065) 00 00   RDID2 HX8347-A
reg(0x0066) 00 00   RDID3 HX8347-A
reg(0x0067) 00 00   RDID Himax HX8347-A
reg(0x0070) 00 00   Panel Himax HX8347-A
reg(0x00A1) 00 00 00 00 00   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) 00 00   Entry Mode Set
reg(0x00BF) 00 00 00 00 00 00   ILI9481, HX8357-B
reg(0x00C0) 00 00 00 00 00 00 00 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 00 00   Power Control
reg(0x00D2) 00 00 00 00 00   NVM Read
reg(0x00D3) 00 00 00 00   ILI9341, ILI9488
reg(0x00D4) 00 00 00 00   Novatek ID
reg(0x00DA) 00 00   RDID1
reg(0x00DB) 00 00   RDID2
reg(0x00DC) 00 00   RDID3
reg(0x00E0) 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03   GAMMA-P
reg(0x00E1) 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06   GAMMA-N
reg(0x00EF) 14 14 14 14 14 14   ILI9327
reg(0x00F2) 08 08 08 08 08 08 08 08 08 08 08 08   Adjust Control 2
reg(0x00F6) 00 00 00 00   Interface Control

david_prentice

From extras/mcufriend_how_to.txt
Code: [Select]

HX8347-A 240x320  ID=0x8347 #define SUPPORT_8347A *** Untested ***
HX8347-D 240x320  ID=0x4747 #define SUPPORT_8347D
HX8347-G 240x320  ID=0x7575 #define SUPPORT_8347D
HX8347-I 240x320  ID=0x9595 #define SUPPORT_8347D

You have a Himax HX8347-I

Follow the instructions to edit the MCUFRIEND_kbv.cpp file

Note that you will have to repeat the edit whenever you Upgrade the library.    SUPPORT_8347D is disabled by default.

David.

Go Up