can never get a LCD to work with UNO

the example on page 366

says LiquidCrystal lcd (12, 11, 5, 4, 3, 2); and thats what i have been using so far ...and wiring ties up with this setup but dont work ...

this is it ,pretty standard in all sources with pin numbers as shown

// include the library 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);
}

and from the book on page 366....

/*
LiquidCrystal Library - Hello World

Demonstrates the use of a 16 × 2 LCD display.

*/

#include <LiquidCrystal.h> // include the library code

//constants for the number of rows and columns in the LCD
const int numRows = 2;
const int numCols = 16;

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

void setup()
{
lcd.begin(numCols, numRows);
lcd.print("hello, world!"); // Print a message to the LCD.
}

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);
}

And now as Don mentioned in reply #7 we need a clear in focus photo
that is clear enough to show how everything is wired.

BTW, you have soldered the wires to the LCD module right?

--- bill

There was one time I shared apartment with a law school student. We were not happy we didn't get our deposit back and consulted some campus legal consul. The legal consul mentioned a legal term to us but was too quick. I was gonna ask him again how that term is written when my law school student roommate stopped me, saying, "Don't bother asking. That's all on the book!" Which book? I don't his book! I don't have your book let alone page 366. Can you understand English, such as post pictures? I hope your book has a section where ot teaches you how to ask for help on our forum.

the prog i used is on page 366 of the arduino cookbook as thats recent and tried and tested i presume by michael margolis who wrote it

I haven't seen him around for a long time, but he popped up in the Project Guidance section just a few days ago. Maybe his ears will start burning and he will join us.

I don't have your book let alone page 366.

Neither do I.

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

We need the photograph to see if you did this properly.

BTW, you have soldered the wires to the LCD module right?

And we need it to check this, not only the presence of solder but also the absence of cold solder joints.

lcd chip is the HD44780 standard controller .

This reminds me that a link the datasheet for the LCD module would help us also. Although the controller on the LCD module is standard the LCD module pinout is frequently, but not always standard. The fact that you are using 'Sparkfun LCDs doesn't help because at any given time they may have several for sale and the ones they have today may not be the same as the ones you got from them yesterday.

Don

Has anyone else noticed that we haven't even gotten to step 1 of the troubleshooting because we still don't have the basic information we need.

(1) Get the backlight (if there is a backlight) working properly.
(2) Get the contrast set properly.
(3) Connect the Arduino properly.
etc.

Don

66knuckles, there are multiple versions of Michaels book so just saying page 366 or the
Arduino Cookbook is not good enough.
It is the 2nd edition.

With embedded s/w which involves manipulating hardware it all about the details.
So far you are not providing enough accurate detailed information for anyone to be able
to detect what you have done. Which makes it impossible for a "second set of eyes"
to see any mistakes. We are not there so we can't see what you see so you must provide
all the information. Think of it this way. If we were to reproduce EXACTLY what you have
at our location, how could we do that with 100% certainty? The 100% part is crucial.
The only way that there can be 100% certainty is to provide the exact code that is running
and visual information of your exact hardware rather than written information which is subject to error.
That is why we need a photograph of your lcd wiring as well as information for the exact
LCD module you are using.

Anything else and were stuck guessing, which is wasting time.

Michael presented very good and detailed 3 pages of how to wire it up and get it working,
including a sample sketch (as shown in reply #26) and even a really nice wiring diagram on page 365
(attached) and some debugging information in the section.
The one thing that Michaeal forgot mention as it would seem to be obvious
is that the connections to the LCD module must be soldered.

--- bill

floresta:
Has anyone else noticed that we haven't even gotten to step 1 of the troubleshooting because we still don't have the basic information we need.

(1) Get the backlight (if there is a backlight) working properly.
(2) Get the contrast set properly.
(3) Connect the Arduino properly.
etc.

Don

I second you there. The OP is more likely just venting out his frustration than getting help. I see this type of students right near semester ends like clockwork.

Michael presented very good and detailed 3 pages of how to wire it up and get it working,
including a sample sketch (as shown in reply #26) and even a really nice wiring diagram on page 365
(attached) and some debugging information in the section.

I see a potentially big problem with that really nice wiring diagram.

(1) There aren't very many LCD modules out there (at least I haven't run into any) with the row of terminals at the lower right.
(2) There are some, but not very many, LCD modules with pin 1 near the center and pin 14 (or 16) near the edge of the pc board.

Since most LCD modules seem to have the terminals at the upper left it is quite possible that his display was simply rotated 180 degrees to match the diagram and then connected exactly backwards by following the diagram, especially if the display has no pin numbers, if the pin numbers are on the bottom, or if the user didn't realize their significance. In that case the backlight works but nothing else will work, especially if any smoke comes out.

Don

floresta:
]There is nothing in the original post that mentions anything specific about the LCD that he is using or the code that he is trying to run it with. I don't see any mention about whether he is or is not using a shield as the word 'shield' appears nowhere in the post.

Yes there is. He said with a startling clarity that only bad punctuation can provide

".ive used sample progs from tronixstuff..... "

Now, how clear is that?

Your reading skills might be a bit limited, but you only had to stagger to the second line. I made an assumption that he is not using the freetronics shield, for which the tronixstuff code was written, hence his problem. I guess you had difficulty reading my posts as well, but I had the same problem, with the same code for the same reason, hence my posting a solution - which worked for me.

NickPyner:

floresta:
]There is nothing in the original post that mentions anything specific about the LCD that he is using or the code that he is trying to run it with. I don't see any mention about whether he is or is not using a shield as the word 'shield' appears nowhere in the post.

Yes there is. He said with a startling clarity that only bad punctuation can provide

".ive used sample progs from tronixstuff..... "

Now, how clear is that?

Your reading skills might be a bit limited, but you only had to stagger to the second line. I made an assumption that he is not using the freetronics shield, for which the tronixstuff code was written, hence his problem. I guess you had difficulty reading my posts as well, but I had the same problem, with the same code for the same reason, hence my posting a solution - which worked for me.

Stop pretending you know how to help out this case or defending your own nonsense. You really should not be lingering here anymore. I am recommending to the admins to remove your posting rights. If you keep spilling nonsense, they might just take my suggestion.

This thread seems to be spiraling out of control. How hard is it to get an LCD working?

@knuckles: Please post a link to the exact LCD you are using. Sparkfun sell more than one. Then post a photo of how you have wired it, clear enough that we can follow the wires. Then post the code you are using, inside code tags.

@everyone else: give the insults a rest please

else: I will lock this thread.

Stop pretending ...

That's a little extreme. The guy was just trying to help.

Short summary:
Some OP started the thread venting frustration with LCD, little info was provided.
Some jumped in trying to help. Some gave reasonable suggestion and the rest total nonsense.
OP was not responding to reasonable suggestion and nonsense givers defending nonsense while nobody is really interested in attacking.
I jumped in just to make sure the reasonable suggestion is mentioned again with a fresh face. No response and nonsense just escalates.

If I may vote, I'd vote deleting this post. It is no use to the OP, not to anyone else seeking help. No one needs to defend themselves anymore from invisible attackers.

dhenry:

Stop pretending ...

That's a little extreme. The guy was just trying to help.

Apology to you. Some subtlety is lost in translation.

the rest total nonsense....nonsense givers defending nonsense...I jumped in just to make sure the reasonable suggestion is mentioned again with a fresh face...nonsense just escalates.

You probably need to realize that the fact you think something is non-sense or reasonable doesn't make that something non-sense or reasonable.

No matter how justified or intelligent you think you are, you are not the final arbiter of truth, or reasonableness, or anything else for that matter.

Thread locked. - Moderator


@OP (knuckles): start a new thread please, describing your problem in detail.

Post a link to the exact LCD you are using.

Post a photo of your connections. A clear photo.

Post the code you are using, inside code tags.

Thanks.

In response to a personal message I repeat a reply above (#33) which could well solve your problem.

I see a potentially big problem with that really nice wiring diagram.

(1) There aren't very many LCD modules out there (at least I haven't run into any) with the row of terminals at the lower right.
(2) There are some, but not very many, LCD modules with pin 1 near the center and pin 14 (or 16) near the edge of the pc board.

Since most LCD modules seem to have the terminals at the upper left it is quite possible that his display was simply rotated 180 degrees to match the diagram and then connected exactly backwards by following the diagram, especially if the display has no pin numbers, if the pin numbers are on the bottom, or if the user didn't realize their significance. In that case the backlight works but nothing else will work, especially if any smoke comes out.

Don

I regret having to lock the thread, but honestly ...