2.8" TFT LCD Shield SD Socket with Touch Panel Module for Arduino mega2560

Anyone had any luck with this beast/piece of crap?

I’m sorry but as of now it looks like I’ve [edit - language] up bad when I bought a number or cheap LCD’s from EBAY as the seller / producer support is non-existent:

http://www.ebay.co.uk/itm/381517549533?_trksid=p2055119.m1438.l2649&ssPageName=STRK%3AMEBIDX%3AIT

Supposedly “It can be used directly, no requiring an additional adapter plate” and as that may be true I still have not got it to work with any “standard library”…

This is what I have found out so far:

The display is marked “TTF028H096FP-V2/8347”

The SD card reader is connected to :
22 - PB3 - PCINT3 = 7 DO Master In/Slave Out (MISO)
21 - PB2 - PCINT1 = 3 DI Master Out/Slave In (MOSI)
20 - PB1 - PCINT2 = 5 CLK Clock (SCK)
19 - PB0 - PCINT0 = 2 CS Chip Select/Slave Select (SS)

The Touch Controller (XPT2046) is connected to :
6 - PE4 = pin 11 XPT2046 PENIRQ
7 - PE5 = pin 12 XPT2046 DOUT
1 - PG5 = pin 14 XPT2046 DIN
5 - PE3 = pin 15 XPT2046 CS
15 - PH3 = pin 16 XPT2046 DCLK
16 - PH4 = pin 13 XPT2046 BUSY

LCD is connected to :
50 - PD7 - T0
51 - PG0 - WR
52 - PG1 - RD
53 - PC0 - A08
54 - PC1 - A09
55 - PC2 - A10
56 - PC3 - A11
57 - PC4 - A12
58 - PC5 - A13
59 - PC6 - A14
60 - PC7 - A15
70 - PG2 - ALE
71 - PA7 - AD07
72 - PA6 - AD08
73 - PA5 - AD09
74 - PA4 - AD10
75 - PA3 - AD11
76 - PA2 - AD12
77 - PA1 - AD13
78 - PA0 - AD14

Tonight I’ve been studying the UTFT library but still have to figure out how to define the databus pins?!?

Any help greatly appreciated!!!

Back.JPG

Back.JPG

You have two JPEGs that look exactly the same.

It looks like an 8-bit data bus. I suggest that you use a multimeter to test which Arduino pins are connected to which resistor pack e.g. RP1 … RP5. And whether the SD card connects to a resistor pack or directly to Arduino pins.

Post your results in terms of digital#. e.g. digital#22 or D22.

I can make no sense of your description. This is a shield. You plug it into your Mega2560. Every male pin mates with its corresponding female socket. When you have clarified the pcb traces on the shield, we know which Mega port pins are involved.

David.

Thanks for your reply David!

Sorry about the missing / wrong image, the front is attached to this post.

I’m sorry about the ambiguity regarding the pin names, studying the references I realize there are a number of ways to read them. Among other things I had the ATmega processor pins mixed with the pin numbers printed on the pcb, not to mention that I read the pin numbers on the two row connector from the wrong side of the pcb…

Going through it all once more this should be more correct:

The SD card is connected directly to the two row connector at the short end of the Arduino Mega (the XIO-connector?). These pins are numbered 50-52 on the pcb which - if I have understood it correctly - translates to D50-D52?

Other ways to describe those pins are : PB0-3 which - according to “The Unofficial Arduino MEGA Pinout Diagram” (found here Tresdeland - Tu mundo 3D) - are the port pin designations.
The ATMega pin functions are INT0-3 and the serial pin function/designation are : SS, SCK, MISO and MOSI.

According to the reference these pins support SPI communication using the SPI library.

I did use a multimeter to test which Arduino pins were connected to which resistor pack e.g. RP1 … RP5 and the information translated to Dnn becomes :

D22-D37 (Atmega2560 pins : AD0-7 and A08-15) 16 bit data?
D38 (Atmega2560 pin : CTS/HWB/AIN6/TO/INT7)
D39 (Atmega2560 pin : ALE)
D40 (Atmega2560 pin : RD)
D41 (Atmega2560 pin : WR)

The Touch panel is connected to D2-D7 (the PWML connector?) where the
D2 (ATMega2560 pin ((OC3B/INT4)PE4) connected to the XPT2046 pin 11 (PENIRQ)
D3 (ATMega2560 pin ((OC3C/INT5)PE5) connected to the XPT2046 pin 12 (DOUT)
D4 (ATMega2560 pin ((OC0B)PG5) connected to the XPT2046 pin 14 (DIN)
D5 (ATMega2560 pin ((OC3A/AIN1)PE3) connected to the XPT2046 pin 15 (CS)
D6 (ATMega2560 pin ((OC4A)PH3) connected to the XPT2046 pin 16 (DCLK)
D7 (ATMega2560 pin ((OC4B)PH4) connected to the XPT2046 pin 13 (BUSY)

Hope this makes more sense, as I (hopefully) now understand the Dnn numbering scheme.

Front.JPG

Ok, it is a regular 16-bit shield. e.g.

UTFT          myGLCD(ILI9325,38,39,40,41);

Your link provides no hints as to the controller type. Common controllers are ILI9325, SSD1289, ILI9341, …
2.8 inch screens are commonly 240x320.

TFTLCDcyg has a modified UTFT library for an ILI9341.

David.

From reading the marking on the back of the display “TTF028H096FP-V2/8347” my first guess was that the controller is a HX8347A but though it is available in the UTFT librarys the screen remains white.

240x320 was verified by the seller before purchase.

No joy using that modified UTFT library either so I’m still lost.

It might be HX8347-A or HX8347-I or -B, -D, -G. The different type is more like a different model.

Try Adafruit_TFTLCD with tft.begin(0x7575)

David.

What about the pin definitions?:

#define LCD_CS A3 // Chip Select goes to Analog 3
#define LCD_CD A2 // Command/Data goes to Analog 2
#define LCD_WR A1 // LCD Write goes to Analog 1
#define LCD_RD A0 // LCD Read goes to Analog 0

...

// For the Arduino Mega, use digital pins 22 through 29
// (on the 2-row header at the end of the board).

???

Result : TFT LCüTFT LCD test TFT size is 240x320 Unknown LCD driver chip: 404 I try use ILI9341 LCD driver If using the Adafruit 2.8" TFT Arduino shield, the line:

define USE_ADAFRUIT_SHIELD_PINOUT

should appear in the library header (Adafruit_TFT.h). If using the breakout board, it should NOT be #defined! Also if using the breakout, double-check that all wiring matches the tutorial. Benchmark Time (microseconds) Screen fill 1786168 Text 269576 Lines 2021044 Horiz/Vert Lines 199860 Rectangles (outline) 139344 Rectangles (filled) 4672864 Circles (filled) 1405152 Circles (outline) 879628 Triangles (outline) 641184 Triangles (filled) 2174116 Rounded rects (outline) 363980 Rounded rects (filled) 5322020 Done!

david_prentice: It might be HX8347-A or HX8347-I or -B, -D, -G. The different type is more like a different model.

Try Adafruit_TFTLCD with tft.begin(0x7575)

David.

Do you know or know where to find the corresponding identifiers for the different versions of the HX8347?

Yes. I have data sheets for -A, -B, -D, -G, -I

-A  reg(0x67) = 0x47    //check this
-B  reg(0x00) = 0x9325
-D  reg(0x00) = 0x47
-G  reg(0x00) = 0x75
-I   reg(0x00) = 0x95

Of course your Green pcb can't read anything anyway.

David.

I have the same display shield. To avoid typing all the different chip names I went to the UTFT header file to see how they were defined. Ok, 0-31 (17 and 18 are not used). So I went thru and tried every number:

UTFT myGLCD(0,38,39,40,41);

thru

UTFT myGLCD(31,38,39,40,41);

No luck at all. Then I remembered I first started using the library with an UNO so I disabled some of the chips in the library. So I reenabled ALL of them and went thru 0-31 again (not paying attention, I even tried 17 and 18). Same result.

I emailed the manufacturer a few days ago, no response. MCUFRIEND is not my friend.

Vince.

This module looks similar to yours, except it's a 3.5" screen. It lists the chip as ili9481 on the board (2nd picture).

The ili9481 is a #21 in the ones I tried. For some reason I tried that one a few times even doing a power off reset before one of the uploads. Since these aren't even on the mcufriend website now, I'm thinking these were/are scrap.

michvhf: I have the same display shield. To avoid typing all the different chip names I went to the UTFT header file to see how they were defined. Ok, 0-31 (17 and 18 are not used). So I went thru and tried every number:

UTFT myGLCD(0,38,39,40,41);

thru

UTFT myGLCD(31,38,39,40,41);

No luck at all. Then I remembered I first started using the library with an UNO so I disabled some of the chips in the library. So I reenabled ALL of them and went thru 0-31 again (not paying attention, I even tried 17 and 18). Same result.

I emailed the manufacturer a few days ago, no response. MCUFRIEND is not my friend.

Vince.

Hi michvhf, so now I know I'm not the only one with this problem.

My experience with MCUFRIEND is also total silence, my supplier did answer my query's initially but have since stopped responding.

Since there is no communication with the controller the next thing to do seem to be to verify that the driver actually use the 16 bit bus on digital pins 22-37?

Since the scope is handy, I fired it up and checked 22-42 (I know 42 isn't used and nothing was happening on it). There is data happening on most of those pins. A couple are just high, maybe nothing was happening on that particular bit at that time. The program that was loaded on the mega is the 320x240 demo from the UTFT library with 21 as the model which is the ILI9481.

Thinking out loud here ... what are the odds this display uses an ILI9488? UTFT and ADAFruit don't support that chip and as I recall the kbv library doesn't support Mega shields.

Scratch that. I just had a look at the bottom of the board, different than the pic in the ebay ad. It says it has an 8347i. Is the “i” different than the “a”?? I’m assuming so, but the UTFT library only supports the “a”. I’m not sure what the AdaFruit library supports…

David, if you’re still following this, can you confirm or deny the difference between the HX8347a and the HX8347i?

yes, the -I is very different t -A, -B. the -I is similar to the -D, -G. Adafruit expects -G (I think).

Do you know off hand what the hex number of the G is? I tried 9595 and 7575, although that was with the MCUFRIEND_kbv library - I’ll have to load up the other one.

Please post a link to your actual shield. If you are 100% certain that you have the same one as someone else, say exactly which message # contains the link.

PM me with your email if you are prepared to test new code. I am not at a PC. I can't remember whether v2.8 does HX8347-I.

Message #9 says which version has what ID. Note that the non-B versions are always 8-bit. If you read reg(0x00) twice, you get the same 8-bit value again. e.g. 0x95, 0x95 for an -I.

David.