Go Down

Topic: 2.4 inch LCD TFT Display Shield only shows white! (Read 40426 times) previous topic - next topic

zoomx


Disu

Hi,
what's for my 0x9341 driver?
I try goltermc project but display remains white.

I think I'm not drunked when I say that I see some strange lines backlit (!) when project arrives to "Circles (outline)" test. In other test it is always and forever WHITE!
Any suggestions?

amigabill

#32
Oct 04, 2015, 11:11 am Last Edit: Oct 04, 2015, 08:45 pm by amigabill
I've struggled with my 2.4" mcufriend LCD/touchscreen as well. I got them a few weeks ago. Only have white screen.

I've tried these libraries:

https://github.com/JoaoLopesF/SPFD5408
Running graphicstest, I get what looks like running test data in serial terminal, benchmarking different operations. But screen remains white.

http://www.smokeandwires.co.nz/blog/a-2-4-tft-touchscreen-shield-for-arduino/
LCD driver chip: C0C0. Running graphicstest, I get what looks like running test data in serial terminal, benchmarking different operations. But screen remains white.
I've also hacked this one to hardcode ID to 0x9335 going into tft.begin but no help.
Then I hardcoded to 0x9325 but again no help.

st7783 attached at https://forum.arduino.cc/index.php?topic=286790.0
only get compile errors, can't run anything. An older and incompatible version of the Arduino SDK??

http://www.moleandroid.com/arduino-tutorial-2-how-to-setup-mcufriend-2-4-lcd-tft-libraries-and-avoid-white-screen/
driver chip 9335, I tried with and without USE_ADAFRUIT_SHIELD_PINOUT as mentioned in serial output. No benchmark runs.

http://forum.banggood.com/forum-topic-93683.html
Unknown driver chip C0C0.

https://copy.com/YLKPE3wcq4Wp4pgh  (9341 driver mentioned in the banggood thread)
Found ILI9341 LCD driver. Running graphicstest, I get what looks like running test data in serial terminal, benchmarking different operations. But screen remains white.
The LCD ID of this one is hardcoded (identifier=0x9341;) so I hacked the code a bit to tell me the ID code as received from the LCD rather than the hard-coded one here, and added prints to tell that to me: Found an LCD driver 9335

david_prentice

If your controller is identified as ILI9335,   just use tft.begin(0x9325)

The ILI9335 is very similar to the ILI9325.

You should find that all the hacked Adafruit libraries support the ILI9325.

Please report back.   I do not have an ILI9335 to test.

David.

zoomx

I never encountered C0C0 ID but I read several solutions
1) Adafruit write that this is a communication problem. An user of this forum found a bad solder and after resoldering all works.
2) An issue in Adafruit library reported on GitHub https://github.com/adafruit/TFTLCD-Library/issues/18 says that you must add a delay in the setup.
3) An user on my blog reported that has resolved reading this forum http://forum.banggood.com/forum-topic-95414.html

Unfortunately there is not an unique solution.

Rexx

I've been working through the same sort of problems as illustrated in this thread for the past two days and I've some findings that may be useful to others.

First of all, you need to know what driver chip your board is using. The Adafruit library is *not* sufficient to identify every chip, so the best starting point is R Jennings' "ugly bit basher" that reads raw values from the most likely registers. It will almost certainly find an identifier for your chipset. I put a copy at http://www.ivydene1.co.uk/TFT-reg-read.ino - I hope that R Jennings is content with the attribution for his hard work.

In my case, I found I had an ILI 9335 driver and was able to google for it. I couldn't find a library that was specifically for that chip, but it seems to be similar to the 9325 and 9328 chips.

So secondly, I needed to find a library that would initialise the display properly. If you have a white screen or odd banding, you know that the display did not initialise properly. I tried the Adafruit library and added a line to the "graphicstest" example immediately after the line that reads the id (probably line 60), which simply overwrites whatever was returned with a fixed value like this:

identifier = 0x9325;

Then I uploaded the example and observed whether it worked. The 9335 produces a display with the 9325 and 9328 values.

I also worked through each of the values that the Adafruit library recognises: 0x9325; 0x9328; 0x7575; 0x9341; 0x8357. Only the first two gave me a result with my chipset. If you don't have one of those chips, you may still be lucky enough to find one of those works for you, as I did.

