3.5" TFT LCD from mcufriend for Arduino Uno 320x480 (ILI9327 ?)

Hello all. This is my first post, so please excuse me if I do something wrong. I didn't want to hijack or revive zombie threads.

I ordered a 3.6" TFT LCD for Arduino Uno from ebay, but instead received 3.5" TFT lcd (bottom side is in attached picture, with "www.mcufriend.com 3.5'' TFT LCD for arduino uno" printed on the board, on top side the LCD is marked "ECW 03507".

It's a shield for Arduino Uno with micro sd card slot and with 28 pins. The communication with display controller is 8bit parallel.

I searched a lot until I came up with the right keywords and stumbled upon several threads here.
https://forum.arduino.cc/index.php?topic=289775.0
http://forum.arduino.cc/index.php?topic=288425.0
https://forum.arduino.cc/index.php?topic=245360.0

I then downloaded UTFT from GitHub - dgolda/UTFT: Modified UTFT library working with ILI9327 8-bit for example 3.5" TFT LCD from mcufriend.com with support for ILI9327_8 but it still wouldn't show anything. The key to making it work was

pinMode(A0, INPUT_PULLUP);

in setup().

After this I could run the UTFT_Demo_400x240 but it would not fill the whole screen.
I made a new setting which I named ILI9327_HVGA and adjusted the resolution to 480x320 with all other params identical to ILI9327_8.

Now the UTFT_Demo_480x320 runs on Uno with this constructor:

UTFT myGLCD(ILI9327_HVGA,A2,A1,A3,A4);

However, I think it is not quite right, because the colors are strange.
Could the display use different color bit depth ? Or is it something else ?

Download the library from ili9488 with tuoch screen - #15 by david_prentice - Displays - Arduino Forum

Run any of the examples and observe the Serial Terminal. It should tell you the controller.

I keep on meaning to tidy up that library and upload an upgraded version. But it should tell you the controller type.

Incidentally, it is worth reading "similar" threads unless you have a completely different topic / question.

David.

Thank you David.

The output was:

TFT LCD test
Using Adafruit 2.8" TFT Breakout Board Pinout
TFT size is 240x320
Found ILI9488 LCD driver

It is strange that it detected 240x320 when even in ili9488 with tuoch screen - #15 by david_prentice - Displays - Arduino Forum you wrote that ILI9488 is 320x480

Seems there is not support for ILI9488 in UTFT.
In mcufriend 3.5 LCD TFT ILI9327 with Arduino atmega328P , Need help plz! - Displays - Arduino Forum you mentioned you succeeded adding support for ILI9488_8 to UTFT. Can that version of library be downloaded somewhere ?

No, I really do not want to post a hacked UTFT. There are several edits required when you add an extra target MCU or TFT.

I will update "MCUFRIEND_kbv.h" library at some time in the future.

The example sketches should have all run with the correct resolution. The 240x320 message was from the "original" Adafruit example.

If there is something that is not "working", shout. It will make me leave what I am doing and tidy/update the library.

David.

hi
i have the same problem
i tried with all existing libraries but not work
i think it is other chip not 9488
if you have any solution please tell me
many thanks

HAPPY NEW YEAR!
No solution from anyone?

From your other post(s), it is clear that you have a ILI9488 controller.
This should work with the MCUFRIEND_kbv library by just plugging it into your UNO.

I see little sense in posting in a ILI9327 thread when you know you have a ILI9488.

No, I do not see why your display does not work properly. Especially if you have two displays that behave the same.

Does anyone else have the same model of shield? With the same problems?

David.

Hi i have also the problem that i see display shifted.
can you show the change taht you did with ILI9327_HVGA.
thanks

Hi all

I have one of them and I use modified ILI9327_8 version of UTFT

after adding in setup

pinMode(A0, INPUT_PULLUP);

everything was correct thanks ondrejp_sk :wink:

only thing is that colors are not as punchy as I expected

so i changed gamma setting in inilcd.h

case ILI9327_8:
LCD_Write_COM(0xE9);
LCD_Write_DATA(0x20);
LCD_Write_COM(0x11); //Exit Sleep
delay(100);
LCD_Write_COM(0xD1);
LCD_Write_DATA(0x00);
LCD_Write_DATA(0x71);
LCD_Write_DATA(0x19);
LCD_Write_COM(0xD0);
LCD_Write_DATA(0x07);
LCD_Write_DATA(0x01);
LCD_Write_DATA(0x8);
LCD_Write_COM(0x36);
LCD_Write_DATA(0x48);
LCD_Write_COM(0x3A);
LCD_Write_DATA(0x05);
LCD_Write_COM(0xC1);
LCD_Write_DATA(0x10);
LCD_Write_DATA(0x10);
LCD_Write_DATA(0x02);
LCD_Write_DATA(0x02);
LCD_Write_COM(0x00); //Set Default Gamma instead of 0xC0
LCD_Write_DATA(0x00);
LCD_Write_DATA(0x35);
LCD_Write_DATA(0x00);
LCD_Write_DATA(0x00);
LCD_Write_DATA(0x01);
LCD_Write_DATA(0x02);
LCD_Write_COM(0xC5); //Set frame rate
LCD_Write_DATA(0x04);
LCD_Write_COM(0xD2); //power setting
LCD_Write_DATA(0x01);
LCD_Write_COM(0x44);
LCD_Write_COM(0xC8); //Set Gamma
LCD_Write_DATA(0x04);
LCD_Write_DATA(0x67);
LCD_Write_DATA(0x35);
LCD_Write_DATA(0x04);
LCD_Write_DATA(0x08);
LCD_Write_DATA(0x06);
LCD_Write_DATA(0x24);
LCD_Write_DATA(0x1);
LCD_Write_DATA(0x37);
LCD_Write_DATA(0x40);
LCD_Write_DATA(0x03);
LCD_Write_DATA(0x10);
LCD_Write_DATA(0x8);
LCD_Write_DATA(0x80);
LCD_Write_DATA(0x0);
LCD_Write_COM(0x2A);
LCD_Write_DATA(0x00);
LCD_Write_DATA(0x00);
LCD_Write_DATA(0x00);
LCD_Write_DATA(0xeF);
LCD_Write_COM(0x2B);
LCD_Write_DATA(0x00);
LCD_Write_DATA(0x00);
LCD_Write_DATA(0x01);
LCD_Write_DATA(0x3F);
LCD_Write_COM(0x29); //display on
LCD_Write_COM(0x2C); //display on

initialisation for Uno is:

UTFT myGLCD(ILI9327_8,A2,A1,A3,A4);

change for 480x320 in UTFT.cpp:

UTFT::UTFT(byte model, int RS, int WR, int CS, int RST, int SER)
{
word dsx[] = {239, 239, 239, 239, 239, 239, 175, 175, 239, 127, 127, 239, 271, 479, 239, 239, 239, 239, 239, 239, 479, 319, 239, 175, 127, 239, 239, 319, 319, 799, 127, 319};
word dsy[] = {319, 399, 319, 319, 319, 319, 219, 219, 399, 159, 127, 319, 479, 799, 319, 319, 319, 319, 319, 319, 799, 479, 319, 219, 159, 319, 319, 479, 479, 479, 159, 479};
byte dtm[] = {16, 16, 16, 8, 8, 16, 8, SERIAL_4PIN, 16, SERIAL_5PIN, SERIAL_5PIN, 16, 16, 16, 8, 16, LATCHED_16, 8, 16, 8, 16, 16, 16, 8, SERIAL_5PIN, SERIAL_5PIN, SERIAL_4PIN, 16, 16, 16, SERIAL_5PIN, 8};

Hope this will help

Good afternoon, David!
Again I appeal to you for help.
I bought myself another 3.5 display.
From your library, graphtest_kbv works.
ID = 1581.
Help me determine the type of display.

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 00 00 00 Manufacturer ID
reg(0x0009) 00 00 00 00 00 Status Register
reg(0x000A) 08 08 Get Power Mode
reg(0x000C) 66 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 00 00 00 00 RD_DDB SSD1963
reg(0x00B0) 00 00 RGB Interface Signal Control
reg(0x00B4) 00 00 Inversion Control
reg(0x00B6) 00 00 00 00 00 Display Control
reg(0x00B7) 00 00 Entry Mode Set
reg(0x00BF) 01 01 22 15 81 00 ILI9481, HX8357-B
reg(0x00C0) 00 00 3B 00 02 00 01 00 43 Panel Control
reg(0x00C8) 00 00 00 00 00 00 00 00 00 00 00 00 00 GAMMA
reg(0x00CC) 00 00 Panel Control
reg(0x00D0) 00 00 00 Power Control
reg(0x00D2) 03 03 24 04 00 NVM Read
reg(0x00D3) 03 03 24 04 ILI9341, ILI9488
reg(0x00D4) 03 03 24 04 Novatek ID
reg(0x00DA) 00 00 RDID1
reg(0x00DB) 00 00 RDID2
reg(0x00DC) 00 00 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 00 00 00 00 00 00 00 00 00 00 00 00 00 00 GAMMA-N
reg(0x00EF) 00 00 00 00 00 00 ILI9327
reg(0x00F2) 07 07 00 00 00 00 00 00 00 00 00 00 Adjust Control 2
reg(0x00F6) 00 00 00 00 Interface Control

What is the problem?
The MCUFRIEND_kbv library can be installed with the Library Manager

It will identify your Renesas R61581 controller with a 320x480 display.

Look at reg(0xBF) in your readreg output. 15 81

David.

What should I put in tft.begin (0xXXXX) ;?

Just look at any example. e.g. the setup() function

You always identify the controller with ID = tft.readID();
And initialise the library with tft.begin(ID);

David.

Thank you very much David!
Everything worked out.
You are our savior ..

I have got a 320*480(ILI9486) display and i want to plot the signal at A0 pin of uno. Can anyone help me with that i tried a lot but it's not working.

The only spare Analog pin on the Uno is A5. Use that instead of A0.

David.

hi ,
i have problem with 3.5" touch LCD shield , i'll send results of diagnose_tft_support and LCD_ID_readreg . the screen always is white and not react to any program for example graphictest_kbv . just backlight changing .i tried to force lcd id to many id but :((
.........................................................................
Diagnose whether this controller is supported
There are FAQs in extras/mcufriend_how_to.txt

tft.readID() finds: ID = 0x9496

MCUFRIEND_kbv version: 2.9.8

This ID is not supported
look up ID in extras/mcufriend_how_to.txt
you may need to edit MCUFRIEND_kbv.cpp
to enable support for this ID
e.g. #define SUPPORT_8347D

.........................................................................
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) 44 44 80 66 Manufacturer ID
reg(0x0009) 00 00 61 00 00 Status Register
reg(0x000A) 08 08 Get Power Mode
reg(0x000C) 66 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) 10 10 Panel Himax HX8347-A
reg(0x00A1) 00 00 00 00 00 RD_DDB SSD1963
reg(0x00B0) 10 10 RGB Interface Signal Control
reg(0x00B4) 10 10 Inversion Control
reg(0x00B6) 12 12 12 3B 10 Display Control
reg(0x00B7) 16 16 Entry Mode Set
reg(0x00BF) FF FF 78 14 10 FF ILI9481, HX8357-B
reg(0x00C0) 0E 0E 0E 00 00 00 00 00 00 Panel Control
reg(0x00C8) 00 00 00 00 00 00 00 00 00 00 00 00 00 GAMMA
reg(0x00CC) 00 00 Panel Control
reg(0x00D0) 10 10 10 Power Control
reg(0x00D2) 10 10 10 10 10 NVM Read
reg(0x00D3) 10 10 94 96 ILI9341, ILI9488
reg(0x00D4) 10 10 10 10 Novatek ID
reg(0x00DA) 54 54 RDID1
reg(0x00DB) 90 90 RDID2
reg(0x00DC) 76 76 RDID3
reg(0x00E0) 00 00 44 07 44 05 08 00 44 07 44 05 08 44 44 00 GAMMA-P
reg(0x00E1) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 GAMMA-N
reg(0x00EF) 00 00 00 00 00 00 ILI9327
reg(0x00F2) 10 10 10 10 10 10 10 10 10 10 10 10 Adjust Control 2
reg(0x00F6) 10 10 10 10 Interface Control

Please do not PM me.

There is something wrong. You appear to have bit4 either sticking on or off e.g.

reg(0x0004) 44 44 80 66 Manufacturer ID
reg(0x00BF) FF FF 78 14 10 FF ILI9481, HX8357-B
reg(0x00D3) 10 10 94 96 ILI9341, ILI9488
reg(0x00DA) 54 54 RDID1
reg(0x00DB) 90 90 RDID2
reg(0x00DC) 76 76 RDID3

I would expect:

reg(0x0004) xx 54 80 66 Manufacturer ID
reg(0x00BF) xx FF 68 14 00 FF ILI9481, HX8357-B
reg(0x00D3) xx 00 94 86 ILI9341, ILI9488
reg(0x00DA) xx 54 RDID1
reg(0x00DB) xx 80 RDID2
reg(0x00DC) xx 66 RDID3

You seem to have a Raydium RM68140 controller.
Have you tried plugging it into a proper 3.3V Arduino e.g. Zero or Due ?
Or even a 5V Arduino like Uno or MEGA2560 ?

You seem to have a crap pcb i.e. no AMS1117-3.3 regulator. 74HC245 buffers.
Does the screen get warm?
Have you blown the wimpy 3,3V chip on Uno or Mega ?

David.

i have an arduino UNO .
temperature of lcd is usual , not warm .
i don't have any micro else . i feel confused!

i'll send a photo of lcd