3,5 inch TFT Display (ILI9486) no reaction display stays white

Hello Arduino Community,
I bought an 3,5 inch TFT Display last week from Amazon. Yesterday i received it and immediately want to test it. So I grab my Arduino UNO and put the new Display in. After powering up the Arduino to USB or with external DC (makes no difference) the blacklight from the lcd goes on.

On the packages which I received stands: 3.5" UNO Module. Driver: ILI9486. Bus: 8bit. Dots: 320x480. Touch: Yes. SKU: MAR3501"

I searched online for libraries for the Arduino to get the display running so i testet the LCDWiki Library from here:
http://www.lcdwiki.com/3.5inch_Arduino_Display-UNO
The Display on the site looks exactly the same like my.

But with this Library the display didn't work. The Librarys returned as chip id the 0x9486 which seems to be ok. But the displays stays white no clear screen, or other functions work.

I also tryed the mcufriend Library directly from the Arduino Library Manager but again the display does not work. But this time the Chip ID is not longer 0x9486. Its now: 0x8E8E. And again the Display stays white.

So what is wrong? It's it a broken Displays or fake driver Chip? Or maybe software error.

I hope sameone can help me.
Stay Healthy!
Best wishes
Jan W.

  1. Install MCUFRIEND_kbv via the IDE Library Manager.
  2. Plug the Shield into the Arduino Uno as Nature intended.
  3. Run all the examples.

Make notes on paper.
If you have any problems, copy-paste any output from the Serial Terminal to your message. (preferably inside a Code window)
Type any relevant information from your paper notes.

David.

david_prentice:

  1. Install MCUFRIEND_kbv via the IDE Library Manager.
  2. Plug the Shield into the Arduino Uno as Nature intended.
  3. Run all the examples.

Make notes on paper.
If you have any problems, copy-paste any output from the Serial Terminal to your message. (preferably inside a Code window)
Type any relevant information from your paper notes.

David.

Hallo David, thanks for your Answer.
It's a little bit embarrassing, the Microprocessor (ATMega328P) was fault. I had 4 unprogrammed AVR's in my box and burned the Bootloader to one and used this new Processor to test it. And now it works just fine.

I checked the old Processor and I figure out that the Analog Pins A1 and A2 for LCD Write and Command are faulty. This two Pins are always Low Active and i can't pull them high. So I think that was my Problem.

But i tryed all Examples from the MCUFriend Library. I installed the newst Version of the Library. Many of the Example runs without a problem. Same of the Example has compiling errors so that i can't compile it and upload it.

So i would say that the Display works now without any Probleme. Even with the other Library from the LCDWiki the Display works.

Best wishes
Jan

Example List:

Example 1  -> aspect_kbv	 : 	Successful
Example 2  -> button_simple	 : 	Successful. First Run without Calibrating Touchscreen. With Calibrating works just fine
Example 3  -> diagnose_TFT_Support: 	Successful. ID=0x9486 320x480
Example 4  -> diagnose_Touchpins : 	Successful. Pins: XM = A2, XP = D8 | YP = A3, YM = D9
Example 5  -> drawBitmap_kbv	 : 	Failed(Compiling Error): 'class MCUFRIEND_kbv' has no member named 'drawRGBBitmap'; did you mean 'drawBitmap'?
Example 6  -> Font_simple	 : 	Successful. 
Example 7  -> GLUE_Demo_220x176	 : 	Failed(Compiling Error): error: 'charBounds' was not declared in this scoped. plus many other Compiling Errors
Example 8  -> GLUE_Demo_320x240  :	Failed(Compiling Error) 
Example 9  -> GLUE_Demo_400x240  :	Failed(Compiling Error) 
Example 10 -> GLUE_Demo_480_320  :	Failed(Compiling Error) 
Example 11 -> GLUE_Demo_800_480  :	Failed(Compiling Error)
Example 12 -> graphictest_kbv	 :	Successful. Took 14.56sec on 16 MHz Processor
Example 13 -> graphictest_slim	 : 	Maybe Failed? Don't know what this sketch exactly does. LCD flickers after startup 4 to 5 times. ID is 0x9486
Example 14 -> LCD_ID_readnew	 :	Successful? Lots of Data in Serial Monitor. ID is 0x9486.
Example 15 -> LCD_ID_readreg	 : 	Successful? Lots of Data in Serial Monitor again. ID is 0x9486. reg(0xD3) -> 94 86 
Example 16 -> readpixel_kbv	 :	Successful. Lots of FF and 00 on the LCD are displayed with differend Backcolors
Example 17 -> scroll_kbv	 :	Successful. Text Scroll on the LCD Display. I stopped sketch at 400 scrolls
Example 18 -> showBMP_kbv_UNO	 :	Not Tested. No MicroSD Card. 
Example 19 -> showBMP_not_UNO	 :	Not Tested. I have only the Arduino UNO Board. 
Example 20 -> testcard_kbv	 :	Successful. Shows a beautiful PAL/NTSC Pattern. With current Time 
Example 21 -> Touch_shield_new	 :	Successful. 
Example 22 -> TouchScreen_Calibri:	Successful. const int XP=8,XM=A2,YP=A3,YM=9; //320x480 ID=0x9486
						    const int TS_LEFT=124,TS_RT=901,TS_TOP=940,TS_BOT=93;

Serial Output of readNew:

ID = 0x9486
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) 00 54 80 66	Manufacturer ID
reg(0x0009) 00 00 61 00 00	Status Register
reg(0x000A) 00 08	Get Power Mode
reg(0x000C) 00 66	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) 00 00	RDID1 HX8347-A
reg(0x0065) 00 00	RDID2 HX8347-A
reg(0x0066) 00 00	RDID3 HX8347-A
reg(0x0067) 00 00	RDID Himax HX8347-A
reg(0x0070) 00 00	Panel Himax HX8347-A
reg(0x00A1) 00 93 30 93 30	RD_DDB SSD1963
reg(0x00B0) 00 00	RGB Interface Signal Control
reg(0x00B3) 00 00 11 11 11	Frame Memory
reg(0x00B4) 00 00	Frame Mode
reg(0x00B6) 00 02 02 3B 3B	Display Control
reg(0x00B7) 00 06	Entry Mode Set
reg(0x00BF) 00 00 00 00 00 00	ILI9481, HX8357-B
reg(0x00C0) 00 0E 0E 0E 0E 0E 0E 0E 0E	Panel Control
reg(0x00C1) 00 44 00 00	Display Timing
reg(0x00C5) 00 00	Frame Rate
reg(0x00C8) 00 00 00 00 00 00 00 00 00 00 00 00 00	GAMMA
reg(0x00CC) 00 04	Panel Control
reg(0x00D0) 00 00 00 00	Power Control
reg(0x00D1) 00 00 00 00	VCOM Control
reg(0x00D2) 00 00 00	Power Normal
reg(0x00D3) 00 00 94 86	ILI9341, ILI9488
reg(0x00D4) 00 00 00 00	Novatek
reg(0x00DA) 00 54	RDID1
reg(0x00DB) 00 80	RDID2
reg(0x00DC) 00 66	RDID3
reg(0x00E0) 00 00 00 01 0F 0E 08 49 98 38 09 11 03 14 10 00	GAMMA-P
reg(0x00E1) 00 0F 2F 2B 0C 0E 06 47 76 37 07 11 04 23 1E 00	GAMMA-N
reg(0x00EF) 00 80 00 10 60 40	ILI9327
reg(0x00F2) 00 18 A3 12 02 B2 12 FF 10 00 00 00	Adjust Control 2
reg(0x00F6) 00 54 80 66	Interface Control

Serial Outpit of readReg:

Read 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)
reg(0x0000) 00 00	ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 00 54 80 66	Manufacturer ID
reg(0x0009) 00 00 61 00 00	Status Register
reg(0x000A) 00 08	Get Power Mode
reg(0x000C) 00 66	Get Pixel Format
reg(0x0061) 00 00	RDID1 HX8347-G
reg(0x0062) 00 00	RDID2 HX8347-G
reg(0x0063) 00 00	RDID3 HX8347-G
reg(0x0064) 00 00	RDID1 HX8347-A
reg(0x0065) 00 00	RDID2 HX8347-A
reg(0x0066) 00 00	RDID3 HX8347-A
reg(0x0067) 00 00	RDID Himax HX8347-A
reg(0x0070) 00 00	Panel Himax HX8347-A
reg(0x00A1) 00 93 30 93 30	RD_DDB SSD1963
reg(0x00B0) 00 00	RGB Interface Signal Control
reg(0x00B4) 00 00	Inversion Control
reg(0x00B6) 00 02 02 3B 3B	Display Control
reg(0x00B7) 00 06	Entry Mode Set
reg(0x00BF) 00 00 00 00 00 00	ILI9481, HX8357-B
reg(0x00C0) 00 0E 0E 0E 0E 0E 0E 0E 0E	Panel Control
reg(0x00C8) 00 00 00 00 00 00 00 00 00 00 00 00 00	GAMMA
reg(0x00CC) 00 04	Panel Control
reg(0x00D0) 00 00 00	Power Control
reg(0x00D2) 00 00 00 00 00	NVM Read
reg(0x00D3) 00 00 94 86	ILI9341, ILI9488
reg(0x00D4) 00 00 00 00	Novatek ID
reg(0x00DA) 00 54	RDID1
reg(0x00DB) 00 80	RDID2
reg(0x00DC) 00 66	RDID3
reg(0x00E0) 00 00 00 01 0F 0E 08 49 98 38 09 11 03 14 10 00	GAMMA-P
reg(0x00E1) 00 0F 2F 2B 0C 0E 06 47 76 37 07 11 04 23 1E 00	GAMMA-N
reg(0x00EF) 00 80 00 10 60 40	ILI9327
reg(0x00F2) 00 18 A3 12 02 B2 12 FF 10 00 00 00	Adjust Control 2
reg(0x00F6) 00 54 80 66	Interface Control

