Go Down

Topic: 2 and more duplicated screen on 2.4 LCD TFT Arduino Uno Shield (Read 1 time) previous topic - next topic

DesironnA

Hi everyone
I bought this lcd shield, and i tried EVERY libraries i found on internet, but same issue..
I uploaded spfd5408_graphictest sketch from SPFD5408_master library, and this is result :


it's seems LCD driver is ILI9341.
test result is :

TFT LCD test
Using Adafruit 2.8" TFT Breakout Board Pinout
Found ILI9341 LCD driver
Benchmark                Time (microseconds)
Screen fill              1379556
Text                     347752
Lines                    3390176
Horiz/Vert Lines         144664
Rectangles (outline)     104264
Rectangles (filled)      3267400
Circles (filled)         1211476
Circles (outline)        1475112
Triangles (outline)      1075592
Triangles (filled)       1719036
Rounded rects (outline)  506436
Rounded rects (filled)   3795232
Done!

you see, in result report says :
"Using Adafruit 2.8" TFT Breakout Board Pinout"
but mine is 2.4"

some where i saw someone could solve this problem by editing driver.
but he didn't expand his solution..

i know that my shield is not broken. so..
is anyone help me fix it ?

Ty
DesironnA

david_prentice

Go on.   I bet that your shield has a red pcb and says "mcufriend"

Install MCUFRIEND_kbv library from the Library Manager.

What ID is reported ?

Paste the output from the Serial Terminal to your message.
There are several diagnostic sketches in the Examples.

David.

DesironnA

Hi
I uploaded graphictest_kbv and this is result :

Serial took 0ms to start
ID = 0x0

on diagnose_TFT_support :

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

tft.readID() finds: ID = 0x0


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

on 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 71 00 00   Status Register
reg(0x000A) 00 08   Get Power Mode
reg(0x000C) 00 77   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 16 16 03 08 08 08 08 10 00 16 16   Adjust Control 2
reg(0x00F6) 00 00 80 10   Interface Control

and screen is dark in all sketches of this library.


david_prentice

I don't recognise this controller at all.   No,  it is not currently supported.

Please edit setup() function in the graphictest_kbv example:
Code: [Select]

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



Let me know what you see.   You can also try 0x9329.

You can also edit setup() in the LCD_ID_readreg sketch:
Code: [Select]

    ...
    lcdInit();
    lcdReset();      //ensures that controller is in default state
    for (uint16_t i = 0; i < 256; i++) readReg(i, 7, "f.k");
    readReg(0x00, 2, "ID: ILI9320, ILI9325, ILI9335, ...");
    ...

This will report every register.   Most will just say 00 00 00 ..  If you see anything different,  please paste only those interesting lines to your message.

David.

DesironnA

When i edit setup() function in the graphictest_kbv example, screen runs but in 2 duplicated screen. another one is dark.

david_prentice

I had asked for only the interesting lines e.g.
Code: [Select]

reg(0x00D6) 00 00 80 B2 00 00 00 f.k
reg(0x00D7) 00 20 80 31 80 00 00 f.k
reg(0x00D8) 00 00 2A 0C 80 00 00 f.k

reg(0x00F0) 00 04 00 00 00 00 00 f.k
reg(0x00F1) 00 04 00 00 00 00 00 f.k
reg(0x00F2) 00 16 16 03 08 08 08 f.k
reg(0x00F3) 00 80 2A 2A 01 22 00 f.k
reg(0x00F4) 00 00 00 00 00 44 00 f.k
reg(0x00F5) 00 10 00 03 F0 00 1F f.k
reg(0x00F6) 00 00 80 10 10 00 00 f.k
reg(0x00F7) 00 06 03 04 0A 10 1A f.k
reg(0x00F8) 00 06 03 04 0A 10 1A f.k
reg(0x00F9) 00 06 03 04 0A 10 1A f.k
reg(0x00FA) 00 06 03 04 0A 10 1A f.k
reg(0x00FB) 00 06 03 04 0A 10 1A f.k
reg(0x00FC) 00 06 03 04 0A 10 1A f.k
reg(0x00FD) 00 11 00 35 00 00 00 f.k

Please can you edit / delete the garbage in #4 and #5.

Does tft.begin(0x1520) show anything?
Does tft.begin(0x1526) show anything?
Does tft.begin(0x9329) show anything?

Please give accurate answers.

David.

DesironnA


david_prentice

I don't know if English is your first language.

Please give accurate answers.   Then we can probably solve your problems.  e.g.

Does tft.begin(0x1520) show anything? Black screen
Does tft.begin(0x1526) show anything? Black screen
Does tft.begin(0x9329) show anything? Black screen

Does tft.begin(0x9341) show anything? non-interlaced (2 duplicated)

