2.4" TFT LCD Display white flash

Hi,
I bought a display of ebay (https://www.ebay.de/itm/372392813122).
I tried to use it, but i just won't work. I use the MCUFRIEND_kbv libary.
When I try the example "graphictest_kbv" the display just flashes white for one time und goes back to showing black.
When I use the sketch "LCD_ID_readreg" I get this output:

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) 97 97 ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 97 97 97 97 Manufacturer ID
reg(0x0009) 97 97 97 97 97 Status Register
reg(0x000A) 97 97 Get Power Mode
reg(0x000C) 97 97 Get Pixel Format
reg(0x0061) 97 97 RDID1 HX8347-G
reg(0x0062) 97 97 RDID2 HX8347-G
reg(0x0063) 97 97 RDID3 HX8347-G
reg(0x0064) 97 97 RDID1 HX8347-A
reg(0x0065) 97 97 RDID2 HX8347-A
reg(0x0066) 97 97 RDID3 HX8347-A
reg(0x0067) 97 97 RDID Himax HX8347-A
reg(0x0070) 97 97 Panel Himax HX8347-A
reg(0x00A1) 97 97 97 97 97 RD_DDB SSD1963
reg(0x00B0) 97 97 RGB Interface Signal Control
reg(0x00B4) 97 97 Inversion Control
reg(0x00B6) 97 97 97 97 97 Display Control
reg(0x00B7) 97 97 Entry Mode Set
reg(0x00BF) 97 97 97 97 97 97 ILI9481, HX8357-B
reg(0x00C0) 97 97 97 97 97 97 97 97 97 Panel Control
reg(0x00C8) 97 97 97 97 97 97 97 97 97 97 97 97 97 GAMMA
reg(0x00CC) 97 97 Panel Control
reg(0x00D0) 97 97 97 Power Control
reg(0x00D2) 97 97 97 97 97 NVM Read
reg(0x00D3) 97 97 97 97 ILI9341, ILI9488
reg(0x00D4) 97 97 97 97 Novatek ID
reg(0x00DA) 97 97 RDID1
reg(0x00DB) 97 97 RDID2
reg(0x00DC) 97 97 RDID3
reg(0x00E0) 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 GAMMA-P
reg(0x00E1) 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 GAMMA-N
reg(0x00EF) 97 97 97 97 97 97 ILI9327
reg(0x00F2) 97 97 97 97 97 97 97 97 97 97 97 97 Adjust Control 2
reg(0x00F6) 97 97 97 97 Interface Control

I hope someone can help me try to get this display working

Thanks in advance

Look at your readreg output. It makes no sense at all.

The Shield only plugs into an Arduino in one way. Make sure that every male pin is mating with the corresponding female socket. It is essential that you have a good 3.3V pin.

Install / Upgrade the library with the IDE Library Manager. There is a "diagnose_TFT_support" sketch.
Make sure that you only have one "MCUFRIEND_kbv" directory in the user libraries folder.

Please let me know how you get on.

David.

I checked the pins and they are connected correctly.
I have the latest version of MCUFRIEND installed and the output of the "dioagnose_TFT_support" is:

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

tft.readID() finds: ID = 0x9797

MCUFRIEND_kbv version: 2.9.8

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

You can try tft.begin(0x9329) and tft.begin(0x9325). See if anything happens.
The website says ILI9341. So you can try tft.begin(0x9341) too.

If not, I would ask for your money back or a replacement.

David.

It still didn't worked, but thanks for your help.
I try to get antoher one and hopefully that will work.

ASK FOR A REFUND.

The shop has sold you an item that does not work.

David.

Hi,
I have the same issue with mcufriend. ID=0x9797.

I got it somewhow "working" with graphictest_kbv from the mcufriend lib and ID=0x5408 - see the attachements.

Suprisingly, the pattern is red with Uno board #1 and green with Uno board #2 and Leonardo.

Any idea how to get this TFT working?

Thanks,

@konserwowy,

Your shield looks as if it has been in the wars. When did you buy it? Is it too late to ask for refund?

What sketch gave you those photos? UNO1a.jpg shows an attempt to print something.

Your ID=0x9797 might be SSD1297N from Solomon Systech. I can not find a datasheet. Does anyone have a link?

I can only guess that the SSD1297 behaves like a SSD1289 or SSD1298. My SSD1298 datasheet is ambiguous about the ID value. It shows 0b1001100110011001 but says 0x8999. I would expect to see 0x9898. (the SSD1289 returns 0x8989)

I suggest that you enable SSD1289 support by #define SUPPORT_1289 in MCUFRIEND_kbv.cpp and forcing ID=0x1289 i.e. tft.begin(0x1289); in graphictest_kbv.ino

Please let me know what happens. If you get some response, I will study the differences between SSD1298 and SSD1289. But it will only be guesswork for SSD1297.

David.

Hi David,

My sketch for the test was graphictest_kbv.ino, too.

I suggest that you enable SSD1289 support by #define SUPPORT_1289 in MCUFRIEND_kbv.cpp and forcing ID=0x1289 i.e. tft.begin(0x1289); in graphictest_kbv.ino

The sketch works now!

Only Adafruit-Style Tests is not printig, black screen for a long time between the rounded rects rectangles and vertical/horisontal scroll tests.
I can start coding.

Thanks a lot!

Konserwowy

That is good news.

The Adafruit_Tests screen is a series of print() statements. So if the "Text" test works normally, the Report screen should work too.

There should be full screen scroll but not Band Scroll. Software scroll and Invert Screen should work.

If you have anything "different" please post photo(s).

David.

Hi David,

writing from a new account. I do not know why, but konserwowy account has been banned.

I have found a reason of the problem with Adafruit-Style Tests.
With the ID=0x1289 this shield is not displaying GREEN colour at all. When I changed the text colour to BLUE everything was displayed.

It should not be a hardware problem. One "inverted" test image is green and screenshoots from my first post are green, too.
I will try to find the HEX of green colour working with this shield under ID=0x1289.

cheers,
Konserwowy.

I presume that you are familiar with the Adafruit Tests. e.g. DEADBEEF in red,
** **Groop** **
in green

And my Penguin screens say RED or GREEN or BLUE.

The SSD1289 has 16-bit command and 16-bit data. I can't see how Green (0x07E0) could ever show as Black (0x0000). The SSD1289 has data mask registers (0x23, 0x24) but I don't use them.
The SSD1298 has no data mask registers. Of course your SSD1297 is an unknown quantity.

David.

konserwowy2:
writing from a new account. I do not know why, but konserwowy account has been banned.

Huh. Odd. There are two entries in the log where the account was blocked but I cannot find any reason.
If it happens again please use Report to moderator to let us know.

Found it. @konserwowy, you should have no problems using your old account.

Bump.

@GrizzlyIsBack,

It looks hopeful that 0x9797 can work. I rely on feedback from users. Instructions in #7.

@konserwowy,

Please can you explain your "green" problem better. Ideally with photo or video.

Another owner has reported 0x9797 on Github id 0x9797 is not supported - please add · Issue #64 · prenticedavid/MCUFRIEND_kbv · GitHub

It is probably better to post photo or video on this Forum.
Or simply describe problem(s) in regular English.

I have found a datasheet for SSD1297. It claims to show ID = 0x9999. I still suspect that your controller is SSD1297. The SSD1289 datasheet has mask registers. The SSD1297 datasheet does not mention mask registers.

David.

Hi, so my unit also has ID 0x9797
I tried the mod...

Added line #define SUPPORT_1289 in MCUFRIEND_kbv.cpp after the import statements and tried forcing ID=0x1289 by changing to tft.begin(0x1289); in graphictest_kbv.ino

But still not working

I was very surprised by konserwowy's result in #8.

Quite honestly, the SSD12xx controllers have very different registers to Ilitek, Sitronix, Himax, Raydium, Hitachi, ...
So any response to ID=0x1289 must be a Solomon controller.

Either konserwowy was having a Trumpian moment or he was being truthful.
Unfortunately we have had silence since #10.

Please double check your experiment. Especially whether you have multiple libraries.

I will post a test sketch later for SSD1289. I only have SSD1289. I rely on reports from 0x9797 owners.

David.

Here is a test sketch. It should show coloured bands on the TFT. And leave a message on Serial Terminal.

#include <MCUFRIEND_kbv.h>
MCUFRIEND_kbv tft;

#define BLACK   0x0000
#define BLUE    0x001F
#define RED     0xF800
#define GREEN   0x07E0
#define CYAN    0x07FF
#define MAGENTA 0xF81F
#define YELLOW  0xFFE0
#define WHITE   0xFFFF

void setrgbmask(uint32_t rgbmask)
{
    tft.WriteCmdData(0x23, rgbmask >> 8);
    tft.WriteCmdData(0x24, rgbmask & 0xFF);
}

void setup()
{
    uint16_t ID = 0x1289;
    Serial.begin(9600);
    tft.begin(ID);
    ID = tft.readID();
    Serial.print("ID = 0x");
    Serial.println(ID, HEX);
    Serial.println("This shows the effect of color mask registers on SSD1289");
    Serial.println("Blue can be controlled easily");
    Serial.println("Red and Green seem to be locked together");
    if (tft.width() == 0) {
        Serial.println("SSD1289 support is NOT enabled");
        Serial.println("#define SUPPORT_1289 in MCUFRIEND_kbv.cpp");
    }
}

void colorgrades(int x, int y, int dx, int dy, uint16_t colormask)
{
    for (uint8_t n = 0; n < 32; n++) {
        uint16_t rgb = n * 8;
        rgb = tft.color565(rgb, rgb, rgb);
        tft.fillRect(n * dx, y, dx, dy, rgb & colormask);
    }
}

void printhex(uint32_t val)
{
    char buf[20];
    sprintf(buf, "%06lX", val);
    tft.print(buf);
}

void loop(void)
{
    uint8_t aspect;
    uint16_t pixel;
    const char *colorname[] = { "BLUE", "GREEN", "RED", "GRAY" };
    uint16_t colormasks[] = { 0x001F, 0x07E0, 0xF800, 0xFFFF };
    uint32_t rgbmasks[] = {0x0000FC, 0x00FC00, 0xFC0000, 0xFCFCFC} ;
    uint16_t dx, dy, y, wid, ht;
    for (uint8_t bum = 0; bum < 4; bum++) {
        setrgbmask(0x000000);
        tft.fillScreen(BLACK);
        uint32_t rgbmask = rgbmasks[bum];
        y = 0;
        for (uint8_t cnt = 0; cnt < 3; cnt++) {
            wid = tft.width();
            ht = tft.height();
            dx = wid / 32;
            uint16_t colormask = colormasks[cnt];
            setrgbmask(0x000000);
            int h = 28;
            colorgrades(0, y, dx, h, colormask);
            tft.setTextColor(WHITE);
            tft.setTextSize(2);
            tft.setCursor(0, y + 3);
            setrgbmask(0x000000);
            tft.print(colorname[cnt]);
            tft.setCursor(146, y + 3);
            printhex(rgbmask);
            y += h;
            tft.setTextSize(1);
            uint32_t mask = 0x000000;
            h = 12;
            for (int i = 0; i < 6; i++, y += h) {
                mask <<= 1;
                mask |= 0x040404;
                setrgbmask(rgbmask & mask);
                colorgrades(0, y, dx, h, colormask);
                setrgbmask(0x000000);
                tft.setCursor(180, y + 2);
                printhex(rgbmask & mask);
            }
            tft.fillRect(0, y, wid, 1, WHITE);
            y += 1;
            yield();
        }
        delay(5000);
    }
}

That didn't work on my unit, got the serial output.
First time I ran it I got the message SSD1289 support is NOT enabled, but even though I dint change anything second an all other times I tried i never got that message.

Mine is...
TFT ID = 0x9797
TFT size is 240x320
2.4 Inch

I added support and tried #define SUPPORT_9325 and tried tft.begin(0x9325);

It just flashes sometimes and sometimes goes white or dark

I had best results with the spfd5408_tftgrid which gives me some colors scrolling across the screen

Go on. If I disable 1289, I get this on my Serial Terminal:

ID = 0xD3D3
This shows the effect of color mask registers on SSD1289
Blue can be controlled easily
Red and Green seem to be locked together
SSD1289 support is NOT enabled
#define SUPPORT_1289 in MCUFRIEND_kbv.cpp

I have a write-only Mega Shield with SSD1289. That is why it says 0xD3D3.
If I enable 1289, I just get the first four lines.

MarcoKu on GitHub seems to confirm konserwowy's report. i.e. it "works" but GREEN is missing.
My faith in humanity is restored.

David.

Hi David,
sorry for not replying. too busy last days.

I have attached two pictures: one of green pinguin (showing black instead of green) and the other one of inverted grey grades (showing green).

so far I had no luck of finding datasheet or other info.

Cheers,