That is exactly how it should look. You can see the 4, 0, 1, 2, 3, 4, 5 vertically and half of an 8 on the right.
In Landscape mode, you can see the vertical line of ":" and all of the 8 . Probably half of the 6.
I will wait to hear from Mahmoud with his ILI9327 before posting a revised ZIP. I have to do some head scratching to solve the Rotation "feature".
You might have noticed the fillTriangle() displaying oddly in graphicstest.
This is due to Adafruit_GFX library. It needs a "wider" variable for the larger screen:
I'm quite new to the Arduino and absolutely new here I bought a few things to mess around with, one of them is a 3.5" touch TFT with ILI9488, but I can't get it working. Ebay link
I'm using a Mega2560 with UNO-like connection (so I use A0-A4 intstead of the digital pins).
What I could figure out from the description and the internet, that the test code should work with UTFT, if I replace the original initlcd.h with their code. I did it, but it acts, well, strange.
If I use David's mcufriend_kbv stuff, it kind of works. For example the graphictest animation is smooth, but the colors are wrong (whatever library I use, the colors are always bad). It's like everything is made of alternating color stripes.
If I use the adafruit library, it either doesn't work at all, or works, but flickers, have wrong colors and sometimes the screen size is set wrong. If I create a sketch with only the LCD initialization and a white background, it also flickers like crazy.
The flickering is gone if I use UTFT or UTFTGLUE. I attach some photos of the tftpaint2, graphictest_kbv and readpixel_kbv sketches.
Your readpixel is reading 16-bit pixels instead of the 24-bit RGB that my 9488 and 9341 require. See the previous posts about a ILI9486 Shield that requires invertDisplay() to render the correct colours and also reads 16-bit colour.
I just looked at the photos in the Ebay link. It looks more like 240x400 display than a 320x480. Does your shield match the photos in every way?
I would believe the result from read_ID more than anything written on Ebay.
Your JPEGs definitely show a 320x480.
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 ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 00 54 80 66 Manufacturer ID
reg(0x00BF) 00 00 00 00 00 00 ILI9481
reg(0x00D0) 00 00 HX8357
reg(0x00D3) 00 00 94 88 ILI9341, ILI9488
reg(0x00EF) 00 00 00 00 00 00 ILI9327
Is this what you asked for?
It doesn't match in everything with the advertisment. Mine has the touchscreen wires on the left hand side and ECW03507 writing on the right. The pinout on the back is the same, but the texts are upside down and the layout is a bit different. It's also 3.5" instead of 3.6".
I started to look up the meaning of the code what the seller provided, and something's messed up here.
I only finished part of the code, but for example LCD_Write_COM(0xC5) is commented as setting frame rate, but it's only the frame rate setting on the ILI9327, not the ILI9488. C8 is gamma setting on the 9327 and CABC control on the 9488. I guess they provided the wrong code, or just rewrited the 9327 code and left the comments untouched. This means that the initlcd could be complete nonsense.
I would hope that I have provided a respectable initialisation. You can always use the Manufacturer's power-up defaults.
I can see the reason for different panels needing different Gamma settings or Power register values. I am surprised by the same chip needing inversion on one panel but not on another panel.
Yes, sequences found on UTFT or Aliexpress might be complete rubbish. Look up some of the command registers. They often do not exist. Or the data values do not correspond with the data sheet. Not that the data sheet is always perfect, but I trust it better than an Aliexpress site whose main business is Ladies underwear!
i have a 3,95" inch TFT MCUfriend shield...
when i run the LCD_ID test, i says i have the ILI9488 chip on the shield...
it works with the previous version of MCUfriend_kbv library (not downloaded the last version at this moment)
i have it plugged into a MEGA2560, and it works - but its slow (very slow i should say)
the SD card doesn't work
I can do some testing for you guys, if needed
my biggest problem is with the embedded font... it's ugly, square-isch and slow
i've read about a good library with some nice rounded fonts - but it works only on hardware SPI
Nico Verduin mentioned that these shields are not hackable to set them to hardware SPI (and I believe him, because myself i would'nt know how to fix that )
what can i do for you guys to test some things out?
i have some spare time to test some things...
I have no hardware or programming skills like most of you guys, but i'm willing to do some work on that
david_prentice:
I would hope that I have provided a respectable initialisation. You can always use the Manufacturer's power-up defaults.
I can see the reason for different panels needing different Gamma settings or Power register values. I am surprised by the same chip needing inversion on one panel but not on another panel.
Yes, sequences found on UTFT or Aliexpress might be complete rubbish. Look up some of the command registers. They often do not exist. Or the data values do not correspond with the data sheet. Not that the data sheet is always perfect, but I trust it better than an Aliexpress site whose main business is Ladies underwear!
David.
Now it works! I tried changing the inversion, but the stripes were still there, so I experimented with the color depth settings. Setting it to 18 bit/pixel solved everything. Thank you for the tip and help, it would have taken much longer to figure it out myself
yesterday evening i have been trying with the UTFTGLUE library, and used different testing examples from it (up to 480*320)
The only thing that i had to change in each example was the setting of the chip (0x9488 in my case)
all results were reasonbly faster than the normal MCUFriend library
as mentioned before my shield is a 3.95"
maybe, if someone points out to me how to decrease colordepth i can do further testing
i also tried the regular UTFT library (out of the box) but had no results what so ever (screen stayed white)
The current release of UTFT does not support this chip or this interface. Several people have added support their personal versions. Who knows? It might be included in the next official UTFT release.
UTFTGLUE does not use UTFT at all. It just contains the same methods which in turn use the MCUFRIEND_kbv library.
If you want to run faster, buy a proper MEGA2560 shield or adapter.
Your shield is designed for a UNO.
Yes, as far as I can remember, the 9488 can use 8-colour mode. Why do you want to cripple your display?
That is really weird. I am not at my PC. I will have to check the data sheet for that register.
David.
Edit. Just looked. reg(0x3A) = 0x36 means DPI=3 and DBI=6. i.e. DPI is reserved and DBI is 18-bits
I had 0x55 i.e. DPI is 16bit and DBI is 16-bit.
On an ILI9486, everything is reserved apart from 16-bit or 18-bit e.g. 0x55 or 0x66.
I have tested the new version 2.2 of the Mcufriend_kbv library and it works as expected.
However, as I was missing the keyword colouring writing a joystick library, I created a keywords.txt file which I attach for other to benefit from.
Sorry, I have never worried about keyword highlighting. I will add it to the ZIP.
If I remember correctly, you have a 3.5 inch 320x480 shield with an ILI9486.
The Demo sketch tests most features of the library. Since I only have a write-only 9486, it is good to know that you have not found a problem YET.
In a related thread, Mahmoud has an ILI9327 with a 240x400 display. Because the controller can do 240x432 the LANDSCAPE mode is not displaying correctly. Have you any ideas?
All my other controllers can work with "smaller" screens ok.
@David : The new version of the library works fine, thanks for the work you have put in to that
the only problems that still stay are the SD card and the fonts
is the font [SmallFont] hardware coded for the examples, i can't find a way to change to 7seg or bigfont... I really must be doing something wrong I think. Thats in the "GLUE" examples...
on your previous reply you asked "why cripple your screen by going to 8 bits"
I was thinking it would run faster then
I still have some problems with the SD card reader also... but i'll get to that later
The library as published only uses the same 7x5 font. It looks fine in 2x size. Pretty horrible and blocky in bigger multiplications.
Since multiple fonts start to use up large amounts of Flash memory, it becomes a bit impractical for a Uno and crazy for a mega168 Arduino.
As people have discovered, running a Uno shield on a Mega2560 works but is about half the speed of a Uno.
Adafruit tftbmp examples work with <SD.h> library. They do not work with <SdFat.h> library. I am not sure why.
SD only works with hardware SPI. SdFat can work with software SPI. If and when I get tftbmp and the microSD working with SdFat, you should be good to go on the Mega2560. Just a little unwise (tm) to use a Uno shield when you could buy a Mega shield.
david_prentice:
The library as published only uses the same 7x5 font. It looks fine in 2x size. Pretty horrible and blocky in bigger multiplications.
So the font in the "GLUE.xxx" examples is not realy used then?
I know about the shield on a MEGA2560, but since it's the only screen i have at this moment, i'll have to do with this one (I never bought UNO's before, I always did go for the MEGA2560)