-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
ILI9341_Init.h - Strange graphic issues depending on TFT #1172
Comments
Thanks for reporting and investigating this problem. There is some variation in the required init values between the TFT panel manufacturers even though the same controller is used. The further complication is that panels may be fitted with clone chips when bought from some suppliers in China. Yet another complication is production process variations and improvements over the years that change the electrical characteristics slightly. The only way around this is to buy from screen suppliers that guarantee genuine parts and provide the optimised init code for the actual display sold. The current init sequence is the same as used by Adafruit ILI9341 library which was the starting seed for this library. In the ILI9481 case the library provides 6 different init sequences, a generic one plus 5 other options! I will add a new option for the ILI9341. |
Thanks for this clarification @Bodmer :) If possible, please use this config as a reference. It is a mix of the original one and the DFR one combining several settings like the gamma settings. Only changing the vcom 2 would lead to strange gamma settings. { writecommand(0xED); writecommand(0xE8); writecommand(0xCB); writecommand(0xF7); writecommand(0xEA); writecommand(ILI9341_PWCTR1); //Power control writecommand(ILI9341_PWCTR2); //Power control writecommand(ILI9341_VMCTR1); //VCM control writecommand(ILI9341_VMCTR2); //VCM control2 writecommand(ILI9341_PIXFMT); writecommand(0x36); // Memory Access Control writecommand(ILI9341_FRMCTR1); writecommand(ILI9341_DFUNCTR); // Display Function Control writecommand(0xF2); // 3Gamma Function Disable writecommand(0x26); //Gamma curve selected writecommand(0xE0); //Set Gamma writecommand(0XE1); //Set Gamma writecommand(0x2B); writecommand(0x2A); writecommand(ILI9341_SLPOUT); //Exit Sleep end_tft_write(); writecommand(ILI9341_DISPON); //Display on |
Use: #define ILI9341_2_DRIVER in the setup file to invoke new initicode, instead of: #define ILI9341_DRIVER
I have added an option to use #define ILI9341_2_DRIVER in the setup. please test. |
@Onefabis please raise a new issue, this one is for ILI9341. |
working as expected. Thank you very much!!! :) |
Thanks for letting me know. |
Hello, I have a problem initializing the display with the driver * |
Alternative panel driver for some TFT screens, used for example on Sunton ESP32 boards see lovyan03#546 Bodmer/TFT_eSPI#1172
Hi,
i just came across some strange issues...
Everything tested with ESP32.
I have 3 different ILI9341 Displays, to make it easier i will call them by the color:
RED: https://www.amazon.de/gp/product/B017FZTIO6/
-> This is the most common ILI9341 i guess
BLACK: https://wiki.dfrobot.com/2.8inches_320_240_IPS_TFT_LCD_Touchscreen_SKU_DFR0665
-> DFROBOT's version with an FPC-connector + built in BL-dimming-pin
BLUE: https://www.amazon.de/gp/product/B07QJWXPJT
-> Another version with built in BL-dimming-pin
When i first tested the black one i though the display was even cheaper than the other ones, because it gave me some strange lines when looking to the tft from the left side (assuming that the pin header belongs to the left).
Its really hard to take propper pictures of the problem because of the view angle + anti aliasing and other photo related stuff. ;-)
But this is what you have to expect:
There was also another problem that looked like a lcd-burin or lcd-memory-effect problem. The display would burin a screen after just a couple of minutes. In this picture a static screen was showing for 10 minutes, then i switched to solid yellow to make the "burnin" visible:
But before throwing it into the trash i wanted to make sure it is a hardware problem. So i used DFROBOT's library instead of this one. And i was suprised to see that the strange lines disappeared.
So i compared even the other displays to make sure they don't show a similar behaviour.
And the sad thing is: Even the other displays show those strange lines when looking from a steep angle. The only difference is that you really have to look closely to recognize them.
Then i compared the difference in the inits of the 2 libraries:
https://github.com/Bodmer/TFT_eSPI/blob/master/TFT_Drivers/ILI9341_Init.h
https://github.com/DFRobot/DFRobot_GDL/blob/master/src/Drivers/DFRobot_ILI9341.h
And there is one line that fixes this issue in the DFR lib, the VCM control 2, also called VCOM control 2.
DFR lib sends: 0xB7
TFT_eSPI sends: 0x86
So, when replacing ILI9341_Init.h line 55 with:
writedata(0xB7);
The issue is gone. And the issue that looked like a lcd-burnin was also gone. :)
Replacing only this line fixed those issues, but i still had to mix both init files to get back a propper gamma setting.
Everything compared:
Black display showing stripes:
Black display showing burnin:
Black display fixed:
Red display showing stripes:
Red display fixed:
Blue display showing stripes:
Blue display fixed:
Am i the only one having these issues? :)
And what is the init sequence for the ILI9341 based on?
The text was updated successfully, but these errors were encountered: