2.4" mcufriend display mirored

using the LCD_ID-readreg sketch I get this display info

the image is mirrored, don't know how to get it normal.
Any help would be appreciated.

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) 54 08 ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) C4 C4 C4 C4 Manufacturer ID
reg(0x0009) C9 C9 C9 C9 C9 Status Register
reg(0x000A) CA CA Get Power Mode
reg(0x000C) CC CC Get Pixel Format
reg(0x0061) E1 E1 RDID1 HX8347-G
reg(0x0062) E2 E2 RDID2 HX8347-G
reg(0x0063) E3 E3 RDID3 HX8347-G
reg(0x0064) E4 E4 RDID1 HX8347-A
reg(0x0065) E5 E5 RDID2 HX8347-A
reg(0x0066) E6 E6 RDID3 HX8347-A
reg(0x0067) E7 E7 RDID Himax HX8347-A
reg(0x0070) F0 F0 Panel Himax HX8347-A
reg(0x00A1) E1 E1 E1 E1 E1 RD_DDB SSD1963
reg(0x00B0) F0 F0 RGB Interface Signal Control
reg(0x00B4) F4 F4 Inversion Control
reg(0x00B6) F6 F6 F6 F6 F6 Display Control
reg(0x00B7) F7 F7 Entry Mode Set
reg(0x00BF) FF FF FF FF FF FF ILI9481, HX8357-B
reg(0x00C0) C0 C0 C0 C0 C0 C0 C0 C0 C0 Panel Control
reg(0x00C8) C8 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8 GAMMA
reg(0x00CC) CC CC Panel Control
reg(0x00D0) D0 D0 D0 Power Control
reg(0x00D2) D2 D2 D2 D2 D2 NVM Read
reg(0x00D3) D3 D3 D3 D3 ILI9341, ILI9488
reg(0x00D4) D4 D4 D4 D4 Novatek ID
reg(0x00DA) 00 00 RDID1
reg(0x00DB) 00 00 RDID2
reg(0x00DC) DC DC RDID3
reg(0x00E0) E0 E0 E0 E0 E0 E0 E0 E0 E0 E0 E0 E0 E0 E0 E0 E0 GAMMA-P
reg(0x00E1) E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 GAMMA-N
reg(0x00EF) EF EF EF EF EF EF ILI9327
reg(0x00F2) F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 Adjust Control 2
reg(0x00F6) F6 F6 F6 F6 Interface Control

You have a genuine SPFD5408 controller. These are VERY rare.

The SPFD5408 should be recognised with tft.readID() in the usual way.
As far as I know, it should work with correct colours, directions etc in graphictest_kbv sketch.

Do you have version v2.9.6 from the Library Manager?

If there is mirroring, please say which directions are wrong. e.g. BLUE (portrait), GREEN (landscape), RED, GRAY.

David.

David, thanks for this almost instant reply.

Updated to 2.9.6 but still mirrored, using Arduino UNO, IDE 1.8.1

Everything is always mirrored, for all colors.

Wonderful library, you are a wizard!

Your help is appreciated.

Please be accurate. In Portrait mode (BLUE Band) , the ribbon comes out of the bottom of the Panel. The USB cable comes out of the top.

Give me accurate information, and I can correct the library. I do not have this controller so I have to rely on remote users.

Posting a video or still photos of the Panel might be easier for you.

David.

David,

hope you can see these.

Thanks for the pictures. The Gate Scan is in the wrong direction.

Edit MCUFRIEND_kbv.cpp

    case 0x5408:
        _lcd_capable = 0 | REV_SCREEN | READ_BGR | INVERT_GS;
        goto common_9320;
    case 0x9320:
        _lcd_capable = 0 | REV_SCREEN | READ_BGR;
      common_9320:
        static const uint16_t ILI9320_regValues[] PROGMEM = {
              ...

You just need to remove the INVERT_GS attribute. i.e. be exactly the same as an ILI9320.
If you don't want to edit the MCUFRIEND_kbv.cpp file, you could just force it to think it was an ILI9320 e.g.

     if (ID == 0x5408) ID = 0x9320;

Are there any other SPFD5408 owners out there?
Does your panel need INVERT_GS or not?

David.

Man, you ROCK!
Problem solved.

Thank you for you help.

I owe you.

I have the same problem. But i canot find this line in the cpp. file :frowning:

Could someone help me?

Genuine 5408 LCD driver user here :slight_smile:

Or can yuo provide a modified cpp. file?

#5 should solve your problem.

It will be in the next Library Release.

Ask if you are having difficulty.

David.

Well.... I am having difficulty :frowning:

Could not solve the problem. I edited the file, but no luck.

You are certain that you have a genuine SPFD5408. with ID=0x5408

I give clear instructions in #5.

I suggest that you read it carefully.
Make notes on paper as you do each step.

Report back with your (numbered) steps.

David.

Good afternoon,
I'm new with ARDUINO and recently i have bougth two TFT LCD 2.4" touch screen in Banggood. The problem was "FLIP IMAGE" in any of the sketches of avalaible examples.
I'll tried with several tips switching 0x5408 for 0x9320, or 0x9325, ... with NO results.

The sketch -> LCD_ID_readreg.ino give the a full screen, but ONE of the register give us the driver

reg(0x00BF) FF FF FF FF FF FF ILI9481, HX8357-B,

The solution Posted by david_prentice - Jun 02, 2017, 09:55 pm , do not work in my case, because I STILL view ALL the images FLIPPED, so I decide to change the the Library in its Original form ->

case 0x5408:
_lcd_capable = 0 | REV_SCREEN | READ_BGR | INVERT_GS;
goto common_9320;

Then I have added " | INVERT_GS " it became to WORK WELL !!!!!!!!!!!!

Try to FIX this problem, if anybody need more information, I'll be happy to share it,

Best regards,

Adrian RUFFATO
:slight_smile:

Please paste your LCD_ID_readreg report. i.e. from Serial Terminal to your message.

I presume you are using v2.9.8 Release as installed by the IDE Library Manager.

David.

David, thank you for your answer, I'm Sorry, I believe that I could attach a file, but I could't find the way.

I hope this is what you ask me, this is the FULL report ->

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) 54 08 ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) C4 C4 C4 C4 Manufacturer ID
reg(0x0009) C9 C9 C9 C9 C9 Status Register
reg(0x000A) CA CA Get Power Mode
reg(0x000C) CC CC Get Pixel Format
reg(0x0061) E1 E1 RDID1 HX8347-G
reg(0x0062) E2 E2 RDID2 HX8347-G
reg(0x0063) E3 E3 RDID3 HX8347-G
reg(0x0064) E4 E4 RDID1 HX8347-A
reg(0x0065) E5 E5 RDID2 HX8347-A
reg(0x0066) E6 E6 RDID3 HX8347-A
reg(0x0067) E7 E7 RDID Himax HX8347-A
reg(0x0070) F0 F0 Panel Himax HX8347-A
reg(0x00A1) E1 E1 E1 E1 E1 RD_DDB SSD1963
reg(0x00B0) F0 F0 RGB Interface Signal Control
reg(0x00B4) F4 F4 Inversion Control
reg(0x00B6) F6 F6 F6 F6 F6 Display Control
reg(0x00B7) F7 F7 Entry Mode Set
reg(0x00BF) FF FF FF FF FF FF ILI9481, HX8357-B
reg(0x00C0) C0 C0 C0 C0 C0 C0 C0 C0 C0 Panel Control
reg(0x00C8) C8 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8 GAMMA
reg(0x00CC) CC CC Panel Control
reg(0x00D0) D0 D0 D0 Power Control
reg(0x00D2) D2 D2 D2 D2 D2 NVM Read
reg(0x00D3) D3 D3 D3 D3 ILI9341, ILI9488
reg(0x00D4) D4 D4 D4 D4 Novatek ID
reg(0x00DA) 00 00 RDID1
reg(0x00DB) 00 00 RDID2
reg(0x00DC) DC DC RDID3
reg(0x00E0) E0 E0 E0 E0 E0 E0 E0 E0 E0 E0 E0 E0 E0 E0 E0 E0 GAMMA-P
reg(0x00E1) E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 GAMMA-N
reg(0x00EF) EF EF EF EF EF EF ILI9327
reg(0x00F2) F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 Adjust Control 2
reg(0x00F6) F6 F6 F6 F6 Interface Control

Now it's working OK,
Best regards,

Adrian

You have a SPFD5408 controller. ID = 0x5408.
As far as I know all the colours and directions should be correct in v2.9.8

Yes, you have pasted ok. If you select a Code Window with the <> icon at the top left of the screen, it displays code nicely.