Now, I still had a problem: the entire screen was inverted in the Y-direction, but at least I had got past the initialisation. So the third thing is to correct the inversion of the display. I can see from the threads I've read that different displays may invert X or Y or both. There's an interesting thread at http://misc.ws/2013/11/08/touch-screen-shield-for-arduino-uno/ which discusses solutions to these sort of problems, and the solution provided by Mike McCauley at comment 41 proved to be the key to solving my third problem. Unfortunately the library and examples he provides did not initialise my chipset properly, but from investigating the Adafruit library code at "Adafruit_TFTLCD.cpp" I was able to see the sequence of instructions needed to properly initialise my display. It was then just a case of replacing the contents of the PROGMEM array at approximately line 567 in Mike's "TFTLCD.cpp" with those I found in "Adafruit_TFTLCD.cpp" for the 9325 around line 123. I also had to add lines:

#include "registers.h"
#define TFTLCD_DELAY 0xFF

around line 33 as well as copy the registers.h file from the Adafruit library to Mike's library, to save me having to translate all of the Adafruit defined constants for the registers back to numeric values as Mike had done. I've uploaded my patched version of Mike's "TFTLCD.cpp" library at http://www.ivydene1.co.uk/TFTLCD.cpp if anybody wants to see what I did. Mike's library is big because he has all of the graphics primitives inline, so if you use that, you don't need the Adafruit GFX library separately.

By the way, if your text is inverted in X or both X&Y, read the comments in Mike's "TFTLCD.cpp" around line 50 and comment in or out the #define INVERT_X and/or #define INVERT_Y lines as needed.

In summary, first identify your driver chip; then get a library that will initialise the display; finally sort out the text orientation for your display if needed. I hope this may help others.

zoomx


andersmmg

BTW if anyone has the same problem as I did, here's my solution:
https://github.com/JoaoLopesF/SPFD5408
It worked like a charm and I finally got it working! It is a heavily modified version of the Adafruit libraries that will work for some other sheilds, or for breakout boards if you have them. Just make sure that if you use a breakout board you keep the pins correct! :)  :)  :smiley-mr-green:

PS: If you can't get it to download or have other problems, I've attached a ZIP with the library! :)
Happy programming!

par20pinspot

Just had to change the identifier to 0x9341 as suggested here - http://cyaninfinite.com/tutorials/2-4-touchscreen-lcd-shield/ for my mcufriend.com 2.4" tft

vffgaston

@rexx


Can't download your "reread.ino" from "http://www.ivydene1.co.uk/". Is it anywhere else?

Thanks


RoberSastre

Sorry
Prueba con
https://dl.dropboxusercontent.com/u/46852225/PP_TFTLCD_v1.zip

Grubi

#42
Mar 05, 2016, 10:58 pm Last Edit: Mar 05, 2016, 11:04 pm by Grubi
Anyone with ID 9595 and some success? Just got two new boards and result is white screen...

Bought from this place, if it does matter
http://www.aliexpress.com/store/product/UNO-R3-ATmega328P-Board-2-4-Inch-TFT-LCD-Touch-Screen-Module-For-Arduino/1038287_32304924640.html

Can it be a fake, or it is just modification of the driver chip, but witho no datasheet I guess it is not easy to guess what to change.

photoncatcher

I had similar problems with a 3.95", a 3.5" and a 2.8" nameless Chinese TFT with similar shield pin layout as the Aliexpress TFT shield you mentioned

Try the mcufriend.kbv library
see https://forum.arduino.cc/index.php?topic=292777.0
there's a whole discussion by mcufriend

Success !

david_prentice

Anyone with ID 9595 and some success? Just got two new boards and result is white screen...

Bought from this place, if it does matter
http://www.aliexpress.com/store/product/UNO-R3-ATmega328P-Board-2-4-Inch-TFT-LCD-Touch-Screen-Module-For-Arduino/1038287_32304924640.html

Can it be a fake, or it is just modification of the driver chip, but witho no datasheet I guess it is not easy to guess what to change.
I am fascinated by how you got an ID of 9595.  (0x257B)

Please run the LCD_ID_readreg.ino sketch from MCUFRIEND_kbv library and copy-paste the output from the Serial Terminal.

David.

Go Up