October 03, 2023, 01:15:39 PM

MOD LCD2.8RTP white screen

Started by striderheng, March 09, 2021, 12:03:53 PM

Previous topic - Next topic


I have been trying to get this screen working with a Arduino Uno(original) working but I keep getting a white screen. I can see the sketch going on the serial monitor and when I press the reset button on the Uno, I can see the graphic of where the point the sketch is running on the screen until the loaded up code starts again.
I have been looking online of what might be the problem and I have narrowed it down to 1)display needing a reset(which I can't do since the LCD reset pin is tied to a capacity and 3V3 according to your schematic) and
2)its not initialized properly which I tried by sending a SW reset command(0x01) to the ILI9341 via SPI.  Any help on what I can do now??? 


Did you try using our demo code? The demo code works with OLIMEXINO-2560 and can be used as basis.


Technical support and documentation manager at Olimex


I use this display together with Duinomite hardware and discovered the unconventional use of the SPI port. It does not have a MISO connection. The MISO pin of the UEXT connector is connected to a so-called D/C (Data/Command) pin. This pin has to be configured as output on the controller and not as an input as usual as MISO. The pin has to be set to 0 or 1 depending on sending data or a command. This was my first problem when I started my project.


I looked at the graphictest_olimex sketch and it looks mostly identical to me to the adafruit mock_ili9341 or graphictest) example so I used that instead of dealing with the pinout check the olimex sketch had.
@KeesZager, yes, I realize the screen doesn't really have any use for a MISO so instead they use that pin position as a DC pin which is needed to prep SPI interface.
Other information which I am not clear about. Since I am not using the LCD BL or IRQ (for now) , I should tie those to Vcc??
Can I connect BL pin to GND to turn off the BL??
I am not testing the tounchscreen yet so is it ok to leave the i2c pins unconnected???
Anything else I need to do to initialize the screen???

#define TFT_DC 9
#define TFT_CS 10
#define TFT_MOSI 11
#define TFT_CLK 13
#define TFT_RST -1
#define TFT_MISO -1

I used those for the Uno as you need to define those to make Adafruit_ILI9341 object.

I don't quite understand what reasons I might be seeing a completely white screen??? It kind of hard to troubleshoot when you haven't identify the potential source of the problem. Any ideas on that??
I assume the connection to the UNO is fine since the sketch works and I am seeing Benchmark numbers and also 'read diagnostics' part. I have no idea what the output means, they are all 0x00. But I can't see anything on the screen except white.


So I decided to use the graphictest_olimex sketch and just comment out the pincheck part and added my own pin definition.
This is what I see when the Demo started pops up in the serial monitor


and this is what I see when I  hit the UNO reset button



Did you check the comments here at top: https://github.com/OLIMEX/MOD-LCD2.8RTP/blob/master/SOFTWARE/Arduino/graphicstest_olimex/graphicstest_olimex.ino ?

Try using one or the other constructor when defining the board (one requires only two parameters; the other all of it):

Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_CLK, TFT_RST, TFT_MISO);

Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
Technical support and documentation manager at Olimex


yeah, I used
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_CLK, TFT_RST, TFT_MISO);

I commented out the other one.

I still don't understand why the white screen and what is it exactly. Is it the LCD backlight on full???


The white screen is what you see as long as the display has not been initialised. So it seems that the UNO does not automatically start the setup routine after power on. As far as I see it works perfect after the reset. Maybe you should add a delay after power on, so before you do the initialisation of the display.


Maybe try to first initialize the SPI the standard way before setting the MISO as DC pin.
Technical support and documentation manager at Olimex


OK, that works. The UNO deosn't do the initial power on setup properly.
As a additional test, I freed up one of my espressif ESP32wroom and used it for the screen. It works fine without any additional code modification for start up/power on. Thanks for your help, everyone.
I was reading some github ILI9341 related thread from 2018 yesterday with people describing the same problem  for certain ILI9341 screens and they suspected it was the different ways manufacturers design for the screen circuitry and that impacted the needed power on initialization instruction sequence to the ILI9341, depending on the screen circuitry design.
It was an interesting few days off tangent meandering. :)