Please let me know if your screen has bad direction or mirrored.

David.

David, good morning
Sorry for my awfull English, but I'll try to write as well as possible

As I have wrote in my first post, I have bougth TWO TFT LCD 2.4" touch screen in Banggood. The problem with the first one with the "FLIP IMAGE" was fixed and it is working fine.

But the second TFT have a WHITE SCREEN.
I'll tried to modify the sentence tft.begin(0xD3D3), with a lot of identifiers, but it doesn't work

// code copy **************************
uint16_t ID = tft.readID();
Serial.print("ID = 0x");
Serial.println(ID, HEX);
// tft.begin(ID);
// tft.begin(0x9341);
// tft.begin(0x9488);
// tft.begin(0xD3D3);
tft.begin(0x5408);
// ***********************************

I have attached the register for this TFT LCD, and paste below ->
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) C0 C0 ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) C4 C4 C4 C4 Manufacturer ID
reg(0x0009) C9 C9 C9 C9 C9 Status Register
reg(0x000A) CA CA Get Power Mode
reg(0x000C) CC CC Get Pixel Format
reg(0x0061) E1 E1 RDID1 HX8347-G
reg(0x0062) E2 E2 RDID2 HX8347-G
reg(0x0063) E3 E3 RDID3 HX8347-G
reg(0x0064) E4 E4 RDID1 HX8347-A
reg(0x0065) E5 E5 RDID2 HX8347-A
reg(0x0066) E6 E6 RDID3 HX8347-A
reg(0x0067) E7 E7 RDID Himax HX8347-A
reg(0x0070) F0 F0 Panel Himax HX8347-A
reg(0x00A1) E1 E1 E1 E1 E1 RD_DDB SSD1963
reg(0x00B0) F0 F0 RGB Interface Signal Control
reg(0x00B4) F4 F4 Inversion Control
reg(0x00B6) F6 F6 F6 F6 F6 Display Control
reg(0x00B7) F7 F7 Entry Mode Set
reg(0x00BF) FF FF FF FF FF FF ILI9481, HX8357-B
reg(0x00C0) C0 C0 C0 C0 C0 C0 C0 C0 C0 Panel Control
reg(0x00C8) C8 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8 GAMMA
reg(0x00CC) CC CC Panel Control
reg(0x00D0) D0 D0 D0 Power Control
reg(0x00D2) D2 D2 D2 D2 D2 NVM Read
reg(0x00D3) D3 D3 D3 D3 ILI9341, ILI9488
reg(0x00D4) D4 D4 D4 D4 Novatek ID
reg(0x00DA) DA DA RDID1
reg(0x00DB) DB DB RDID2
reg(0x00DC) DC DC RDID3
reg(0x00E0) E0 E0 E0 E0 E0 E0 E0 E0 E0 E0 E0 E0 E0 E0 E0 E0 GAMMA-P
reg(0x00E1) E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 GAMMA-N
reg(0x00EF) EF EF EF EF EF EF ILI9327
reg(0x00F2) F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 Adjust Control 2
reg(0x00F6) F6 F6 F6 F6 Interface Control

Why I couldn't see anything ?
If you compare the two LCD in one of the photos, you will see ONE of them with the sketch ->
TouchScreen_Calibr_native.ino

And the other one, with the screen WHITE. By the way the Library installed is the 2.9.9 ->

#ifndef MCUFRIEND_KBV_H_
#define MCUFRIEND_KBV_H_ 299

Could you please HELP ME ???
Thank you very much, best regards

Adrian RUFFATO

TFT-2.4.pdf (148 KB)

TFT_2.4_ID0xD3D3-Register.txt (1.55 KB)

Please post a link to the actual display that you have bought e.g. the Ebay sale.
Or post a photo of the pcb. So that I can read all the printed labels.

Your LCD_ID_readID report is returning rubbish.
Do you have an "Open-Smart" display ?

David.

Posting a photo of a White display is useless.
I need to see a photo of the pins side of the shield.

David, thanks for your quickly answer.
If I understand, I'll attach a photo for the pcb ARDUINO UNO(I have at least four or five generic), and the back of the TFT LCD with the pins labeled.

I have attach a report of the sketch diagnose_TFT_support.ino

Best regards

Adrian

diagnose_TFT_support.txt (539 Bytes)

TFT-2.4-Pins.pdf (356 KB)