With accurate answers   I can give you sensible advice.

One clear photo of the graphictest_kbv program that shows your problem would be more useful than a thousand words.   e.g. any screen that contains different coloured text.

Please edit #4, #5

David.

DesironnA

I'm sorry i'm 11 years old from iran and my english is not so good.
you said
Quote
Please edit setup() function in the graphictest_kbv example:
Code: [Select]


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

i edit setup() function in the graphictest_kbv example.
in id 0x1520 my screen has duplicated again,
in id 0x9329 my screen has duplicated and mirror
you also said
Quote
You can also edit setup() in the LCD_ID_readreg sketch:


    ...
    lcdInit();
    lcdReset();      //ensures that controller is in default state
    for (uint16_t i = 0; i < 256; i++) readReg(i, 7, "f.k");
    readReg(0x00, 2, "ID: ILI9320, ILI9325, ILI9335, ...");
    ...

i did it, and in serial monitor
and difference is
Code: [Select]
reg(0x00D6) 00 00 80 B2 00 00 00    f.k
reg(0x00D7) 00 20 80 31 80 00 00    f.k
reg(0x00D8) 00 00 2A 0C 80 00 00    f.k
reg(0x00D9) 00 07 00 00 00 00 00    f.k

reg(0x00F0) 00 04 00 00 00 00 00    f.k
reg(0x00F1) 00 04 00 00 00 00 00    f.k
reg(0x00F2) 00 16 16 03 08 08 08    f.k
reg(0x00F3) 00 80 2A 2A 01 22 00    f.k
reg(0x00F4) 00 00 00 00 00 44 00    f.k
reg(0x00F5) 00 10 00 03 F0 00 1F    f.k
reg(0x00F6) 00 00 80 10 10 00 00    f.k
reg(0x00F7) 00 06 03 04 0A 10 1A    f.k
reg(0x00F8) 00 06 03 04 0A 10 1A    f.k
reg(0x00F9) 00 06 03 04 0A 10 1A    f.k
reg(0x00FA) 00 06 03 04 0A 10 1A    f.k
reg(0x00FB) 00 06 03 04 0A 10 1A    f.k
reg(0x00FC) 00 06 03 04 0A 10 1A    f.k
reg(0x00FD) 00 11 00 35 00 00 00    f.k


then you said
Quote
Does tft.begin(0x1520) show anything?
Does tft.begin(0x1526) show anything?
Does tft.begin(0x9329) show anything?
then i tried those ids in graphictest_kbv examp;le and
in id 0x1520 i have duplicated screen
in id 0x1526 i have black screen
in id 0x9329 i have duplicated and mirrored screen
and in id 0x9341 i have black screen

sorry if i'm driving you angree :(
is it accurate answer ?

david_prentice

You have excellent English.   Especially if it is not your main language.

Quote
in id 0x1520 i have duplicated screen
in id 0x1526 i have black screen
in id 0x9329 i have duplicated and mirrored screen
and in id 0x9341 i have black screen
That is very helpful.   A photo would be useful.

Was there a paper label with a number on it?
Or any printed messages on the pcb e.g. with a four-digit number?

I am fairly certain that I know the problem.  And a possible guess for the solution.

David.

DesironnA

Quote
Was there a paper label with a number on it?
Or any printed messages on the pcb e.g. with a four-digit number?
No. just there is a text behind of LCD itself = YXT26DA005-B
Quote
That is very helpful.   A photo would be useful
ID = 0x1520

ID = 0x1526

ID = 0x9329

ID = 0x9341



DesironnA

but when i upload spdf5408_graphictest sketch from SPDF5408 library, in id0x9341, i have same result like id 0x1520 in graphictest_kbv sketch

is it possible that a similar id has different result in two sketch ?

david_prentice

I wrote MCUFRIEND_kbv library.
I do not know spfd5408 library or the sketch that produced the photo in the first post.
It looks like the shape of a 240x320 display.

Thanks for the feedback.
Your photos in #10 have confirmed that you have got a 240x400 display.
And the SM bit is probably in second byte of register(0x00D7)

I still don't know which make it is.

I will post a guess fix shortly.

David.

david_prentice

Please edit setup() function in the graphictest_kbv example:
Code: [Select]

    ...
    ID = 0x9327;                             // force ID
    tft.begin(ID);
    uint8_t d[] = { 0x20, 0x80, 0x31, 0x80}; //power-up values.  NL in d[2]
    d[1] = 0x90;  //guessing that SM is bit #4 of d[1] like ILI9341
    tft.pushCommand(0xD7, d, 4);
}



I suspect you will get some odd effects in REV_PORTRAIT and REV_LANDSCAPE.
Vertical scroll will not work.
But I hope that PORTRAIT is fixed.

Please let me know.

David.


Go Up