[Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE

Hi, I just bought 2.4 TFT LCD shield in CHINA
without any technical information
The screen is definitly WHITE
It seems the driver code is 0x4747
I already tried all solutions that I have found on internet
I haven’t an high level on the subject …

Can someone help me ?
Thankyou

Why not enter "TFT 0x4747" into the Search box at the top of your screen? (magnifying glass icon)

Or post a link to the actual display that you have bought.

David.

Hello David, Thank you for your advise :slight_smile:
I did it … and I just found a link to MCUFRIEND_kbd Library
I tried all examples included in that Library … without success :frowning:
I really don’t know what to do, what to try, how to continue ?

I join 2 photos of my TFT LCD
and the reference of my order …

Commande ID: 503389374309023 View Detail
Date et Heure commande: 16:18 Jul. 22 2017
Nom du vendeur: CF fengtaiElectronic Store
Montant de la commande:
€ 49,27 = € 3,01 X15
LCD module TFT 2.4 pouce TFT LCD écran pour Arduino UNO R3 Conseil et soutien mega 2560

Thank you for your help
Michel

A “link” means a website address or URL. e.g. from an Ebay sale
Copy-pasting some French text is not very useful.

A website generally has photos of the front and back of a Shield. I get most information from looking at the pcb traces and any printed words or numbers.

The “front” view of your screen looks like a regular 2.4" Mcufriend Uno Shield.
ID = 0x4747 means Himax HX8347-D controller. These are not very common controllers. So they are not supported by default.

  1. install MCUFRIEND_kbv library from the Library Manager.
  2. Edit MCUFRIEND_kbv.cpp: #define SUPPORT_8347D

Please let us know how you get on.

Did you pay 49 Euros for one screen or for fifteen screens?

David.

3.01x15 != 49.27

Well, that sounds very cheap !

It would be interesting to hear if they put any protective packaging between each screen.
And even more interesting if all 15 TFT screens work. And if all 15 Touch Panels work.

David.

SUPER !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
THANK YOU VERY MUCH
The screen shows différents things :)))))))

I followed what you suggested to me :

  1. Upload MCUFRIEND
  2. Add #define SUPPORT_8347D at the first line of MCUFRIEND_kbv.cpp
  3. Test example from the Library >> "readpixel", "aspect", "glue_demo
    ............... and it works !!!!!!!!!!!!!!

I am building a prototype with 15 screens
They will be put on a production line as visual mangement
For that, I just prepared 7 board in A4 format which can include from 1 to 4 screens
There is 1 board for each machine of the production line
First step : each board will just display a status RED/GREEN
Second step : I want connect the screen to the machine ....
If this prototype is OK, we will developpe this displaying in all the factory (500 screens) !!!

Again, thank you David for the time you gave me
The second photo and the link will arrive after this post

You do not need to add the define.

Simply find the existing define and remove the two slashes.

David.

David
You are right : I did it, and it works perfectly :slight_smile:

newscreen2b.JPG

trail for the link ....

https://fr.aliexpress.com/item/LCD-module-TFT-2-4-inch-TFT-LCD-screen-for-Arduino-UNO-R3-Board-and-support/32552043575.html?spm=a2g0s.9042311.0.0.LupCIu

Thanks David,

just fantastic !!

My 2.8 TFT shield (id: 4747) is working perfectly, because of you work!

Spend hours looking for a solution until you mentioned :

ID = 0x4747 means Himax HX8347-D controller. These are not very common controllers. So they are not supported by default.

  1. install MCUFRIEND_kbv library from the Library Manager.
  2. Edit MCUFRIEND_kbv.cpp: #define SUPPORT_8347D

Greetings
Mike

I also buyed these TFT-shields. yes, they are identified as 4747 and the driver is HX8347D

the problem “white screen” results from the constant declaration of 4747 as 7575 in the TFTLCD-library-master and also in the identification of the display-identifier.

the identifier must directivily be changed in 0x7575 and the display will run. you only must take a mirror to read :slight_smile: .

unfortunately there is no identification like (ili9341) pinted on the back of the shield. hx4747, I guess .

but searching 4747 or 7575 has no result everywhere. normaly the identification must be 0x8347. but that´s rubbish.

thank you … of certainty: to be not alone :smiley:

HX8347-A ID=0x4747 in reg(0x67)
HX8347-B ID=0x9325 in reg(0x00)
HX8347-D ID=0x4747 in reg(0x00)
HX8347-G ID=0x7575 in reg(0x00)
HX8347-I ID=0x9595 in reg(0x00)

There are probably other HX8347 variants.
-A, -D, -G, -I have 8-bit registers. Hence you see double on a 8-bit bus. e.g. 0x9595
-B has 16-bit registers.
I have never seen a HX8347-B but I suppose it appears like an Ilitek ILI9325.

Himax specialise in using random registers with the same part number (with different behaviour).
Other manufacturers use a model number and revision letter for a specific model.

David.

hallo david,

thanks for helping.

my problem: I have a coustom made code, running well with the ili9341

I have basicly solved the problem with the hx8347, but the screen is mirrored.

trying to correct this, I installed the MCUFRIEND_kbv.-- but now the babylonian-speach-desaster will
make it more and more labourious to get my code running.

the target: where is it centraly possible to change the display-coordinates in the adafruit tft-driver. not the mcufriend_kbv.

if this is not simply...it´s better to buy some new displays with ili9341.

by the way: no special hx8347-driver can be found.

now I particulary solved the problem.

the used driver ( adafruit_tftlcd) is working bad.

the chips from himax and ilitek are not different in the basic handling of display coordinates.

there is a cruel programming in tftlcd.cpp controlling the MADCTL reg8 .

sometimes there is commented //madctl …if ilixxxx , but if 7575(himax and normaly ist should be id 4747 grummel) there the setting of reg8 is otherwise handled in code without comment and really wrong values… WHY?

as I thought, its only one value that has to be changed an the display hx8347 x is working as ili9341,
but not in the own code. it is to be changed in the TFTLCD.CPP.

else if(driver == ID_7575) {

    uint8_t hi, lo;
    switch(rotation) {
     default: lo = 0   ; break;
     case 1 : lo = 0x60; break;
     case 2 : lo = 0xc0; break;
     case 3 : lo = 0xa0; break;
    }
    writeRegister8(   HX8347G_MEMACCESS      ,0x50);//direct value in reg8  0x50.  its an example!!!!, but it works!

and also here:

[code]
 if(driver == ID_7575) {

    uint8_t t;
    switch(rotation) {
     default: t = 0   ; break;
     case 1 : t = 0x60; break;
     case 2 : t = 0xc0; break;
     case 3 : t = 0xa0; break;
    }
    writeRegister8(HX8347G_MEMACCESS,0x50);

[/code]

may be, there are to change other parts of the code, but im first satisfied . no more mirrored screen.

perhaps somebody can explain the reg8 madctl 0x50 means bin: 1010000… 101 does the inversion? the datasheet(ili as hx) says x-y exchange, x-inverted.

but it dependend from the own first code with first used driver …

even touch-points have some problems… there must be a place to change too.
but these problems also exist between similare displays from ilitec ???

What hardware do you have?
Is it Adafruit ?
Is it from Itead ?
Is it a "Mcufriend" Uno shield?

If the ID is reported as 0x7575 you have a HX8347-G controller.

No, I have never seen or used any of these displays with 8080-8 parallel interface. I support -A, -D, -G, -I variants in MCUFRIEND_kbv library with feedback from genuine owners.

So I have never tried the Adafruit library. I would be very suspicious of all the hacked versions of Adafruit_TFTLCD. But since Adafruit sold these displays I would hope their library is maintained correctly by Adafruit.

I do own Waveshare Shield that has a HX8347-D controller with a write-only SPI interface.

If you look at the source code of my HX8347D_kbv library, you will see an uncomplicated library.
Both Adafruit_TFTLCD and MCUFRIEND_kbv support multiple controllers. This makes it harder to understand.

Regarding MADCTL values. You configure the Panel with the Manufacturer Registers. e.g. Inverted Colours, RGB / BGR colours, GateScan, ...

Likewise Touch Panels can be glued in any direction. But once attached, they always report X, Y values relative to their manufactured connections. You just run a Calibration sketch to determine X, Y directions and values for LEFT, RT, TOP, BOT.

David.

oh, haven´t seen your answer.

meanwhile my several displays are working just well.

i´m using adafruit ili 9341 and hi 4747 (7575).

I think this are the last changes id did in cpp. even the rotation is working.

  } else if(driver == ID_7575) {

    uint8_t hi, lo;
    switch(rotation) {
     default: lo = 0   ; break;
     case 1 : lo = 0x20; break;
     case 2 : lo = 0x50; break;
     case 3 : lo = 0xe0; break;
    }
    writeRegister8( HX8347G_MEMACCESS ,lo);//0x50 bei rot 2

    // Only upper-left is set -- bottom-right is full screen default
    writeRegisterPair(HX8347G_COLADDRSTART_HI, HX8347G_COLADDRSTART_LO, x);
    writeRegisterPair(HX8347G_ROWADDRSTART_HI, HX8347G_ROWADDRSTART_LO, y);
    hi = color >> 8; lo = color;
    CD_COMMAND; write8(0x22); CD_DATA; write8(hi); write8(lo);

  } else if ((driver == ID_9341) || (driver == ID_HX8357D)) {
    setAddrWindow(x, y, _width-1, _height-1);
    CS_ACTIVE;
    CD_COMMAND;
    write8(0x2C);
    CD_DATA;
    write8(color >> 8); write8(color);
  }

  CS_IDLE;
}

