Pages: [1]   Go Down
Author Topic: Arduino Mega + LCD  (Read 521 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello!
I have purchased aa Arduino Mega with LCD from alliexpress. I used the code they send me but the result is this when i try to display geometries (eg. this is a rectangle) https://www.dropbox.com/s/lddumwdhhgdruzr/problem.jpg.
Where do you think the problem is?
I am very confused. I tried to make it work over two days now.
Thank you.
Logged

Queens, New York
Offline Offline
Faraday Member
**
Karma: 106
Posts: 3758
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What library(s) are you using?
Logged

Created Libraries:
TFT_Extension, OneWireKeypad, SerialServo, (UPD)WiiClassicController, VWID

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

Thanks for the reply.
I am using the library they send me.
https://www.dropbox.com/s/9au850c07k5s1ib/3.5%20inch%20for%20mega.zip
It seems v1.3 UTFT custom made.
The LCD is this http://www.aliexpress.com/item/Mega-2560-R3-Development-Board-3-5-inch-TFT-LCD-Touch-Screen-Display-Module-Compatible-For/1769845784.html.
I am very confused...
Logged

Queens, New York
Offline Offline
Faraday Member
**
Karma: 106
Posts: 3758
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

its most likely the library doesn't work for that screen, have you tried downloading the actual UTFT and UTouch libraries from Henning's website?
Logged

Created Libraries:
TFT_Extension, OneWireKeypad, SerialServo, (UPD)WiiClassicController, VWID

Dee Why NSW
Offline Offline
Edison Member
*
Karma: 48
Posts: 2297
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If the picture you show is truly representative, I think it is more likely that the screen is suss than the library. While it is confusingly packaged, the library is the standard Henning Karlsen  and there is only one of them.   The "U" in  UTFT stands for universal, and a single line in the programme

Code:
UTFT myGLCD(ITDB32WC,38,39,40,41);

determines the specific display. Karlsen's notes adequately explain this.

The above means that all the example programmes are essentially the same.

The command to draw a square with rounded corners is - draw a square with rounded corners.  I submit that no amount of programming or library fiddling is going to give you what you've got - an incomplete square - therefore I assume the LCD is suss. You can at least partly verify this by drawing the box in a different position and seeing if the faults are the same. If the box turns up where you expect it to but still looks the same as your picture, I guess I might be wrong, but I might not ber. If it displays a kosher square, I'm right. 

The fact that you have something reasonably intelligible on the screen suggests the library and model command are kosher but note there is no guarantee.  The wrong model command can still give a result.  The only way I got my 400x240 to work was to use an example meant for a 480x320 and adapt all the locations to suit. I even had to shift the colours. My LCD is not the same as yours, and there is no evidence (yet) that you have the same problem.





 
Logged

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

I contacted the seller and he notify me that it is very strange and they have never saw the same issue.
The only thing that i cannot understand is that i had bought two lcd with the arduino Mega and both(!) had the same issue.
Do you think it is reasonable (just for infomation)? The problem will be solved (i think) with replacement.
Thank you very much for your replies!
Logged

Queens, New York
Offline Offline
Faraday Member
**
Karma: 106
Posts: 3758
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
While it is confusingly packaged, the library is the standard Henning Karlsen  and there is only one of them.
This is actually not true, venders who sell on ebay and other such sites, are distributing modified versions of Karlsen's libraries. I have one of those "fake" LCD screens that only works with Karlsen's older ITDB02 libraries. I even dug into both of them(fake and orig) to see just what was changed and found out that the registers for the data bus lines were changed. Some lines were taken out and added in.

I brought it to Karlsens attention and he is not happy at all, but he himself already knew that people were distributing fake versions.

Im thinking the OP has the original library(currently) but his screen might be set to only work with a modified library.

Logged

Created Libraries:
TFT_Extension, OneWireKeypad, SerialServo, (UPD)WiiClassicController, VWID

Dee Why NSW
Offline Offline
Edison Member
*
Karma: 48
Posts: 2297
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I contacted the seller and he notify me that it is very strange and they have never saw the same issue.
The only thing that i cannot understand is that i had bought two lcd with the arduino Mega and both(!) had the same issue.

I guess you can rely on him to say that, and having two the same is certainly strange, but I suppose it is possible to have a batch with the same fault and it might ultimately be best to try for a refund.

I said the documents were confusingly packaged because the packaging is confusing. They are also incomplete.  Needless to say, I have no idea if the library has been modified or not, but it costs nothing to try the download from

http://www.henningkarlsen.com/electronics/library.php?id=51

thereby ensuring what you have is original, kosher and the latest version. This guarantees nothing and it didn't work for me, but it might for you and a lot easier than getting a refund.  I recall there was only one 400x240 example but you get some other examples to try, which did work for me. As I said, there is only one library and the vital change is the model identification. FWIW, I use

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

for my 400x240 but the line came out of a 480x320 example. 

What I don't understand is why you get what you get and nothing else. The demo goes through a raft of exercises and is even animated, but all you talk about is a square. You might add a few serial.prints as markers, to check that the the programme is running OK.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 46
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Did you ever get this lcd working? I posted here several weeks ago saying that the board was okay, it was the driver at fault. In the process of editing the post on my phone, I ended up deleting it and I never got back to post again due to my schedule. If you are still trying to get this working, post again and I'll see if I can help.
Logged

Pages: [1]   Go Up
Jump to: