2.4" TFT LCD Touch Panel Display, displays the wrong letters , reverse them

Hi all.
I bought from ebay next item :
2.4" TFT LCD Shield Touch Panel Display for Arduino
http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=400563532954&ssPageName=ADME:X:RTQ:US:1123
I use them libray and i tried with other (from canton-electronics) but i have a problem with it
all leters or numbers are display in “mirror effect” , it displays the reverse.
I use lcd with Arduino uno.
I attach a picture to explain what i want to tell with “mirror” effect".
The problem are from library or from lcd controler?
Many thanks to all.

Nobody use this type of display? Thanks again.

Same for me, I searched for another library, maybe with other header configuration, but didn't success.

Any ideas??

Thanks!!

Thanks for your answer. I think the controller of the lcd is bad.Library is good.

tao13: I think the controller of the lcd is bad. Library is good.

That is an absurd suggestion. A "bad" controller that reverses the order of display?

Almost certainly, the library is "good", but will contain a parameter which defines the orientation of the display. You need to delve deeper into the documentation.

Thanks Paul__B I'm a beginner usr bot good electronist or debugger of libraries. So you think the library is bad? Many thanks again.

tao13: Hi all. I bought from ebay next item : 2.4" TFT LCD Shield Touch Panel Display for Arduino http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=400563532954&ssPageName=ADME:X:RTQ:US:1123 I use them libray and i tried with other (from canton-electronics) but i have a problem with it all leters or numbers are display in "mirror effect" , it displays the reverse. I use lcd with Arduino uno. I attach a picture to explain what i want to tell with "mirror" effect". The problem are from library or from lcd controler? Many thanks to all.

You may find some information from this thread : http://forum.arduino.cc/index.php?PHPSESSID=3m0oh2sre1v134qdlm8l88nt71&topic=134708.0

Regards, -__-

tao13: So you think the library is bad?

I do not necessarily think it is "bad" and presumably other people have had success with it.

My suspicion is that it has some parameter or switch that you need to set to have it print the right way around. But I have not used, it probably do not have a similar display (have something here, but have not "got around" to figuring it out), so cannot be conclusive; just suggesting you see what documentation you can find on the library and how to use it.

Hi again to all.
It works.
I use adafruit library and it works greate with arduino uno and arduino mega 2560
For uno it works directly and for mega some redefinition of pins:

#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_TFTLCD.h> // Hardware-specific library
#include <TouchScreen.h>

#if defined(SAM3X8E)
#undef __FlashStringHelper::F(string_literal)
#define F(string_literal) string_literal
#endif

// For the Arduino Mega, use digital pins 22 through 29
// D0 connects to digital pin 22
// D1 connects to digital pin 23
// D2 connects to digital pin 24
// D3 connects to digital pin 25
// D4 connects to digital pin 26
// D5 connects to digital pin 27
// D6 connects to digital pin 28
// D7 connects to digital pin 29

//for uno
/*
#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
*/

//for mega
#define YP A1 // must be an analog pin, use “An” notation!
#define XM A2 // must be an analog pin, use “An” notation!
#define YM 29 // can be a digital pin
#define XP 28 // can be a digital pin

#define TS_MINX 150
#define TS_MINY 120
#define TS_MAXX 920
#define TS_MAXY 940

TouchScreen ts = TouchScreen(XP, YP, XM, YM, 300);

#define LCD_CS A3
#define LCD_CD A2
#define LCD_WR A1
#define LCD_RD A0
// optional
#define LCD_RESET A4

And need to modify these:
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
p.x = map(p.x, TS_MINX, TS_MAXX, 0 , tft.width());
p.y = map(p.y, TS_MINY, TS_MAXY, 0 , tft.height());

MANY THANKS TO ALL!

Hi there!

I know it's been a while but I'm actually looking to reverse your problem, and I can't find anything related to this anywhere else. I have an Adafruit OLED which is working very well. With your knowledge of libraries do you know how I could make the text mirrored? I want to see the screen in a mirror, so the text must be flipped on the screen to appear correctly to the user. I'm also using the Adafruit_GFX library in my sketch.

Thanks for any help!

tao13: And need to modify these: 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 p.x = map(p.x, TS_MINX, TS_MAXX, 0 , tft.width()); p.y = map(p.y, TS_MINY, TS_MAXY, 0 , tft.height());

This appears to be the crucial snippet of information you need.

Regards,

Graham

Thank you for pointing me in the right direction! I'm just a little confused as to where this code should go. Should it be in the Arduno sketch or in the library itself?

Thanks!!

Sorry about that, I realise in hindsight my comment was only relevant to the touch screen, not the LCD. :(

I don't have one of those displays to experiment further. Sorry again.

Regards,

Graham

Don't worry about it! But I thought the problem to begin with was that the screen was flipping the text, nothing to do with the touch function of the screen. If this is the case, shouldn't I be able to reverse Tao13's solution to mirror the text on my screen?

Thanks

Yes, thats exactly what I was thinking too.

Regards,

Graham

And need to modify these: 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 p.x = map(p.x, TS_MINX, TS_MAXX, 0 , tft.width()); p.y = map(p.y, TS_MINY, TS_MAXY, 0 , tft.height());

So should this code be directly in the Arduino sketch, or in the Adafruit_GFX library?

Thanks

I have just had a quick look for you, it appears the voodoo to adjust rotation and stuff is all done in the Adafruit_TFTLCD library. If I were you, I would start looking at some of the examples included with that library.

The Adafruit_GFX library is just for general purpose graphics routines such as lines, circles, triangles etc.

I cannot help any further as I don't have any 8 bit display modules.

Regards,

Graham

I will do that. Thank you for all of your help, it is much appreciated!!