Thanks for your feedback. Few people are as conscientious as you !!

reg(0x00D3) 00 00 94 86	ILI9341, ILI9488

Yes, you have an ILI9486.

Example 5  -> drawBitmap_kbv	: 	Failed(Compiling Error): 'class MCUFRIEND_kbv' has no member named 'drawRGBBitmap'; did you mean 'drawBitmap'?
Example 10 -> GLUE_Demo_480_320  : 	Failed(Compiling Error): error: 'charBounds' was not declared in this scoped. plus many other Compiling Errors

The Library Manager will have installed MCUFRIEND_kbv v2.9.9-Release and Adafruit_GFX v1.10.3
I am using IDE v1.8.12 but v1.8.13 is current IDE

I would not expect any Compile Errors. I will try them myself shortly.

I do not expect anyone to hand-wire a Uno Shield to a Uno board. God invented Shields so that you just plug them together.

David.

I ran drawBitmap_kbv from v2.9.9-Release examples on a Uno clone

Using library Mcufriend_kbv at version 2.9.9-Release in folder: C:\Users\David Prentice\Documents\Arduino\libraries\Mcufriend_kbv 
Using library Adafruit_GFX_Library at version 1.10.3 in folder: C:\Users\David Prentice\Documents\Arduino\libraries\Adafruit_GFX_Library 
Using library Adafruit_BusIO at version 1.6.0 in folder: C:\Users\David Prentice\Documents\Arduino\libraries\Adafruit_BusIO 
Using library Wire at version 1.0 in folder: C:\Program Files (x86)\Arduino-1.8.12\hardware\arduino\avr\libraries\Wire 
Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino-1.8.12\hardware\arduino\avr\libraries\SPI 
"C:\\Users\\David Prentice\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino5/bin/avr-size" -A "C:\\Users\\DAVIDP~1\\AppData\\Local\\Temp\\arduino_build_253881/drawBitmap_kbv.ino.elf"
Sketch uses 29372 bytes (91%) of program storage space. Maximum is 32256 bytes.
Global variables use 430 bytes (20%) of dynamic memory, leaving 1618 bytes for local variables. Maximum is 2048 bytes.

I ran GLUE_Demo_480_320 from v2.9.9-Release examples on a Uno clone

Using library Mcufriend_kbv at version 2.9.9-Release in folder: C:\Users\David Prentice\Documents\Arduino\libraries\Mcufriend_kbv 
Using library Adafruit_GFX_Library at version 1.10.3 in folder: C:\Users\David Prentice\Documents\Arduino\libraries\Adafruit_GFX_Library 
Using library Adafruit_BusIO at version 1.6.0 in folder: C:\Users\David Prentice\Documents\Arduino\libraries\Adafruit_BusIO 
Using library Wire at version 1.0 in folder: C:\Program Files (x86)\Arduino-1.8.12\hardware\arduino\avr\libraries\Wire 
Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino-1.8.12\hardware\arduino\avr\libraries\SPI 
"C:\\Users\\David Prentice\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino5/bin/avr-size" -A "C:\\Users\\DAVIDP~1\\AppData\\Local\\Temp\\arduino_build_746843/GLUE_Demo_480x320.ino.elf"
Sketch uses 26818 bytes (83%) of program storage space. Maximum is 32256 bytes.
Global variables use 384 bytes (18%) of dynamic memory, leaving 1664 bytes for local variables. Maximum is 2048 bytes.

Please let me know which library versions ... are giving you errors. Enable verbose for messages e.g.
File->Preferences: Compile=Verbose

David.

david_prentice:
Thanks for your feedback. Few people are as conscientious as you !!

Hello. Thank you!

Sometimes it's better to understand why it does not work instead of how can i get this quickly working. But this was not all the time so. In the first Year where i started with MCU Coding I was more like type 2 :).
Usually I use the Atmel Studio 7 IDE instand of the Arduino IDE. Because where I have started with MCU Coding, I have already programming experience in Java and Regular C. So programming over C is for me more "Fun". But I like the Arduino IDE for Beginners and the many Librarys for mostlike every device in the Microcontroller World. Especially if I have a new Device I can play around with function Library to experience with and in the end I search for .h and .c premade Library in C or i write my own library in c.

Im currently working on a GPU Monitoring Tool which allows me to display some GPU (Graphic Card) information to an external Display. At first I used a 2.2 TFT Display with the ILI9341 but it is too small to read parameter from the Display when you are far away. Now im using an 2.8 Inch TFT Display (still ILI9341) it's better.
3.5 Inch gives me the best to read from the Distance with I dealing with. At first i though the 3.5 Inch display has also the ILI9341 but that was wrong. ILI9486 looks from the commands/addresscodes every familiar to the 9341 so I think I have only to change the addressing of the Chip from SPI to 8 Bit Bus Parallel in my existing code.

I attached an picture from my 2.8 TFT Display. So that you can see what i mean. The text on the display is in german because im from Germany but with a bit of knowledge in GPU its should be easy to understand.

Quote from: david_prentice Sat Dec 19 2020 17:18:11 GMT+0100 (Mitteleuropäische Normalzeit)
Please let me know which library versions ... are giving you errors. Enable verbose for messages e.g.
Im using the Arduino Version 1.8.12 and the Library Version for mcufriend is the newst 2.9.9

Compiling Error while compiling GLUE Demo 480x320

E:\Persnliche Ordner\Dokumente\Arduino\libraries\MCUFRIEND_kbv/UTFTGLUE.h: In member function 'void UTFTGLUE::printNumF(double, byte, int, int, char, int, char)':
E:\Persnliche Ordner\Dokumente\Arduino\libraries\MCUFRIEND_kbv/UTFTGLUE.h:112:69: error: 'textsize_x' is not a member of 'MCUFRIEND_kbv'
         settextcursor(buf, x, y, length * _dig_wid * MCUFRIEND_kbv::textsize_x);
                                                                     ^~~~~~~~~~
E:\Persnliche Ordner\Dokumente\Arduino\libraries\MCUFRIEND_kbv/UTFTGLUE.h: In member function 'void UTFTGLUE::setFont(const GFXfont*)':
E:\Persnliche Ordner\Dokumente\Arduino\libraries\MCUFRIEND_kbv/UTFTGLUE.h:124:13: error: 'charBounds' was not declared in this scope
             charBounds('0', &x, &y, &x1, &y1, &x2, &y2);
             ^~~~~~~~~~
E:\Persnliche Ordner\Dokumente\Arduino\libraries\MCUFRIEND_kbv/UTFTGLUE.h:124:13: note: suggested alternative: 'round'
             charBounds('0', &x, &y, &x1, &y1, &x2, &y2);
             ^~~~~~~~~~
             round
Bibliothek MCUFRIEND_kbv in Version 2.9.9-Release im Ordner: E:\Persönliche Ordner\Dokumente\Arduino\libraries\MCUFRIEND_kbv  wird verwendet
Bibliothek Adafruit-GFX-Library-master in Version 1.1.5 im Ordner: E:\Persönliche Ordner\Dokumente\Arduino\libraries\Adafruit-GFX-Library-master  wird verwendet
exit status 1
Fehler beim Kompilieren für das Board Arduino Uno.

Compiling Errror while Compiling drawBitmap

"C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\Jan\\AppData\\Local\\Temp\\arduino_build_991443\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Sketch wird kompiliert...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10812 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IE:\\Persönliche Ordner\\Dokumente\\Arduino\\libraries\\MCUFRIEND_kbv" "-IE:\\Persönliche Ordner\\Dokumente\\Arduino\\libraries\\Adafruit-GFX-Library-master" "C:\\Users\\Jan\\AppData\\Local\\Temp\\arduino_build_991443\\sketch\\GLUE_Demo_480x320.ino.cpp" -o "C:\\Users\\Jan\\AppData\\Local\\Temp\\arduino_build_991443\\sketch\\GLUE_Demo_480x320.ino.cpp.o"
In file included from E:\Persönliche Ordner\Dokumente\Arduino\libraries\MCUFRIEND_kbv\examples\GLUE_Demo_480x320\GLUE_Demo_480x320.ino:20:0:
E:\Persnliche Ordner\Dokumente\Arduino\libraries\MCUFRIEND_kbv/UTFTGLUE.h: In member function 'void UTFTGLUE::printNumF(double, byte, int, int, char, int, char)':
E:\Persnliche Ordner\Dokumente\Arduino\libraries\MCUFRIEND_kbv/UTFTGLUE.h:112:69: error: 'textsize_x' is not a member of 'MCUFRIEND_kbv'
         settextcursor(buf, x, y, length * _dig_wid * MCUFRIEND_kbv::textsize_x);
                                                                     ^~~~~~~~~~
E:\Persnliche Ordner\Dokumente\Arduino\libraries\MCUFRIEND_kbv/UTFTGLUE.h: In member function 'void UTFTGLUE::setFont(const GFXfont*)':
E:\Persnliche Ordner\Dokumente\Arduino\libraries\MCUFRIEND_kbv/UTFTGLUE.h:124:13: error: 'charBounds' was not declared in this scope
             charBounds('0', &x, &y, &x1, &y1, &x2, &y2);
             ^~~~~~~~~~
E:\Persnliche Ordner\Dokumente\Arduino\libraries\MCUFRIEND_kbv/UTFTGLUE.h:124:13: note: suggested alternative: 'round'
             charBounds('0', &x, &y, &x1, &y1, &x2, &y2);
             ^~~~~~~~~~
             round
Bibliothek MCUFRIEND_kbv in Version 2.9.9-Release im Ordner: E:\Persönliche Ordner\Dokumente\Arduino\libraries\MCUFRIEND_kbv  wird verwendet
Bibliothek Adafruit-GFX-Library-master in Version 1.1.5 im Ordner: E:\Persönliche Ordner\Dokumente\Arduino\libraries\Adafruit-GFX-Library-master  wird verwendet
exit status 1
Fehler beim Kompilieren für das Board Arduino Uno.

Best wishes
Jan W.

Compiling Error while compiling GLUE Demo 480x320

Bibliothek Adafruit-GFX-Library-master in Version 1.1.5 im Ordner: E:\Persönliche Ordner\Dokumente\Arduino\libraries\Adafruit-GFX-Library-master  wird verwendet

Compiling Errror while Compiling drawBitmap

Bibliothek Adafruit-GFX-Library-master in Version 1.1.5 im Ordner: E:\Persönliche Ordner\Dokumente\Arduino\libraries\Adafruit-GFX-Library-master  wird verwendet

You have two problems with Adafruit-GFX

  1. you have not installed via the Library Manager
  2. the version is very old

Actually, an old Adafruit_GFX is ok for most things in MCUFRIEND_kbv
However Adafruit introduced an X, Y version of setTextSize() which meant that they introduced a textsize_x variable.

The drawBitMap_kbv example should never include UTFTGLUE class. You must have edited the code.

Please leave the IDE. Delete the Adafruit-GFX-Library-master directory.
Start the IDE. Install properly via the Library Manager.

Yes, lots of hardware display libraries inherit from Adafruit_GFX.
This means that you can port most TFT sketches by simply changing:

#include <hardware_display.h>   //the controller your display uses
hardware_display tft(arg1, arg2, ...);  //the constructor for your display
...
      tft.begin(arg);     //display initialisation method
      ...

For example, I can run same code with Adafruit_ILI9341, MCUFRIEND_kbv, TFT_HX8357, TFT_eSPI, ...

Porting is almost impossible for non-GFX libraries like UTFT or badly-spelled LCDWIKI

David.

david_prentice:
Please leave the IDE. Delete the Adafruit-GFX-Library-master directory.
Start the IDE. Install properly via the Library Manager.

david_prentice:
You have two problems with Adafruit-GFX

  1. you have not installed via the Library Manager
  2. the version is very old

Actually, an old Adafruit_GFX is ok for most things in MCUFRIEND_kbv
However Adafruit introduced an X, Y version of setTextSize() which meant that they introduced a textsize_x variable.

Hello David,
Oh ok. I delete the old Adafruit Library from the libs folder. The installed Adafruit GFX Version was 1.1.5 i updated it the newst version.

And now I can compile both sketchs without any errors.

david_prentice:
The drawBitMap_kbv example should never include UTFTGLUE class. You must have edited the code.

No. I never edited the code manually. Or i can't remember it, the gfx folder was created early 2016.
Jan

Hi anyone did manage the tft to run on ESP8266?

riker1:
Hi anyone did manage the tft to run on ESP8266?

Please post a link to the actual display that you have bought. e.g. Ebay sale page.

Equally, you could post a photo of the pcb or quote the message number that contains a photo of your item e.g. #5

David.