Arduino Forum

Using Arduino => Displays => Topic started by: zahnd on Aug 20, 2017, 07:43 pm

Title: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: zahnd on Aug 20, 2017, 07:43 pm
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
Title: Re: 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: david_prentice on Aug 20, 2017, 08:00 pm
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.
Title: Re: 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: zahnd on Aug 20, 2017, 09:06 pm
Hello David, Thank you for your advise :)
I did it ... and I just found a link to MCUFRIEND_kbd Library
I tried all examples included in that Library ... without success :(
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
Title: Re: 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: david_prentice on Aug 20, 2017, 10:34 pm
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.
Title: Re: 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: skywatch on Aug 20, 2017, 11:23 pm
3.01x15 != 49.27
Title: Re: 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: david_prentice on Aug 20, 2017, 11:41 pm
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.
Title: Re: 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: zahnd on Aug 21, 2017, 12:07 am
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

Title: Re: 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: david_prentice on Aug 21, 2017, 12:17 am
You do not need to add the define.

Simply find the existing define and remove the two slashes.

David.
Title: Re: 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: zahnd on Aug 21, 2017, 12:43 am
David
You are right : I did it, and it works perfectly :)
Title: Re: 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: zahnd on Aug 21, 2017, 01:11 am
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
Title: Re: 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: 68gt500 on Oct 27, 2017, 02:22 pm
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 :

Quote
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
 
Title: Re: 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: stern on Dec 29, 2017, 12:05 am
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  :)     .

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  :-D

Title: Re: 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: david_prentice on Dec 29, 2017, 01:15 am
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.
Title: Re: 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: stern on Dec 29, 2017, 01:51 pm
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. 
Title: Re: 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: stern on Jan 04, 2018, 01:35 pm
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.

Code: [Select]
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  ????????????????

Title: Re: 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: david_prentice on Jan 04, 2018, 07:49 pm
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.
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: stern on Feb 01, 2018, 01:17 am
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.

Code: [Select]

  } 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



Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: guy1a on May 28, 2018, 08:57 pm
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.
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: david_prentice on May 28, 2018, 09:35 pm
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:
Code: [Select]

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

to this:
Code: [Select]

#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.
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: guy1a on May 29, 2018, 04:52 pm
Thank You !!!!!!!!!

it works :)
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: simoninthelakes on Mar 15, 2019, 11:56 am
Thank you for your guidance here David, and all the related MCUFRIEND work over on GutHub, much appreciated!
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: Ricardo_da_Silva on May 22, 2019, 02:29 pm
Hello!

I´m having the white screen problem with my TFT Touch screen too...  :smiley-confuse:
I´ve tried to solve the problem like you said but i can´t!

This is the link of the product!
https://www.electrofun.pt/arduino/display-lcd-touchscreen-shield-arduino
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: david_prentice on May 22, 2019, 02:48 pm
Thanks for the link.  It shows a red shield with yellow header pins and an AMS1117 regulator U1.   The text says that it has an ILI9341 controller.

Please confirm whether the photos of the pcb are accurate.
Please confirm the ID that is reported on the Serial Terminal e.g. from graphictest_kbv or diagnose_TFT_support

Follow the instructions in #18
Make notes on paper.

Please type from paper notes to your message.
Please copy-paste any messages from the Serial Terminal.   (Click on the Terminal Screen.  Press ctl-A ctl-C to copy.  Press ctl-V to paste to your message.)

David.
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: Ricardo_da_Silva on May 22, 2019, 02:58 pm
I have the product in front of me and it is the same but this my first time ever using an Arduino.... :smiley-confuse:

I´ve followed the instructions but the controller ILI9341 doesn´t even appear on the document...
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: Ricardo_da_Silva on May 22, 2019, 03:08 pm
Comparing the pcb photos there are some differences...
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: david_prentice on May 22, 2019, 03:30 pm
You do not need to understand technical things.
Just describe the difference(s) between the pcb and the photos on the link e.g.
1.  colour of header pins.   Yellow or Black?
2.  presence of regulator U1.  Yes or No?

Do you know how to run the Serial Terminal? Click the icon at the top-right of your Sketch window.  Set to 9600 baud.

Do you know how to install Libraries?

Everyone has to start with Arduino.   There are a lot of things to learn.   Many are intuitive if you are familiar with a PC.

If English is not your first language,  use Google to translate.

David.
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: Ricardo_da_Silva on May 22, 2019, 03:49 pm
1- The header pins are yellow

2 - Yes
     
     
the only difference is that there are not those two small components called C1 and C2 (as you can see in the link photo) and the other "components" are in slightly diffrent positions...

I don´t think so...  :smiley-confuse: i can´t find the option to change that to 9600 baud. ( i´m using IDE on Windows).

Yes i think so but it´s better if you tell me the right way to install them so i can confirm please.

thanks for all the help you´re providing!
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: Ricardo_da_Silva on May 22, 2019, 03:58 pm
it´s already in 9600 baud
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: david_prentice on May 22, 2019, 04:16 pm
Quote
Make sure that you install/upgrade MCUFRIEND_kbv, Adafruit_GFX, TouchScreen libraries from the IDE Library Manager.
Sketch->Include Library->Manage Libraries...  (works with all IDEs)

Then search for "kbv" or "GFX" to find the library.   Click on [Upgrade] or [Install]

The current IDE v1.8.9 can reach the Library Manager via  Tools->Library Manager

Regarding Serial Terminal:
1.  did you see any text ?
2.  have you tried to copy-paste ?

David.
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: Ricardo_da_Silva on May 22, 2019, 04:37 pm

ok the libraries are ready and I downloaded the touch screen library from the internet and then I used the function: add zip library.


When I ran the diagnostic_TFT_suport and opened the Terminal Serial appeared this:


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

tft.readID() finds: ID = 0x0

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
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: david_prentice on May 22, 2019, 04:55 pm
Please do not install from ZIP.   The Library Manager is much better.   I found Adafruit Touchscreen (https://github.com/adafruit/Adafruit_TouchScreen) from the Library Manager.   It will install with a click from the Manager.    (you do not need to visit Github)

You can run the LCD_ID_readreg sketch.   I might be able to help.

David.
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: Ricardo_da_Silva on May 22, 2019, 05:01 pm
Is that library compatible with my non Adafruit tft shield?

ok i´ll do it
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: Ricardo_da_Silva on May 22, 2019, 05:08 pm
This is what i got  from the 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 00 00 00 Status Register
reg(0x000A) 00 00 Get Power Mode
reg(0x000C) 00 00 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 00 00 00 00 00 00 00 00 00 00 00 Adjust Control 2
reg(0x00F6) 00 00 00 00 Interface Control
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: david_prentice on May 22, 2019, 06:02 pm
That looks BROKEN to me.

You can try forcing the ID e.g.  edit setup() function in graphictest_kbv.ino

Code: [Select]

void setup(void) {
    Serial.begin(9600);
    uint32_t when = millis();
    //    while (!Serial) ;   //hangs a Leonardo until you connect a Serial
    if (!Serial) delay(5000);           //allow some time for Leonardo
    Serial.println("Serial took " + String((millis() - when)) + "ms to start");
    //    tft.reset();                 //hardware reset
    uint16_t ID = tft.readID(); //
    Serial.print("ID = 0x");
    Serial.println(ID, HEX);
    if (ID == 0xD3D3) ID = 0x9481; // write-only shield
//    ID = 0x9329;                             // force ID
    tft.begin(ID);
}

change the "force ID" line to 0x9320 or 0x9329 e.g.
Code: [Select]

    ID = 0x9329;                             // force ID


David.
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: Ricardo_da_Silva on May 22, 2019, 06:13 pm
Do I need to execute that code?

i´ve executed the graphictest_kbv and the result in the Serial Terminal was:

Serial took 0ms to start
ID = 0x0

(i´m using the COM8 door)
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: Ricardo_da_Silva on May 22, 2019, 06:19 pm
Is it possible that i´m doing something wrong?
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: david_prentice on May 22, 2019, 06:26 pm
You have "graphictest_kbv.ino" in your IDE "edit window"

Find the setup() function.   It is near line #85.   

You just need to delete the two slash characters // at the left of line #96

Then click the [Upload] icon  (second from left)

It will still report ID = 0x0 to the Serial Terminal.
But the TFT might work with ID=0x9320 or with ID=0x9329

David.
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: Ricardo_da_Silva on May 22, 2019, 06:35 pm
I can´t seem to find that on the edit window....
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: david_prentice on May 22, 2019, 06:40 pm
Use ctl-F to search for "force"  or "setup"
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: Ricardo_da_Silva on May 22, 2019, 06:44 pm
While running the graphictest.kbv?
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: Ricardo_da_Silva on May 22, 2019, 06:53 pm
This is what i´ve found:

if (ID == 0xD3D3) ID = 0x9481; // write-only shield
//    ID = 0x9329;                             // force ID
    tft.begin(ID);

(in the graphictest.kbv in the examples of the MCUFRIEND_kbv)
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: Ricardo_da_Silva on May 22, 2019, 07:07 pm
I´ve noticed that my screen is flickering....
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: ivanho on Jun 01, 2019, 11:04 am
Hi dave can you help me i have a white screen problem for my LCD too
and this is what i got for the LCD_IDreg

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) 95 95   ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 00 00 00 00   Manufacturer ID
reg(0x0009) 3F 3F 3F 3F 3F   Status Register
reg(0x000A) 00 00   Get Power Mode
reg(0x000C) 01 01   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) 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03   GAMMA-P
reg(0x00E1) 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06   GAMMA-N
reg(0x00EF) 14 14 14 14 14 14   ILI9327
reg(0x00F2) 08 08 08 08 08 08 08 08 08 08 08 08   Adjust Control 2
reg(0x00F6) 00 00 00 00   Interface Control
Title: Re: [Solved] 2.4 TFT LCD shield - 0x4747 - SCREEN WHITE
Post by: david_prentice on Jun 01, 2019, 12:24 pm
From extras/mcufriend_how_to.txt
Code: [Select]

HX8347-A 240x320  ID=0x8347 #define SUPPORT_8347A *** Untested ***
HX8347-D 240x320  ID=0x4747 #define SUPPORT_8347D
HX8347-G 240x320  ID=0x7575 #define SUPPORT_8347D
HX8347-I 240x320  ID=0x9595 #define SUPPORT_8347D

You have a Himax HX8347-I

Follow the instructions to edit the MCUFRIEND_kbv.cpp file

Note that you will have to repeat the edit whenever you Upgrade the library.    SUPPORT_8347D is disabled by default.

David.