Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display P023T009-V2 in 8-bit interface mode with driver ILI9342C - white screen #2682

Closed
brightproject opened this issue Jun 2, 2023 · 7 comments

Comments

@brightproject
Copy link

brightproject commented Jun 2, 2023

Hello @Bodmer
I want to use display P023T009-V2
2 31_P023T009_cut
with stm32f401ccu6 with library TFT_eSPI
Connection according to the datasheet on the display and connection as in MCUFRIEND_kbv
Connect_no_work

    //LCD pins  |D7 |D6 |D5 |D4 |D3 |D2 |D1 |D0 | |RD |WR |RS |CS |RST| |SD_SS|SD_DI|SD_DO|SD_SCK|
    //STM32 pin |PA7|PA6|PA5|PA4|PA3|PA2|PA1|PA0| |PB0|PB6|PB7|PB8|PB9| |PA15 |PB5  |PB4  |PB3   | **ALT-SPI1**

The display is switched to 8-bit mode by connecting pin 24(w16_8x) to ground(IM1 -> LOW).
IM1

TFT_graphicstest_one_lib.ino

TFT_eSPI library test!
Benchmark                Time (microseconds)
Screen fill              963641
Text                     42001
Lines                    554744
Horiz/Vert Lines         79712
Rectangles (outline)     46658
Rectangles (filled)      2327901
Circles (filled)         355437
Circles (outline)        203002
Triangles (outline)      119031
Triangles (filled)       841875
Rounded rects (outline)  97113
Rounded rects (filled)   2377060
Done!

Test by MCUFRIEND_kbv LCD_ID_readnew.ino

Read Special 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)

diagnose any controller
reg(0x0000) 00 00.ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 04 04 04 04.Manufacturer ID
reg(0x0009) 00 00 00 00 00.Status Register
reg(0x000A) 00 08.Get Power Mode
reg(0x000C) 04 04.Get Pixel Format
reg(0x0030) 00 00 00 00 00.PTLAR
reg(0x0033) 00 00 00 00 00 00 00.VSCRLDEF
reg(0x0061) 00 00.RDID1 HX8347-G
reg(0x0062) 00 00.RDID2 HX8347-G
reg(0x0063) 00 00.RDID3 HX8347-G
reg(0x0064) 04 04.RDID1 HX8347-A
reg(0x0065) 04 04.RDID2 HX8347-A
reg(0x0066) 04 04.RDID3 HX8347-A
reg(0x0067) 04 04.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 40.RGB Interface Signal Control
reg(0x00B3) 00 00 18 18 18.Frame Memory
reg(0x00B4) 04 44.Frame Mode
reg(0x00B6) 04 0E 84 1D 04.Display Control
reg(0x00B7) 04 07.Entry Mode Set
reg(0x00BF) 04 06 06 06 06 06.ILI9481, HX8357-B
reg(0x00C0) 00 B2 B2 B2 B2 B2 B2 B2 B2.Panel Control
reg(0x00C1) 00 00 00 00.Display Timing
reg(0x00C5) 04 04.Frame Rate
reg(0x00C8) 00 50 02 02 02 02 02 06 06 06 06 06 06.GAMMA
reg(0x00CC) 04 04.Panel Control
reg(0x00D0) 00 00 00 00.Power Control
reg(0x00D1) 00 00 00 00.VCOM Control
reg(0x00D2) 00 11 00.Power Normal
reg(0x00D3) 00 00 93 42.ILI9341, ILI9488
reg(0x00D4) 04 04 04 04.Novatek
reg(0x00DA) 00 00.RDID1
reg(0x00DB) 00 00.RDID2
reg(0x00DC) 04 04.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 1B 20 02 10 02 32 23 40 01 03 02 2E 35 0F.GAMMA-N
reg(0x00EF) 04 04 04 04 00 00.ILI9327
reg(0x00F2) 00 01 00 00 00 00 00 00 00 00 00 00.Adjust Control 2
reg(0x00F6) 04 06 06 06.Interface Control

Indicates that the display is connected to the microcontroller and is being read ID
reg(0x00D3) 00 00 93 42.ILI9341, ILI9488
I uncommented strings in User_Setup_Select.h
#include <User_Setups/Setup30_ILI9341_Parallel_STM32.h> // Setup for Nucleo board and parallel display
And corrected file:

        ////////////////////////////////////////////////////
        // Setup for Nucleo 64 or 144 and ILI9341 display //
        ////////////////////////////////////////////////////

#define USER_SETUP_ID 30

// See SetupX_Template.h for all options available

// Define STM32 to invoke optimised processor support
#define STM32

// Defining the board allows the library to optimise the performance
// for UNO compatible "MCUfriend" style shields
//#define NUCLEO_64_TFT
//#define NUCLEO_144_TFT

// Tell the library to use 8 bit parallel mode (otherwise SPI is assumed)
#define TFT_PARALLEL_8_BIT
//#define TFT_PARALLEL_16_BIT

// Define the display driver chip type
//#define ILI9341_DRIVER
#define ILI9486_DRIVER

// Define the Nucleo 64/144 pins used for the parallel interface TFT
// The pins can be changed here but these are the ones used by the
// common "MCUfriend" shields
#define TFT_CS   PB8  // Chip select control pin
#define TFT_DC   PB7  // RS/CD/Data Command control pin
#define TFT_RST  PB9  // Reset pin

#define TFT_WR   PB6  // Write strobe control pin 
#define TFT_RD   PB0  // Read pin

#define TFT_D0   PA0  // 8 bit parallel bus to TFT
#define TFT_D1   PA1
#define TFT_D2   PA2
#define TFT_D3   PA3
#define TFT_D4   PA4
#define TFT_D5   PA5
#define TFT_D6   PA6
#define TFT_D7   PA7

// Fonts to be available
#define LOAD_GLCD   // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
#define LOAD_FONT2  // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
#define LOAD_FONT4  // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
#define LOAD_FONT6  // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
#define LOAD_FONT7  // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
#define LOAD_FONT8  // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
#define LOAD_GFXFF  // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts

// STM32 support for smooth fonts via program memory (FLASH) arrays
#define SMOOTH_FONT

Any example code from TFT_eSPI compiles successfully for the Arduino_Core_STM32 kernel, but the display stays white.
photo1685696835 (1)
photo1685696835
Moreover, upon closer examination of the matrix, pixels are visible, i.e. the driver powered the pixels, but there is no initialization.
True, when you select a driver
#define ILI9341_DRIVER
the display does not react at all
When
#define ILI9486_DRIVER
the display ripples a little during restart.
This gives me hope that the problem is in the wrong initialization of the driver ILI9342C.
I also found a simple code to communicate with the controller ILI9341

//
// ILI9341 ID Checker against data sheet http://www.adafruit.com/datasheets/ILI9341.pdf
// Ugly bit basher - R Jennings 11/11/14 (http://www.shaders.co.uk)
//
 #define CS PB8   // Chip Select goes to Analog 3
 #define CD PB7   // Command/Data goes to Analog 2
 #define WR PB6   // LCD Write goes to Analog 1
 #define RD PB0   // LCD Read goes to Analog 0
 #define RST PB9  // Can alternately just connect to Arduino's reset pin
 #define D0 PA0    // DO
 #define D1 PA1    // D1
 #define D2 PA2    // D2
 #define D3 PA2   // D3
 #define D4 PA4    // D4
 #define D5 PA5    // D5
 #define D6 PA6    // D6
 #define D7 PA7    // D7

void setup(void) {
// Set up port directions and default states
  pinMode(CS, OUTPUT);  pinMode(CD, OUTPUT);  pinMode(WR, OUTPUT);  pinMode(RD, OUTPUT);  pinMode(RST, OUTPUT);
  digitalWrite(CS, 1); digitalWrite(CD, 1); digitalWrite(WR, 1); digitalWrite(RD, 1); digitalWrite(RST, 1);
  pinMode(D0, OUTPUT); pinMode(D1, OUTPUT); pinMode(D2, OUTPUT); pinMode(D3, OUTPUT);
  pinMode(D4, OUTPUT); pinMode(D5, OUTPUT); pinMode(D6, OUTPUT); pinMode(D7, OUTPUT);

// This just drivers the serial monitor no screen activity  
  Serial.begin(115200);
  Serial.println("TFT LCD test - Read of the ID register");
//HW Reset
  digitalWrite(RST,0); delay(5);
  digitalWrite(RST,1); delay(500);  
// Read the ID Register, D3h
// Start by writing to the command register with the register to read
  digitalWrite(CD, 0); 
  digitalWrite(CS, 0);
  digitalWrite(D0, 1); digitalWrite(D1, 1); digitalWrite(D2, 0); digitalWrite(D3, 0);  // 3 - Change for lower nibble as required 
  digitalWrite(D4, 1); digitalWrite(D5, 0); digitalWrite(D6, 1); digitalWrite(D7, 1);  // D - Change for upper nibble as required
  digitalWrite(WR, 0); digitalWrite(WR, 1);
  digitalWrite(CS, 1);    
// Switch to reading   
  pinMode(D0, INPUT);    pinMode(D1, INPUT);    pinMode(D2, INPUT);    pinMode(D3, INPUT);
  pinMode(D4, INPUT);    pinMode(D5, INPUT);    pinMode(D6, INPUT);    pinMode(D7, INPUT);
  int x=0;
// Then read the four bytes and print to the serial port
// See section 8.3.23 page 233 for read sequence
// 1st Parameter - Dummy byte could be anything
  digitalWrite(CD, 1); 
  digitalWrite(CS, 0); 
  digitalWrite(RD, 0); 
  x=0;
  digitalWrite(RD, 0); 
  x|=digitalRead(D0);    x|=digitalRead(D1)<<1; x|=digitalRead(D2)<<2; x|=digitalRead(D3)<<3;
  x|=digitalRead(D4)<<4; x|=digitalRead(D5)<<5; x|=digitalRead(D6)<<6; x|=digitalRead(D7)<<7;
  Serial.print("Dummny Byte Read =        "); Serial.println(x, HEX);   
  digitalWrite(RD, 1); 
 // 2nd Parameter should be 00h
  x=0;
  digitalWrite(RD, 0); 
  x|=digitalRead(D0);    x|=digitalRead(D1)<<1; x|=digitalRead(D2)<<2; x|=digitalRead(D3)<<3;
  x|=digitalRead(D4)<<4; x|=digitalRead(D5)<<5; x|=digitalRead(D6)<<6; x|=digitalRead(D7)<<7;
  Serial.print("2nd Parameter Byte Read = "); Serial.println(x, HEX);   
  digitalWrite(RD, 1); 
 // 3rd Parameter should be 93h    
  x=0;
  digitalWrite(RD, 0); 
  x|=digitalRead(D0);    x|=digitalRead(D1)<<1;  x|=digitalRead(D2)<<2; x|=digitalRead(D3)<<3;
  x|=digitalRead(D4)<<4; x|=digitalRead(D5)<<5;  x|=digitalRead(D6)<<6; x|=digitalRead(D7)<<7;
  Serial.print("3rd Parameter Byte Read = "); Serial.println(x, HEX);   
  digitalWrite(RD, 1); 
 // 4th Parameter should be 41h     
  x=0;
  digitalWrite(RD, 0); 
  x|=digitalRead(D0);    x|=digitalRead(D1)<<1; x|=digitalRead(D2)<<2; x|=digitalRead(D3)<<3;
  x|=digitalRead(D4)<<4; x|=digitalRead(D5)<<5; x|=digitalRead(D6)<<6; x|=digitalRead(D7)<<7;
  Serial.print("4th Parameter Byte Read = "); Serial.println(x, HEX);   
  digitalWrite(RD, 1);  
}
//Nothing to do here
void loop(void) {
}

and got the same result by MCUFRIEND_kbv LCD_ID_readnew.ino

TFT LCD test - Read of the ID register
Dummny Byte Read =        0
2nd Parameter Byte Read = 0
3rd Parameter Byte Read = 93
4th Parameter Byte Read = 42

About three weeks I communicate with the Chinese who sold the display, but he did not suggest anything sensible.
The Chinese does not understand the operation of the display at all, and only sends screenshots of his defective datasheet.
True, the Chinese still sent some kind of code, but I don’t know how to apply it.

void ILI9342C_HSD2.3_Initial(void)
{
  // VCI=2.8V
  //************* Reset LCD Driver ****************//
  LCD_nRESET = 1;
  delayms(1);     // Delay 1ms
  LCD_nRESET = 0;
  delayms(10);    // Delay 10ms, This delay time is necessary
  LCD_nRESET = 1;
  delayms(120);   // Delay 120 ms

  //************* Start Initial Sequence **********//
  LCD_ILI9342_CMD(0xC8);       //Set EXTC
  LCD_ILI9342_Parameter(0xFF);
  LCD_ILI9342_Parameter(0x93);
  LCD_ILI9342_Parameter(0x42);
  
  LCD_ILI9342_CMD(0x36);       //Memory Access Control
  LCD_ILI9342_Parameter(0xC8); //MY,MX,MV,ML,BGR,MH
  LCD_ILI9342_CMD(0x3A);       //Pixel Format Set
  LCD_ILI9342_Parameter(0x55); //DPI [2:0],DBI [2:0]
  
  LCD_ILI9342_CMD(0xC0);       //Power Control 1
  LCD_ILI9342_Parameter(0x13); //VRH[5:0]
  LCD_ILI9342_Parameter(0x0E); //VC[3:0]
  
  LCD_ILI9342_CMD(0xC1);       //Power Control 2
  LCD_ILI9342_Parameter(0x02); //SAP[2:0],BT[3:0]
  
  LCD_ILI9342_CMD(0xC5);       //VCOM
  LCD_ILI9342_Parameter(0xD3);
  
  LCD_ILI9342_CMD(0xB1);      
  LCD_ILI9342_Parameter(0x00);     
  LCD_ILI9342_Parameter(0x1B);
  LCD_ILI9342_CMD(0xB4);      
  LCD_ILI9342_Parameter(0x02);
  
  LCD_ILI9342_CMD(0xE0);
  LCD_ILI9342_Parameter(0x00);//P01-VP63   
  LCD_ILI9342_Parameter(0x03);//P02-VP62   
  LCD_ILI9342_Parameter(0x08);//P03-VP61   
  LCD_ILI9342_Parameter(0x06);//P04-VP59   
  LCD_ILI9342_Parameter(0x13);//P05-VP57   
  LCD_ILI9342_Parameter(0x09);//P06-VP50   
  LCD_ILI9342_Parameter(0x39);//P07-VP43   
  LCD_ILI9342_Parameter(0x39);//P08-VP27,36
  LCD_ILI9342_Parameter(0x48);//P09-VP20   
  LCD_ILI9342_Parameter(0x02);//P10-VP13   
  LCD_ILI9342_Parameter(0x0A);//P11-VP6    
  LCD_ILI9342_Parameter(0x08);//P12-VP4    
  LCD_ILI9342_Parameter(0x17);//P13-VP2    
  LCD_ILI9342_Parameter(0x17);//P14-VP1    
  LCD_ILI9342_Parameter(0x0F);//P15-VP0    
  
  LCD_ILI9342_CMD(0xE1);
  LCD_ILI9342_Parameter(0x00);//P01
  LCD_ILI9342_Parameter(0x28);//P02
  LCD_ILI9342_Parameter(0x29);//P03
  LCD_ILI9342_Parameter(0x01);//P04
  LCD_ILI9342_Parameter(0x0D);//P05
  LCD_ILI9342_Parameter(0x03);//P06
  LCD_ILI9342_Parameter(0x3F);//P07
  LCD_ILI9342_Parameter(0x33);//P08
  LCD_ILI9342_Parameter(0x52);//P09
  LCD_ILI9342_Parameter(0x04);//P10
  LCD_ILI9342_Parameter(0x0F);//P11
  LCD_ILI9342_Parameter(0x0E);//P12
  LCD_ILI9342_Parameter(0x37);//P13
  LCD_ILI9342_Parameter(0x38);//P14
  LCD_ILI9342_Parameter(0x0F);//P15
  
  LCD_ILI9342_CMD(0x11);//Exit Sleep
  Delayms(120);
  LCD_ILI9342_CMD(0x29);//Display On

}

// Write the display data into GRAM here
// LCD_ILI9342_CMD(0x2C);//GRAM start writing
for ( i=0; i<240; i++)
for ( j=0; j<320; j++)
LCDDATA_Write(0xdata); //write display data

void LCD_Enter Sleep_ILI9342(void)
{
  LCD_ILI9342_CMD(0x28);//Display off
  LCD_ILI9342_CMD(0x10);//Enter Sleep mode
}

void LCD_Exit Sleep_ILI9342(void)
{
  LCD_ILI9342_CMD(0x11);//Exit Sleep
  Delayms(120);
  LCD_ILI9342_CMD(0x29);//Display on
}

ILI9342C:
ILI9342C_DTS_V102_20120328(1).pdf
P023T009-V2 SPEC:
P023T009-V2 SPEC(2).pdf

@Bodmer
Copy link
Owner

Bodmer commented Jun 2, 2023

Try a different init sequence, see here:
#1172

@brightproject
Copy link
Author

brightproject commented Jun 3, 2023

Try a different init sequence, see here:

I've tried changing the parameters of the power commands, but didn't get any results.
VCM control for ILI9342C only one, for ILI9342 there VCM control an VCM control 2.
I took the code sent by the Chinese

void ILI9342C_HSD2.3_Initial(void)
{
  // VCI=2.8V
  //************* Reset LCD Driver ****************//
  LCD_nRESET = 1;
  delayms(1);     // Delay 1ms
  LCD_nRESET = 0;
  delayms(10);    // Delay 10ms, This delay time is necessary
  LCD_nRESET = 1;
  delayms(120);   // Delay 120 ms

  //************* Start Initial Sequence **********//
  LCD_ILI9342_CMD(0xC8);       //Set EXTC
  LCD_ILI9342_Parameter(0xFF);
  LCD_ILI9342_Parameter(0x93);
  LCD_ILI9342_Parameter(0x42);
  
  LCD_ILI9342_CMD(0x36);       //Memory Access Control
  LCD_ILI9342_Parameter(0xC8); //MY,MX,MV,ML,BGR,MH
  LCD_ILI9342_CMD(0x3A);       //Pixel Format Set
  LCD_ILI9342_Parameter(0x55); //DPI [2:0],DBI [2:0]
  
  LCD_ILI9342_CMD(0xC0);       //Power Control 1
  LCD_ILI9342_Parameter(0x13); //VRH[5:0]
  LCD_ILI9342_Parameter(0x0E); //VC[3:0]
  
  LCD_ILI9342_CMD(0xC1);       //Power Control 2
  LCD_ILI9342_Parameter(0x02); //SAP[2:0],BT[3:0]
  
  LCD_ILI9342_CMD(0xC5);       //VCOM
  LCD_ILI9342_Parameter(0xD3);
  
  LCD_ILI9342_CMD(0xB1);      
  LCD_ILI9342_Parameter(0x00);     
  LCD_ILI9342_Parameter(0x1B);
  LCD_ILI9342_CMD(0xB4);      
  LCD_ILI9342_Parameter(0x02);
  
  LCD_ILI9342_CMD(0xE0);
  LCD_ILI9342_Parameter(0x00);//P01-VP63   
  LCD_ILI9342_Parameter(0x03);//P02-VP62   
  LCD_ILI9342_Parameter(0x08);//P03-VP61   
  LCD_ILI9342_Parameter(0x06);//P04-VP59   
  LCD_ILI9342_Parameter(0x13);//P05-VP57   
  LCD_ILI9342_Parameter(0x09);//P06-VP50   
  LCD_ILI9342_Parameter(0x39);//P07-VP43   
  LCD_ILI9342_Parameter(0x39);//P08-VP27,36
  LCD_ILI9342_Parameter(0x48);//P09-VP20   
  LCD_ILI9342_Parameter(0x02);//P10-VP13   
  LCD_ILI9342_Parameter(0x0A);//P11-VP6    
  LCD_ILI9342_Parameter(0x08);//P12-VP4    
  LCD_ILI9342_Parameter(0x17);//P13-VP2    
  LCD_ILI9342_Parameter(0x17);//P14-VP1    
  LCD_ILI9342_Parameter(0x0F);//P15-VP0    
  
  LCD_ILI9342_CMD(0xE1);
  LCD_ILI9342_Parameter(0x00);//P01
  LCD_ILI9342_Parameter(0x28);//P02
  LCD_ILI9342_Parameter(0x29);//P03
  LCD_ILI9342_Parameter(0x01);//P04
  LCD_ILI9342_Parameter(0x0D);//P05
  LCD_ILI9342_Parameter(0x03);//P06
  LCD_ILI9342_Parameter(0x3F);//P07
  LCD_ILI9342_Parameter(0x33);//P08
  LCD_ILI9342_Parameter(0x52);//P09
  LCD_ILI9342_Parameter(0x04);//P10
  LCD_ILI9342_Parameter(0x0F);//P11
  LCD_ILI9342_Parameter(0x0E);//P12
  LCD_ILI9342_Parameter(0x37);//P13
  LCD_ILI9342_Parameter(0x38);//P14
  LCD_ILI9342_Parameter(0x0F);//P15
  
  LCD_ILI9342_CMD(0x11);//Exit Sleep
  Delayms(120);
  LCD_ILI9342_CMD(0x29);//Display On

}

// Write the display data into GRAM here
// LCD_ILI9342_CMD(0x2C);//GRAM start writing
for ( i=0; i<240; i++)
for ( j=0; j<320; j++)
LCDDATA_Write(0xdata); //write display data

void LCD_Enter Sleep_ILI9342(void)
{
  LCD_ILI9342_CMD(0x28);//Display off
  LCD_ILI9342_CMD(0x10);//Enter Sleep mode
}

void LCD_Exit Sleep_ILI9342(void)
{
  LCD_ILI9342_CMD(0x11);//Exit Sleep
  Delayms(120);
  LCD_ILI9342_CMD(0x29);//Display on
}

and found the necessary lines in the ILI9341_Init.h file using the commands and replaced some - this also did not work.
I decided to compare the datasheets for ILI9341 and ILI9342C
I was surprised that ILI9342 does not have a physical contact EXTC
Скриншот 03-06-2023 14 30 41
How to initialize the display, I do not understand yet.
Therefore, the display is apparently not initialized.
Any command must be accompanied by a signal EXTC.
enable_command_EXTC
For ILI9342 and ILI9342C different commands
EXTC_different
I tried adding code

  writecommand(0xC8);
  writedata(0xFF);
  writedata(0x92);
  writedata(0x42);

to ILI9341_Init.h , but again I got nothing but a white screen.
Connected all contacts, this true, because the parameters are read correctly, therefore CS DC WR RD RST control signals are correctly transmitted and data from the ILI9342C controller is transmitted and received via D0-D7.
Why isn't there an image, no image at all, not blurry, not silhouettes, not gamma, not stripes?
In the datasheet ILI9342 I found that the 8080 interface is I and II.
mcu_interface
I had suspicions that the Chinese made a display and made a mistake with the designations D0-D7 and D8-D15 in the datasheet.
But after all, there is a communication with the display controller via D0-D7 and I receive data.
The situation is not very clear to me.
Plus to these problems, I can't use rogerclarke core for compile and check code for MCUFRIEND_kbv.
TFT_eSPI library is compiled only on the engine stm32duino from STMicroelectronics.
The only thing I noticed when you select a driver ILI9486 ILI9486_DRIVER is that the display dims a little at startup, but the event happens very quickly and I could not understand what it was.
I began to study the commands in the file ILI9486_Init.h and found that the command 0x11
causes the screen to blink once.
It is clear from the datasheet that the 0x11 command wakes up the display, and the command will not work if the display is awake.
And since he blinked, it means he was in holy mode, but nowhere in the code did he find the 0x10 command.

This command has no effect when module is already in sleep out mode. Sleep Out Mode can only be left by the Sleep In
Command (10h). It will be necessary to wait 5msec before sending next command, this is to allow time for the clock circuits
stabilize. The display module loads all display supplier’s factory default values to the registers during this 120msec and there
cannot be any abnormal visual effect on the display image if factory default and register values are same when this load is
done and when the display module is already Sleep Out –mode. The display module is doing self-diagnostic functions during
this 5msec. It will be necessary to wait 120msec after sending Sleep In command (when in Sleep Out mode) before Sleep Out
command can be sent.

blank_display

@brightproject brightproject changed the title Display P023T009-V2 in 8-bit interface mode with driver ILI9342C - black screen Display P023T009-V2 in 8-bit interface mode with driver ILI9342C - white screen Jun 3, 2023
@brightproject
Copy link
Author

I create same problem discussion in fork stm32core
stm32duino/Arduino_Core_STM32#2035

@Bodmer
Copy link
Owner

Bodmer commented Jun 5, 2023

Have you got the Mcufriend_kbv library running with that hardware?

@brightproject
Copy link
Author

brightproject commented Jun 5, 2023

Have you got the Mcufriend_kbv library running with that hardware?

Mcufriend_kbv library doesn't compile for stm32f401 on core from roger clark...
The only option is to use your library TFT_eSPI with the ST kernel Arduino_Core_STM32 and hardware STM32F401CCU6 v3.0
I think that my black pill is fake - https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1
But it works with the display ILI9486.
On black pill all worked!
pins_as_stm32_8bit
work_eTFT_sPI
I I think the problem is with the initialization of the display on the driver ILI9342C
EXTC and soft reset - you wrote about the reset as the fact that on some displays the hard reset signal does not reach.
But I have tried the commands:

    writecommand(0x01); // SW reset
    delay(120);

    writecommand(0x11); // Sleep out, also SW reset
    delay(120);

But nothing has changed.
The only thing I noticed when you select a ILI9486_DRIVER is that the display dims a little at startup, but the event happens very quickly and I could not understand what it was.

@Bodmer
Copy link
Owner

Bodmer commented Aug 2, 2023

Usually:

#define ILI9342_DRIVER

works fine.

@Bodmer Bodmer closed this as completed Sep 6, 2023
@Bodmer
Copy link
Owner

Bodmer commented Sep 6, 2023

Assumed resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants