ILI9341 Display showing white background and faint display

donperryjm

Well-known member
[delete, gonna try some things first]
 

Attachments

  • WhatsApp Image 2023-03-03 at 8.47.26 PM.jpg
    WhatsApp Image 2023-03-03 at 8.47.26 PM.jpg
    55.2 KB · Views: 16
Seen that before, my experience is the RST, sometimes it needs to power up slightly after the unit powers up, like a few ms.

1.) if you have a spare digital line connect RST to say pin 8 and create the object as follows

ILI9341_t3 YourDisplayName(10, 9, 8); //Display object

2) if you don't have any pins left, put a low pass filter between RST and 3v3, something like a 1K0 in series between RST and 3v3, and a 10 uF cap between RST and GND. This will slow the charge into RST.

Hope this helps.
 
Thanks Kris,

Turned out to be the initialization commands. The inversion was on, the wrong screen refresh rate was used. Smooth like butter now.

Code:
static const uint8_t PROGMEM init_commands[] = { 1, GC9A01A_INREGEN2,
                                      2, 0xEB, 0x14,
                                      1, GC9A01A_INREGEN1,
                                      1, GC9A01A_INREGEN2,
                                      2, 0xEB, 0x14,
                                      2, 0x84, 0x40,
                                      2, 0x85, 0xFF,
                                      2, 0x86, 0xFF,
                                      2, 0x87, 0xFF,
                                      2, 0x88, 0x0A,
                                      2, 0x89, 0x21,
                                      2, 0x8A, 0x00,
                                      2, 0x8B, 0x80,
                                      2, 0x8C, 0x01,
                                      2, 0x8D, 0x01,
                                      2, 0x8E, 0xFF,
                                      2, 0x8F, 0xFF,
                                      3, 0xB6, 0x00, 0x00,
                                      2, GC9A01A_MADCTL, MADCTL_MX | MADCTL_BGR,
                                      2, GC9A01A_PIXFMT, 0x05,
                                      5, 0x90, 0x08, 0x08, 0x08, 0x08,
                                      2, 0xBD, 0x06,
                                      2, 0xBC, 0x00,
                                      4, 0xFF, 0x60, 0x01, 0x04,
                                      2, GC9A01A_VREG1A, 0x13,
                                      2, GC9A01A_VREG1B, 0x13,
                                      2, GC9A01A_VREG2A, 0x22,
                                      2, 0xBE, 0x11,
                                      3, ILI9341_GMCTRN1, 0x10, 0x0E,
                                      4, 0xDF, 0x21, 0x0c, 0x02,
                                      7, GC9A01A_GAMMA1, 0x45, 0x09, 0x08, 0x08, 0x26, 0x2A,
                                      7, GC9A01A_GAMMA2, 0x43, 0x70, 0x72, 0x36, 0x37, 0x6F,
                                      7, GC9A01A_GAMMA3, 0x45, 0x09, 0x08, 0x08, 0x26, 0x2A,
                                      7, GC9A01A_GAMMA4, 0x43, 0x70, 0x72, 0x36, 0x37, 0x6F,
                                      3, 0xED, 0x1B, 0x0B,
                                      2, 0xAE, 0x77,
                                      2, 0xCD, 0x63,
                                      10, 0x70, 0x07, 0x07, 0x04, 0x0E, 0x0F, 0x09, 0x07, 0x08, 0x03,
                                      2, ILI9341_FRAMERATE, 0x28,
                                      13, 0x62, 0x18, 0x0D, 0x71, 0xED, 0x70, 0x70,
                                                0x18, 0x0F, 0x71, 0xEF, 0x70, 0x70,
                                      13, 0x63, 0x18, 0x11, 0x71, 0xF1, 0x70, 0x70,
                                                0x18, 0x13, 0x71, 0xF3, 0x70, 0x70,
                                      8, 0x64, 0x28, 0x29, 0xF1, 0x01, 0xF1, 0x00, 0x07,
                                      11, 0x66, 0x3C, 0x00, 0xCD, 0x67, 0x45, 0x45, 0x10, 0x00, 0x00, 0x00,
                                      11, 0x67, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x01, 0x54, 0x10, 0x32, 0x98,
                                      8, 0x74, 0x10, 0x85, 0x80, 0x00, 0x00, 0x4E, 0x00,
                                      3, 0x98, 0x3e, 0x07,
                                      2, GC9A01A_TEON, 0,
                                      2, GC9A01A_INVON, 0,
                                      2, GC9A01A_SLPOUT, 0x80, // Exit sleep
                                      2, GC9A01A_DISPON, 0x80, // Display on
                                      0 };

This is the one I'm using now

Code:
static const uint8_t PROGMEM init_commands[] = { 4, 0xEF, 0x03, 0x80, 0x02,
                                        4, 0xCF, 0x00, 0XC1, 0X30,
                                        5, 0xED, 0x64, 0x03, 0X12, 0X81,
                                        4, 0xE8, 0x85, 0x00, 0x78,
                                        6, 0xCB, 0x39, 0x2C, 0x00, 0x34, 0x02,
                                        2, 0xF7, 0x20,
                                        3, 0xEA, 0x00, 0x00,
                                        2, ILI9341_PWCTR1, 0x23, // Power control
                                        2, ILI9341_PWCTR2, 0x10, // Power control
                                        3, ILI9341_VMCTR1, 0x3e, 0x28, // VCM control
                                        2, ILI9341_VMCTR2, 0x86, // VCM control2
                                        2, GC9A01A_MADCTL, 0x48, // Memory Access Control
                                        2, GC9A01A_PIXFMT, 0x55,
                                        3, ILI9341_FRMCTR1, 0x00, 0x18,
                                        4, GC9A01A_DFUNCTR, 0x08, 0x82, 0x27, // Display Function Control
                                        2, 0xF2, 0x01, // Gamma Function Disable
                                        2, ILI9341_GAMMASET, 0x01, // Gamma curve selected
                                        16, ILI9341_GMCTRP1, 0x0F, 0x31, 0x2B, 0x0C, 0x0E, 0x08, 0x4E,
                                            0xF1, 0x37, 0x07, 0x10, 0x03, 0x0E, 0x09, 0x00, // Set Gamma
                                        16, ILI9341_GMCTRN1, 0x00, 0x0E, 0x14, 0x03, 0x11, 0x07, 0x31,
                                            0xC1, 0x48, 0x08, 0x0F, 0x0C, 0x31, 0x36, 0x0F, // Set Gamma
                                        3, 0x55, 0x00, 0x00, // FrameRate Control 119Hz
                                         2, GC9A01A_INVOFF, 1,
                                        0 };
 
Back
Top