mcufriend 2.8 inch TFT LCD display issues

My Cheap Lcd Working :)))))

if Lcd Driver Chip: 154
0x0154
Samsung S6D0154

library

if use Arduino mega 2560 change
pin_magic.h

https://drive.google.com/folderview?id=0B_beZobIWlVab0MyTFl0OHN3TE0&usp=sharing

volsoft:
My Cheap Lcd Working :)))))

if Lcd Driver Chip: 154
0x0154
Samsung S6D0154

library
GitHub - samuraijap/TFTLCD-Library: Arduino library for 8-bit TFT LCDs such as ILI9325, ILI9328, etc byMCUFRIEND

Thanks, it works! :slight_smile:

What does not work for me are:

  • touchscreen (does not show any touches)
  • BMP file rendering: SD library reports successful read of the file, however I see only short white lines on the screen.

Want to thank volsoft #20, works for mcufriend 2.4"-UNO:

Touch screen become responsive, just took half an hour to figure out that adafruit's original pins number changed:
from:

#define YP A3  // must be an analog pin, use "An" notation!
#define XM A2  // must be an analog pin, use "An" notation!
#define YM 9   // can be a digital pin
#define XP 8   // can be a digital pin

to:

#define YP A1  // must be an analog pin, use "An" notation!
#define XM A2  // must be an analog pin, use "An" notation!
#define YM 7   // can be a digital pin
#define XP 6   // can be a digital pin

Magician:
Touch screen become responsive, just took half an hour to figure out that adafruit's original pins number changed

Thanks, it worked somehow. However, touch works very strangely: it is sensitive only on two edges of the screen, while most of the (center of the) screen and other two edges are very hard to click onto.

Touch map looks like this.

Is that a driver issue or a hardware issue with the touch sensor?

Is that a driver issue or a hardware issue with the touch sensor?

Sounds like hardware. If you have a multimeter, you can measure resistance across X & Y plate, see what you get. Library default 300, when I checked my TFT it's only 291.

Magician:
Sounds like hardware. If you have a multimeter, you can measure resistance across X & Y plate, see what you get. Library default 300, when I checked my TFT it's only 291.

My value is 292, that does not make much difference.

However, here is the solution:
Find the TouchScreen.cpp library and change the following value in it:
from

#define NUMSAMPLES 2

to:

#define NUMSAMPLES 1

That helped much!! I experimented with other values (up to 200), but "1" seems to be the best.

Another "bug" that was worth fixing was in tftpaint example:
Change from:

p.y = map(p.y, TS_MINY, TS_MAXY, tft.height(), 0);

To:

p.y = map(p.y, TS_MINY, TS_MAXY, tft.height()-BOXSIZE*2, 0);

To get the BMP files rendering working you need to fix the TFTLCD lib according to: BMP / pushColors bracket on wrong line · Issue #2 · samuraijap/TFTLCD-Library · GitHub

shadersrjj:
Quick update - I have got the paint program to work completely now with the pin allocations above (albeit you do have to use a bit of force).

I did have to invert the coordinates for the X and Y on the touch points.

I'm not sure if the screen is flipped in either axis but this worked OK.

Can you explain to me what you have changed to invert the coordinates? Did you change the p.x and p.y map "elements"?

EDIT: I've found the way to do that. I've changed this:

p.x = map(p.x, TS_MINX, TS_MAXX, tft.width(), 0);
p.y = map(p.y, TS_MINY, TS_MAXY, tft.height(), 0);

To this:

p.x = map(p.x, TS_MINX, TS_MAXX, 0, tft.width());
p.y = map(p.y, TS_MINY, TS_MAXY, 0, tft.height());

Hi,
I also get my 154 tft working thanks to you, however I noticed two problems, I am newbie so maybe this are not problems:

  1. I connected my Ardu Uno using USB and attached the TFT using cables. Tftpaint example works great but when the program starts, some dots are painted without touching the lcd in at the bottom of the lcd near to the color palette. I also appears more often when I am tauching the screen in other places.
  2. It seems, that the program resets itself sometimes, after each 30 seconds screen gets white and repaints itself, after reconnecting the usb it seems to do it more rarely but still it happens

Hi guys thanks for all contributes to this thread. It helped me a lot. Thought I would write the step by step instructions that got my TFT working. Nothing new here, just hopefully a little less confusing for people like me.

HARDWARE

2.4 Inch TFT LCD Touch Screen Shield (chinese type from ebay) Mine is based on the S6D0154 controller.

http://www.ebay.co.uk/itm/301447695328?_trksid=p2059210.m2749.l2649&var=600394488885&ssPageName=STRK%3AMEBIDX%3AIT

I installed these libraries into Sketch

Did NOT uncomment the following line

//#define USE_ADAFRUIT_SHIELD_PINOUT 1

in the Adafruit_TFTLCD.h file that was installed above.

Opened a demo file from the newly installed TFTLCD Library (mentioned above).

Seems so stupidly easy now but being new to the hardware and software I went around in circles for a while so I hope this may help someone else.

Thanks again :slight_smile:

Hi,

I'm yet another complete newbie to the Arduino and to too many of the things involved here, finding myself lost trying to make the various libraries work with a 2.4" LCD mounted on a shield that names mcufriend.com. My particular shield is for Arduino Uno R3.

When running graphicstest, I get the serial output identifying the chip as 154, along with all the test output, but nothing happens on the lcd. I'm hoping that the code already exists to deal with 154 (as volsoft appears to have identified), but when I try to run the various libraries that everyone posts, I find that they will not compile, and when I run libraries that work with my Arduino 1.6.0 IDE environment, they don't appear to handle the 154.

It would be incredibly helpful to me if someone could point to what lines in what libraries branch and handle operations when the "154" is detected. Among other things, I'm unclear on the difference between the ino files and the cpp/h files. I assume that "Verify" is "compile and link" but I'm so lost in this new environment I don't have a clue where to begin when getting failures to compile, and I'm guessing my best bet would be to look at a complete environment that someone vouches works and then, rather than try to get that to work in my standard arduino ide environment, instead move the code modifications from "known working with the 154" to "known working in my IDE, "line by line if necessary. That at least gives me a starting point.

Thanks in advance for any replies, pointers, or reference suggestions.

I purchased on of the TFT LCD's from mcufriend.com and had some fun playing with it. Thought I'd post some stuff I found out so far just to let others know... 1) I have the touch function, Graphics, and text all working separately using files I downloaded externally (available on demand). When I try to run the graphics and touch functions together they don't work mostly because the cpu is off doing graphics and is unavailable to service the touchpad. I did have problems getting the sketches to work together since they both expected the same pins to do different things from my uno. I don't know how I did it, but i did manage to merge the two sketches and it ran w/o errors. The only problem was the servicing of the touchpad function I described before. As for the text I have found the the text shows up as a mirror image on the display. The library has a rotate function but all it does is change it from portrait to landscape etc.. So thats my next challenge. Just wanted to say I bought the display for about $7 and have spent a number of hours playing with it. So in my opinion it was worth the price. I suggest you take a look at www.wish.com and do a keyword search for arduino to see what I've seen. Lots of toys for real cheap. Down side is long turnaround time (up to a month or more) but for a hobby it hasn't been beat.... (no I am not plugging the site) anyhow, great to meet ya since I'm new to this area. If you want more info just ask and I'll gladly share.

Hi every one .
I bought 2.8 TFT LCD Shield and i don't know how determined the type of Controller :frowning: .

I'm try use many more Library without any result :frowning: .
there is some library Loaded in Arduino , library from Adafruit-GFX , serial monitor find LCD Identifier is 139 ! !
Does this mean it's working but it's not realizes the type of controller ??
There is something caught my attention the shield does't have any ICs like all shield i see during my search !!

i attach photo to the LCD shield >
Can any one help me :slight_smile: ?
thanks

It looks like a apparently S6D0139.

http://blog.andreword.co.uk/?p=308
http://forum.arduino.cc/index.php?topic=221685.0

I've been able to get the graphics to work with the LCD, but no luck with the touch screen, have tried different combinations of input pins but not usable results, any ideas?

Hi,

does this display also work together with ethernet shield & SD-card?

Barny

I don't think so. I uses a lot of pins... But check which are used and which are free.

Hay maby a little late but try this

http://forum.arduino.cc/index.php?topic=292777.0

download the "MCUfried TFT UNO y MEGA libraries.zip" on buhosofts post worked for me.
just take the files out of the folder like a normal library.

I've posted on another thread my experience of getting the mcufriend 2.8 TFT working using the st7783 library mentioned in the OP.

As well as the "touch screen is reversed" problem, my display had very poor contrast. Every other row of pixels was white. There are patches to the TFTLCD.cpp file which fixed this.

Hi guys did anyone get the screen to work first time with straight forward instructions?
Just purchased

http://www.ebay.co.uk/itm/2-8-Inch-TFT-LCD-Display-Touch-Screen-Module-with-SD-Slot-For-Arduino-UNO-VM-/221930859265?hash=item33ac1c2b01:g:tm4AAOSw2s1Uulgm

And yes I also have a white screen :frowning:

I have only started to play around with arduino's for the past year so am a novice.

Thank you.