Pages: [1]   Go Down
Author Topic: arduino mega 2560 and the hy-tft320 or hy-3.2tft display problem  (Read 2406 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello All..
  (this is where it starts to sound like the 1000 other messages i have read)

I recently bought myself one of these "you beaut" lcd displays

http://www.ebay.com.au/itm/200926078075?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

I can not seem to find any consistent information on it.  

I have UTFT compiling ok and with no errors.  However, the screen is showing nothing but white

In the link above you will see the pin out diagram on the back of the module, this is where I have found soooo many variations.

But using the info from the back of the module, I have wired it to my arduino (as needed for the mega) but to no avail.

Any help will be most appreciated.

Thanks

EDIT:

Just had another look at the photo in the link... turns out the pic is NOT the same as the module I received (d'oh)

will try to upload a pic
« Last Edit: August 26, 2013, 06:31:41 am by homer-aust » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is an example of the inconsistency in the information on this module

http://www.electrodragon.com/w/index.php?title=Category:3.2_TFT_LCD

Mine is the ITDB02-TFT version ( as far as I can tell)

If you have a look at the pin out in the picture and notice how the pin outs on the diagrams below it differ...

I have found this happens on far too many occasions on the sites and only serves to make it harder

What am I to do???

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, I have made (albeit a very small) step forward...

I took the example code from the UFTF library and made it so that it just flashed white then red then black every 2 seconds.

There is signal getting there but there is no colour, just white/slightly darker/ black.

This also depends on the driver used... some drivers there is a distinct difference between black and what should be red while others there is none.

Any help on this will be most appreciated.

Thanks

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ok,

  This display has officially sent me insane.

 I have attached a photo of this card in the hopes that someone can identify it and maybe even point me in the right direction.

Can someone please point to where there is a step by step guide on this

Here is the code i use:

Code:


// Declare which fonts we will be using
extern uint8_t SmallFont[];

// Uncomment the next line for Arduino 2009/Uno
//UTFT myGLCD(ITDB32S,19,18,17,16);   // Remember to change the model parameter to suit your display module!

// Uncomment the next line for Arduino Mega

UTFT myGLCD(HX8352A, 38,39,40,41);   // Remember to change the model parameter to suit your display module!


void setup()
{
  randomSeed(analogRead(0));
  Serial.begin(115200);
 
// Setup the LCD
  myGLCD.InitLCD();
 
  pinMode(38, OUTPUT);
  pinMode(39, OUTPUT);
  pinMode(40, OUTPUT);
  pinMode(41, OUTPUT);
 
  myGLCD.lcdOn();
  myGLCD.setFont(SmallFont);
  myGLCD.setColor(0,255,255);
}

void loop()
{
  //int buf[318];
  //int x, x2;
  //int y, y2;
  //int r;
 
 
 

// Clear the screen and draw the frame
  myGLCD.clrScr();

 
//  myGLCD.setColor(0, 0, 0);
  myGLCD.fillScr(255,0,0);
 // myGLCD.fillRect(0, 0, 319, 199);
  delay(1000);
 
//  myGLCD.setColor(255, 0, 0);
  myGLCD.fillScr(0,0,255);
//  myGLCD.fillRect(0, 0, 319, 199);
  delay(1000);
}



Thanks in advance



* 20130914_225625.jpg (2557.88 KB, 3264x2448 - viewed 260 times.)
Logged

Oslo, Norway
Offline Offline
Full Member
***
Karma: 6
Posts: 126
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There are some inconsistencies in the eBay description...
They state that the display resolution is 320x480 and that it uses the HX8352-A TFT controller.
The HX8352-A only supports up to 240x480 resolutions (according to the datasheet)...

UTFT only supports 320x480 (or 480x320) with the ILI9481 controller.
If you are unable to make it work using either model code "CTE32HR" or "ILI9481" (they are the same), you will have to add a separate TFT driver for it...

/Henning
Logged

France
Offline Offline
Edison Member
*
Karma: 37
Posts: 1005
Scientia potentia est.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is the same 40 pins connector as many others displays. I believe your display uses SSD1289 controller. You can probably use this shield to link the Arduino mega and the display: http://www.sainsmart.com/arduino-compatibles-1/lcd-module/sainsmart-tft-lcd-adjustable-shield-for-arduino-mega-2560-r3-1280-a082-plug.html

If you want to try without this shield, then you must wire like this:

DB0 -- 10 Kohms resistor -- D37
DB1 -- 10 Kohms resistor -- D36
DB2 -- 10 Kohms resistor -- D35
DB3 -- 10 Kohms resistor -- D34
DB4 -- 10 Kohms resistor -- D33
DB5 -- 10 Kohms resistor -- D32
DB6 -- 10 Kohms resistor -- D31
DB7 -- 10 Kohms resistor -- D30
DB8 -- 10 Kohms resistor -- D22
DB9 -- 10 Kohms resistor -- D23
DB10 -- 10 Kohms resistor -- D24
DB11 -- 10 Kohms resistor -- D25
DB12 -- 10 Kohms resistor -- D26
DB13 -- 10 Kohms resistor -- D27
DB14 -- 10 Kohms resistor -- D28
DB15 -- 10 Kohms resistor -- D29

GND -- GND
VCC -- 5V
RS -- 10 Kohms resistor -- D38
WR -- 10 Kohms resistor -- D39
RD -- 10 Kohms resistor -- 3.3V
CS -- 10 Kohms resistor -- D40
RSET -- 10 Kohms resistor -- D41
LEDA -- 220 ohms resistor -- 3.3V

Then for UTFT use myGLCD(ITDB32S, 38,39,40,41);
« Last Edit: September 14, 2013, 04:45:34 pm by guix » Logged

Oslo, Norway
Offline Offline
Full Member
***
Karma: 6
Posts: 126
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I believe your display uses SSD1289 controller.

This is not very likely as the display is advertised as being 320x480. The SSD1289 only supports up to 240x320...

--> And this is why I would never buy stuff like this from vendors who do not supply example code.

/Henning
Logged

France
Offline Offline
Edison Member
*
Karma: 37
Posts: 1005
Scientia potentia est.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you have a look at the pin out in the picture and notice how the pin outs on the diagrams below it differ...

I don't see any difference, they are just different in that one is seen from below the display and the other one from above the display

This is not very likely as the display is advertised as being 320x480. The SSD1289 only supports up to 240x320...

I can't view the item on that ebay link. But the name of his display is TFT320, so I suppose this is 320x240 not 480x320, else the name would have been TFT480 or something...
Logged

Oslo, Norway
Offline Offline
Full Member
***
Karma: 6
Posts: 126
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I can't view the item on that ebay link. But the name of his display is TFT320, so I suppose this is 320x240 not 480x320, else the name would have been TFT480 or something...

I agree that the name suggests a 320x240 display but the auction title is "1PC New 3.2" 320x480 TFT LCD Module Display + Touch Panel + PCB Adapter", and they also mention twice more in the description that the resolution is 320x480. But they also say that the controller chip is a HX8352-A and that controller does not support anything larger than 240x480 so it is really anybodys guess.

Without proper documentation or example code it is impossible to say what this actually is. My guess would be that the eBay vendor does not know what the heck they are selling.

/Henning
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks heaps guys for your comments and suggestions

This has given me a fresh path to go on with and hopefully i can come back with some good news.

I actually think this is quite funny...  of all the 3.2" displays I had to choose from, I picked the one with little to no documentation.  go figure...


I would much prefer to NOT use a shield as the arduino will be used for other things and as such will need a custom built shield but I there is no other way then I will get one.  Thats why I chose this display because all the (obviously bad) research suggested that it could be run directly off of the mega...

guix, I will try your idea now...

Many thanks all
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've narrowed it down to 2 possibilities:

  1:  Its a driver problem
  2:  I have blown the display

I think I will go and get myself a "matched" display/shield combo and work from there. 

Thanks everyone for your advice... im putting this display aside until I can eliminate the possibility that it is blown.  Since I can only do that with another display I may as well get a shield to match it at the same time.

Logged

France
Offline Offline
Edison Member
*
Karma: 37
Posts: 1005
Scientia potentia est.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Weird. Maybe I'm wrong and this is no SSD1289 but I can't help you more than that. With the shield, If you want to free unused pins you will have to do something like this:



When it's finished I will post details how I did and what it does
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the pic guix...

 
Logged

France
Offline Offline
Edison Member
*
Karma: 37
Posts: 1005
Scientia potentia est.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What about the touchscreen and SD slot, do they work at all?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I haven't actually tried... the application this is going in doesn't require a touch screen or sd card, only the screen.  I should hook them up to see just for shits and giggles.

Logged

Pages: [1]   Go Up
Jump to: