MCUFRIEND unable to identify ID of 2.4 Inch TFT LCD Shield

I recently bought 4 touch panels at banggood:

I was trying the example of the MCUFRIEND Library, but I'm not able to identify the exact display.

Running example LCD_ID_readreg provides the following 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) 00 00	ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 00 E3 00 00	Manufacturer ID
reg(0x0009) 00 00 61 00 00	Status Register
reg(0x000A) 00 08	Get Power Mode
reg(0x000C) 00 06	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 80	Inversion Control
reg(0x00B6) 00 0A 02 27 04	Display Control
reg(0x00B7) 00 FF	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 0C 1B 2A 0C B1 C0 00 C0 00 C0 2A 2A	GAMMA
reg(0x00CC) 00 06	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 E3	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

With this information and the information about the touchscreen I tried several ID hardcoded to get the screen to work. Most of the HX8357 id provides output, but ID ILI9341 240x320 ID=0x9341 seems to provide best results.

When running graphictest_kvb I hardcoded the id to 0x9341 and compared the results to a correct 0x9341 display I ordered in the past.
For the new display I noted the following differences :

  • The screen was flipped over the short axis.
  • Blue and Red where swapped.

Can someone help how to get this display functioning correct?

I think that someone else has received the same Shield:

reg(0x0004) 00 E3 00 00	Manufacturer ID
...
reg(0x00DA) 00 E3	RDID1
reg(0x00DB) 00 00	RDID2
reg(0x00DC) 00 00	RDID3
...

I don't know the Maufacturer or datasheet.
Please can you ask BangGood for the information. (you can quote your order number and invoice)
You can quote my name.
BangGood only has to email their Suppier for the technical information..

Then I can identify and support it properly.

Meanwhile, I suggest that you use tft.begin(0x9329) and report the result of the 4 Penguin screens.
Either as photos or describe any problems e.g. colours, rotations, scroll directions, ...

David.

I have updated graphictest_kbv with

tft.begin(0x9329);

I’ve attached the 4 penguin screens to this post.
Full movie is available at https://youtu.be/e15ud-v53xI

Thank you for willing to Help. I’m going to send an email to Banggood for the technical details. Will post the response in this topic.

Search for this sequence in MCUFRIEND_kbv.cpp

    case 0x2053:    //weird from BangGood
        _lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_AXIS | READ_24BITS | REV_SCREEN | READ_BGR;
 goto common_9329;

and add a new begin() case i.e.

    case 0xE300:    //weird from BangGood
        _lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_AXIS | READ_24BITS | INVERT_SS | INVERT_RGB;
 goto common_9329;
    case 0x2053:    //weird from BangGood
        _lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_AXIS | READ_24BITS | REV_SCREEN | READ_BGR;
 goto common_9329;

and in readID() search for readReg32(0x04); and add new line like this:

    uint32_t ret32 = readReg32(0x04);
    msb = ret32 >> 16;
    ret = ret32; 
    if (msb = 0xE3 && ret == 0x0000) return 0xE300; //reg(04) = [xx E3 00 00] BangGood

This should read ID as 0xE300 and fix all the "problems" but the colours in Penguin screen might not be perfectly smooth gradation.

David.

Edit. I have corrected the INVERT_RGB attribute

With the changes the ID is now detected as 0xE300
The text directions are now correct.
Als scrolling up / down is correct.

Only Red And Blue color are swapped I think.
When the Penguin screen states BLUE Color Grades, the bar is Red.

Oops. You need to swap Red and Blue:

    case 0xE300:    //weird from BangGood
        _lcd_capable = AUTO_READINC | MIPI_DCS_REV1 | MV_AXIS | READ_24BITS | INVERT_SS | INVERT_RGB;
 goto common_9329;

Please check that Software Scroll still works.

David.

Thank you for the fix. The Graphics test now looks ok :).
Also Software Scroll works.

I will update the topic as soon as I receive info from banggood about the hardware specs.

I look forward to hearing their reply.

David.

I did not get any reply yet.
Might take a while before we get the desired documents

Hi
@David , I am using the same thread as my problem is same. I have two LCDs , the example detects the Driver ID as 0x00.
But I have tested the graphic test , it works for 93xx and works with multiple drivers. But in some cases the colors are swapped and in some cases the text in inverted and some have both issues.
I need your help to identify the driver. As I have contacted the supplier and he don't have any knowledge about the driver
Regards

Please compare the readreg report in #0
Please read #1 and #3 carefully.

Which shop? Was it BangGood ?

Please ask your shop for the information again. It is unlikely that they know the answer but they certainly know which Wholesale Supplier. The just need to email their Wholesaler for the technical information.

David.

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 E3 00 00 Manufacturer ID
reg(0x0009) 00 00 61 00 00 Status Register
reg(0x000A) 00 08 Get Power Mode
reg(0x000C) 00 06 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 80 Inversion Control
reg(0x00B6) 00 0A 82 27 04 Display Control
reg(0x00B7) 00 77 Entry Mode Set
reg(0x00BF) 00 02 02 02 02 02 ILI9481, HX8357-B
reg(0x00C0) 00 00 00 00 00 00 00 00 00 Panel Control
reg(0x00C8) 00 00 20 31 42 13 04 00 00 00 00 00 00 GAMMA
reg(0x00CC) 00 06 Panel Control
reg(0x00D0) 00 A4 B2 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 E3 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

The above is the result from readreg example. its a bit different from the above shared at #0. Can you please check and guide

Please can you post a link to the actual Shield that you bought e.g. Ebay sale page

I would expect "E30000" controllers to give the same readreg report. After all, the controller receives a hardware reset for each read.
However, your reports are different.

sgrovert:

reg(0x00B6) 00 0A 02 27 04  Display Control
reg(0x00B7) 00 FF   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 0C 1B 2A 0C B1 C0 00 C0 00 C0 2A 2A  GAMMA
reg(0x00CC) 00 06   Panel Control
reg(0x00D0) 00 00 00    Power Control

sagradoamicus:

reg(0x00B6) 00 0A 82 27 04   Display Control
reg(0x00B7) 00 77   Entry Mode Set
reg(0x00BF) 00 02 02 02 02 02   ILI9481, HX8357-B
reg(0x00C0) 00 00 00 00 00 00 00 00 00   Panel Control
reg(0x00C8) 00 00 20 31 42 13 04 00 00 00 00 00 00   GAMMA
reg(0x00CC) 00 06   Panel Control
reg(0x00D0) 00 A4 B2   Power Control

Have you read #1, #3 ?

I suspect that you might need to add the REV_SCREEN attribute.

David.

Hi
Thanks for quick reply. I have purchased it from my local market and he don’t know the IC detail. he is saying that it might be 9134, but that is not the case.
Anyway I have tried #3 and I am attaching the images of result. I think is working better but the very last screen it again gets colors inverted . Please check and guide me.
thanks for your guidance

What country or which city?
There is no "local market" in Wormshill. Most Arduino owners buy stuff online.

You can ask a real person in a market. They will know where they bought their stock but probably don't want to ask their Supplier. All the same, you can always hope !!

Your three JPG were all correct colours and rotations.
Did you need to add REV_SCREEN to #3 ?

David.

yes the colors seems good to me. No I have just followed the #3 . Didn't include the rev screen

Which country ?

Can you ask the man / woman in the market to email her Supplier ?

David.

I am from pakistan. Supplier will be from china. The store from where I have bought is saying they will email. but I am not sure they will

I am impressed with the Pakistan shops. We have no shops in Wormshill.

Yes, they probably buy from a large Chinese Wholesaler. If they are regular customer of the Wholesaler they will have a good relationship. An email costs them nothing. The Wholesaler’s technical department can answer the email.

I can add proper support for this display to the library.
The shop will have happy customers.

David.

Hi
yes I have talked to them , they will send the email. I need help more help. I need to use I2C sensor with display but screens gets reset to white screen as I try to read value from sensror. That may be because of A4 pin being used for RST of screen.
Please guide me how to get rid of this problem. I am newbie an elaborate answer will help
Regards