// Issues 'raw' an array of 16-bit color values to the LCD; used
// externally by BMP examples.  Assumes that setWindowAddr() has
// previously been set to define the bounds.  Max 255 pixels at
// a time (BMP examples read in small chunks due to limited RAM).
void Adafruit_TFTLCD::pushColors(uint16_t *data, uint8_t len, boolean first) {
  uint16_t color;
  uint8_t  hi, lo;
  CS_ACTIVE;
  if(first == true) { // Issue GRAM write command only on first call
    CD_COMMAND;
    if(driver == ID_932X) write8(0x00);
    if ((driver == ID_9341) || (driver == ID_HX8357D)){
       write8(0x2C);
     }  else {
       write8(0x22);
     }
  }
  CD_DATA;
  while(len--) {
    color = *data++;
    hi    = color >> 8; // Don't simplify or merge these
    lo    = color;      // lines, there's macro shenanigans
    write8(hi);         // going on.
    write8(lo);
  }
  CS_IDLE;
}

void Adafruit_TFTLCD::setRotation(uint8_t x) {

  // Call parent rotation func first -- sets up rotation flags, etc.
  Adafruit_GFX::setRotation(x);
  // Then perform hardware-specific rotation operations...

  CS_ACTIVE;
  if(driver == ID_932X) {

    uint16_t t;
    switch(rotation) {
     default: t = 0x1030; break;
     case 1 : t = 0x1028; break;
     case 2 : t = 0x1000; break;
     case 3 : t = 0x1018; break;
    }
    writeRegister16(0x0003, t ); // MADCTL
    // For 932X, init default full-screen address window:
    setAddrWindow(0, 0, _width - 1, _height - 1); // CS_IDLE happens here

  }
 if(driver == ID_7575) {

    uint8_t t;
    switch(rotation) {
     default: t = 0   ; break;
     case 1 : t = 0x20; break;
     case 2 : t = 0x50; break;
     case 3 : t = 0xe0; break;
    }
    writeRegister8(HX8347G_MEMACCESS,t);//0x050   rot2

    // 7575 has to set the address window on most drawing operations.
    // drawPixel() cheats by setting only the top left...by default,
    // the lower right is always reset to the corner.
    setLR(); // CS_IDLE happens here
  }

 if (driver == ID_9341) {
   // MEME, HX8357D uses same registers as 9341 but different values
   uint16_t t;

   switch (rotation) {
   case 2:
     t = ILI9341_MADCTL_MX | ILI9341_MADCTL_BGR;
     break;

the parts destinated to ili9341 ...there MADCTL is noted

hi all

i am facing this issue of white empty screen.
it identifies as : 0x4747
it is connected to arduino uno.

and i think i found in MCUFRIEND_kbv.cpp support for this kind of lcd.

i was trying to find / understand the reply above my msg. but .. appears to be above my abilities ..

i was also trying the bmp example but got only bad location reply in the com terminal screen.

any help will be appreciated.

thank you.

Make sure that you install/upgrade MCUFRIEND_kbv, Adafruit_GFX, TouchScreen libraries from the IDE Library Manager.

Edit MCUFRIEND_kbv.cpp change this line from:

//#define SUPPORT_8347D             //HX8347-D, HX8347-G, HX8347-I, HX8367-A +520 bytes, 0.27s

to this:

#define SUPPORT_8347D             //HX8347-D, HX8347-G, HX8347-I, HX8367-A +520 bytes, 0.27s

That is all there is to it. Removing the two

//

slash characters.

David.

Thank You !!!!!!!!!

it works :slight_smile: