LCD 16x2 Arduino Mega problem

Hi! I have Arduino mega 2560 and a LCD (Digital Image CM160224 as the datasheet attached)

I have connected the wires as at the lot of examples I have connected:

LCD: Arduino:
1 -------- GND
2 -------- 5+V
3 -------- 10k Potentiometer between GND and 5+V
5 -------- GND

also the other pins 4=RS,6=E, 11-14=D4-D7.
Using only the first 1,2,3,5 pins normally I should see at the screen squares, but I see when i move the potentiometer some lines that disappear immediately.

please help me, is this a faulty LCD or I am doing something wrong?

cm160224sfaybgr2.pdf (661 KB)

please help me, is this a faulty LCD or I am doing something wrong?

You probably have the potentiometer connected improperly. The diagram on page 11 of your datasheet is totally screwed up but shouldn't cause the problem that you describe.

Make sure you have one end of the potentiometer connected to +5V (pin 2) and the other end connected to GND (pin 1). The center terminal of the potentiometer goes to pin 3.

Don

How did you solved this?
I have connected exactly as in the tutorial: http://arduino.cc/en/Tutorial/LiquidCrystal
So that the potentiometer is connected between GND and +5, the middle pin is connected to V (Contrast).
I have used 10k potentiometer. Should I try different one?

thanks and regards!

Look at my images to see what happen.
![](http://LCD 16x2 Arduino 2.png.jpg)
When I connect +5V to the potentiometer, or when i move the potentiometer, it shows some boxes/lines that disapear with few seconds.

I have connected the LCD pin 4-14 to Arduino Digital pin 25-45
Please help

look at the code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(25, 27, 29, 39, 41, 43, 45);

void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("hello, world!");
}

void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis()/1000);
}

How are you dealing with the fact that pins 1, 2, 3, and 5 and possibly 15, and 16 are plugged into your Arduino? Or maybe they are not -- we can't tell from the photos.

Don

Hey guys! Im new to this forum and to the arduino..please be kind enough to help me out with my arduino (Mega 2560) problem..thanx in advance.

Ive been trying to get my 16x2 LCD working i bought it from ebay:
(http://www.ebay.co.uk/itm/HD44780-1602-16x2-162-LCM-Character-LCD-Display-Module-Blue-Blacklight-New-UK-/300717175591?pt=UK_Computing_Other_Computing_Networking&hash=item460423f327)

i tried running this code :

#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("hello, world!");
}

void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis()/1000);
}

after setting it up according to the tutorial at addafruit

i'm sure all my connections are correct, the display works according to the program but it is very unclear even after adjusting the 10k pot..im not sure what the problem is please help me out..some extra info:

ive attached the LCD to the breadboard by means of soldering connector pins (not sure if this is the problem?)

the voltage out put between the middle pin and ground pin of the pot is 3.08v

I was able to get the first row showing before connecting the data pins but there was a thin line missing in the square blocks

ok i did post this problem in another topic but i think its more relevant here as i seem to be facing a similar problem

attaching some pics
pic1

pic2

pic3

I have connected the LCD directly to digital pins like this:

lcd pin:
1---->GND
2---->+5V
3=Vo---->Potentiometer (middle pin, potentiometer 10k connected between +5v and GND)
4=rs----> Digital pin25
5=rw----> Digital pin27
6=E----> Digital pin29
7=1----> Digital pin31
8=2----> Digital pin33
9=3----> Digital pin35
10=4----> Digital pin37
11=5----> Digital pin39
12=6----> Digital pin41
13=7----> Digital pin43
14=8----> Digital pin45

So anyway i think at least even if it's not connected to arduino, with the first 3 pins it should be able to see black squares, that I don't see them.
What may be the problem?

floresta:
How are you dealing with the fact that pins 1, 2, 3, and 5 and possibly 15, and 16 are plugged into your Arduino? Or maybe they are not -- we can't tell from the photos.

Don

@vasudev: i replied in the thread you created by accident (click), your problem is very different from aescom's problem and you are disturbing the discussion of his problem, most likely without that intend.

@aescom:
Your photo's don't show how the resistor is wired up so that doesn't really help.
I'd have to guess and would say that it is indeed wired incorrectly but can't be sure.
Your discription in the post above however is correct.

I would (and did that while playing aroud with a display for the first time) use a breadboard instead of a veroboard.
That way you can easily move pins around.
But i have to tell you, i saw very similar patterns on the display i had.
And that is because the display is dead.
I can't display anything else than these lines, but they are all over the display.
Another display works OK here so it can't be the wiring, but maybe i did something wrong the first time, i don't know.
Your picture shows the lines somewhere in the center of the screen and not at the first edge.

I'm afraid you display is dead.
Reconfirm your wiring and if you are sure it is correct, try an other display (which you probably don't have around right now..).

I am thinking also that maybe I did something wrong at the beggining that have damaged the LCD.
Anyway here it is the photo of how I have connected the Potentiometer (I have connected without soldering just to see how I did it).
So the red wire is connected to +5V., blue to GND and white to V0 and that's it.
I just wan't to be sure that Is a faulty LCD before buying a new one.
Thanks!

@aescom:
Your photo's don't show how the resistor is wired up so that doesn't really help.
I'd have to guess and would say that it is indeed wired incorrectly but can't be sure.
Your discription in the post above however is correct.

I would (and did that while playing aroud with a display for the first time) use a breadboard instead of a veroboard.
That way you can easily move pins around.
But i have to tell you, i saw very similar patterns on the display i had.
And that is because the display is dead.
I can't display anything else than these lines, but they are all over the display.
Another display works OK here so it can't be the wiring, but maybe i did something wrong the first time, i don't know.
Your picture shows the lines somewhere in the center of the screen and not at the first edge.

I'm afraid you display is dead.
Reconfirm your wiring and if you are sure it is correct, try an other display (which you probably don't have around right now..).

[/quote]

It's messy so hard to follow, but that picture shows the right pins connected.

I am attaching again a picture of the same configuration to see if it's correct. I dubt to be wrong but just to be sure that i't s not my fault

MAS3:
It's messy so hard to follow, but that picture shows the right pins connected.

I'm sorry, but it is not wired correctly.
We all were looking at the pot and it's wiring.
But your last photo shows something that wasn't directly visible to us, you have 2 more solderpads left.
These pads are at the right hand side of your display.
If pin numbering would be standard, these pins would be pins 0 and -1 and that makes no sense at all.

Are you sure your pin number 1 is number 1 and not number 14 ?
I suspect it really is number 14 and in that case all bets are off.
Please show a clear photo from top and bottom of your display module, showing the connection pins without anything connected to it.
This will very likely give us some clue as to where pin 1 is.

Edit:

Your PDF document can't be opened (here).
Well after searching a lot, i found that this is an oddball LCD with a non standard 16 pin connector.
This connector starts with 16, 15, 1, 2, 3, and so on FROM RIGHT TO LEFT.

So back to start.. :frowning:

me too i thought should be 1,2,...15,16. but it's different
from 14,13,...2,1,15,16.
It's on the datasheet and also on the board written. Just if it's a mistake that I don't thinks so.
What is your opinion?

MAS3:
I'm sorry, but it is not wired correctly.
We all were looking at the pot and it's wiring.
But your last photo shows something that wasn't directly visible to us, you have 2 more solderpads left.
These pads are at the right hand side of your display.
If pin numbering would be standard, these pins would be pins 0 and -1 and that makes no sense at all.

Are you sure your pin number 1 is number 1 and not number 14 ?
I suspect it really is number 14 and in that case all bets are off.
Please show a clear photo from top and bottom of your display module, showing the connection pins without anything connected to it.
This will very likely give us some clue as to where pin 1 is.

Edit:

Your PDF document can't be opened (here).
Well after searching a lot, i found that this is an oddball LCD with a non standard 16 pin connector.
This connector starts with 16, 15, 1, 2, 3, and so on FROM RIGHT TO LEFT.

So back to start.. :frowning:

Well after searching a lot, i found that this is an oddball LCD with a non standard 16 pin connector.

Almost all of the LCD modules with the contacts at the lower left of the display have a non-standard pinout, and there are several variations as well.

Don

I think is a faulty lcd so I have ordered a new one. at ebay there are a lot starting from $3 so I just have to wait to be delivered (almost a month).

Same problem occurred me it has solve by common GND. Before I use two power source then use same power.