Go Down

Topic: Tried 3 libs&all settings on 3.5 inch mega/due ili9488 touchscreen fro mcufriend (Read 781 times) previous topic - next topic

josh_s

I bought this touch screen: http://www.ebay.com/itm/3-5-inch-TFT-LCD-touch-screen-Module-for-Arduino-Due-/151848694005?hash=item235ae330f5:g:dp8AAOSw14xWHlMr&autorefresh=true

It says ILI9486 driver on the advert, but the board itself says:
3.5" TFTLCD for Arduino mega 2560(ili9488)

I've tried https://github.com/samuraijap/TFTLCD-Library
this https://github.com/Bodmer/TFT_HX8357
I tried a UTFT version that says it supports 9488 (not sure where I got it from).

I've tried every setting that supports 16 bit boards like this one (it's got the mega 34 pin connector).

The first library queries the chip id.  It should have returned 0x9488 instead it returned 0x1010

I tried faking that it returned every possible sane value, nothing.  I tried putting in a delay after the reset, nothing.

Does anyone have any ideas?

david_prentice

You have posted a link that has photos of a 240x400 3.6" Uno Shield.

Ebay vendors are not always truthful.  But it is up to you to count how many pins are on your Shield and compare it with the photos and text.

What is a mega 34 pin connector ?

If it is a Uno shield (no 18x2 header pins),  run the LCD_ID_readreg.ino sketch and copy-paste the output from the Serial Terminal.

David.

josh_s

I guess it's 36 pins.

It has the pins that don't exist on an uno, and as I said it says "for Arduino mega 2560" directly on the board itself.

josh_s

I would check the manufacturers website for software, but their website is misconfigured to forward to itself in an infinite loop, so it's unreachable.

david_prentice

Ok,  so your link is mendacious.

Just find an Ebay or Aliexpress link that does provide accurate photos of the pcb traces.   Or take a photo of your actual display pcb.

If you possess a DMM,   you could identify which pins are connected with pcb traces.   But quite honestly the photo would be best.

David.


josh_s

This forum software has problems.   I tried to upload pics - it complained "too large".  I made them smaller in Gimp, it complained "fails security check".  I tried to upload to imgur and post a link, it says "too many posts in five minutes".


http://imgur.com/a/OFTR1

david_prentice

You have a regular 16-bit interface.    Note that you have a a line of 7 resistor-packs RP1..RP7.

I would expect Bodmer's TFT_HX8357 library to show something.   Note that this requires a MEGA2560.
Use TFT_HX8357_due library with a DUE.

I would expect UTFT to show something with model ILI9481 or ILI9486.

Please post what happens with these libraries.   i.e.
1.   Paste the constructor line from your sketch.
2.   Describe result.

If you own a DMM,   please test which RP# pins connect to which pin on the 18x2 header.

David.

josh_s

I tried those libraries before (well used the mega version of the TFT_HX8375).

For this test I replaced that library with the due version and used the due.

The TFT_HX8375_Due test runs the 340x480 demo and the TFT_HX8375_Due's UTFT_demo_320x400 without displaying anything on the screen.

It's that way with HX8357B defined or HX8357C defined or ILI9481 defined or  ILI9481_8BIT defined, and that's all the possibilities.

I changed the  TFT_HX8375_Due tests by changing the defines in user_setup.h
 
So, for instance to test ILI9481 I had
//#define HX8357B
//#define HX8357C
#define ILI9481
//#define ILI9481_8BIT


I tried the UTFT library last night.
I tried the constructor with every (unique) id that was labeled 16 bit.  That would be:
(note there are other defines with the same values, I didn't bother to paste those)
#define ITDB32         0   // HX8347-A (16bit)
#define ITDB32WC      1   // ILI9327  (16bit)
#define ITDB32S         2   // SSD1289  (16bit)
#define TFT01_24_16      5   // ILI9325D (16bit)
#define ITDB32WD      8   // HX8352-A (16bit)
#define ITDB25H         11   // S1D19122   (16bit)
#define ITDB43         12   // SSD1963   (16bit) 480x272
#define ITDB24E_16      15   // S6D1121   (16bit)
#define INFINIT32      16   // SSD1289   (Latched 16bit) -- Legacy, will be removed later
#define TFT01_70      20   // SSD1963   (16bit) 800x480 Alternative Init
#define CTE32HR         21   // ILI9481   (16bit)
#define CTE28         22   // ILI9325D (16bit) Alternative Init
#define CTE35IPS      27   // R61581   (16bit)
#define CTE40         28   // ILI9486   (16bit)
#define EHOUSE50CPLD   29   // CPLD      (16bit)
#define CTE50CPLD      29   // CPLD      (16bit)

So the constructors were:
UTFT myGLCD(ITDB32,38,39,40,41);
UTFT myGLCD(ITDB32WC,38,39,40,41);
UTFT myGLCD(ITDB32S,38,39,40,41);
UTFT myGLCD(TFT01_24_16,38,39,40,41);
UTFT myGLCD(ITDB32WD,38,39,40,41);
UTFT myGLCD(ITDB25H,38,39,40,41);
UTFT myGLCD(ITDB43,38,39,40,41);
UTFT myGLCD(ITDB24E_16,38,39,40,41);
UTFT myGLCD(INFINIT32,38,39,40,41);
UTFT myGLCD(TFT01_70,38,39,40,41);
UTFT myGLCD(CTE32HR,38,39,40,41);
UTFT myGLCD(CTE28,38,39,40,41);
UTFT myGLCD(CTE35IPS,38,39,40,41);
UTFT myGLCD(CTE40,38,39,40,41);
and
UTFT myGLCD(CTE50CPLD,38,39,40,41);

The results were that nothing happened at all. Nothing on the screen, nothing in the serial terminal.
Only one thing happened.  When I first got the board, it showed a few random lines of colored pixels when powered, at some point that changed and now it's just plain white.

I have a DMM.  What are RP# pins?
Oh I see the resistor packs.  Those are small!  I'll look at that tomorrow.

david_prentice

Please read your last post.   Then imagine you are a foreign reader.   

Please edit to correct your typos.  And make the text less confusing.
e.g. what does The TFT_HX8375_Due test happily runs the 340x480 demo mean?

I possess a similar shield with the same component placement and printed legends.
The traces are not identical to your photo.   Especially on the north side of the RP6 - RP4.

However the pcb traces from the RP6, RP2, RP1, RP5 seem to have the same connectivity (Data Bus).
Likewise RP7, RP3 seem the same (Control pins).

Which is why I suggest that you check with a DMM.

My shield contains a RM68140 controller and "works" with UTFT v2.8.2
Code: [Select]
UTFT myGLCD(ILI9486,38,39,40,41);


So my Shield uses the standard 16-bit Data bus D22-D37.   And the standard Control pins D38-D41.

UTFT has got some pretty un-intuitive methods.   But at least it has names for the "model" e.g. ILI9486, R61581, ILI9481, ...
Much as I appreciate that you have quoted the #defines for the magic numbers,   these can vary from version to version.

David.

bodmer

Formerly Rowboteer (now a broken user profile!)

josh_s

Bodmer, from your picture it looks like we have exactly the same board.

I have a mega 2560 as well as a due, so I tried your library on the recommended settings (actually I did that the other day as well).

Nothing appeared on the screen.  Probably my card is a dud.

I've already ordered a different card as a replacement:  http://www.ebay.com/itm/111793872449
This should be slower and lower res, but maybe I can get a library working with it.

bodmer

I have tested the library here (recently updated) with my display (see link in post #10 above) and it works fine on a Mega when the User_Setup.h file in the library is edited so the driver selection reads like this:


Code: [Select]
//#define HX8357B
//#define HX8357C
//#define ILI9481
#define ILI9486


If that does not work with your particular display then unfortunately either you have a duff display (unusual even for TFT displays from China unless the screen is cracked or it is damaged) or your board has a different driver fitted.

Formerly Rowboteer (now a broken user profile!)

Go Up