Pages: 1 2 [3]   Go Down
Author Topic: LCD help  (Read 2998 times)
0 Members and 1 Guest are viewing this topic.
tytower
Guest
 Bigger Bigger  Smaller Smaller  Reset Reset

Areyou sure you have the numbers right on the LCD ? not reversed
Logged

Spokane, Washington
Offline Offline
God Member
*****
Karma: 1
Posts: 686
My name is Bob, and I'm an addict.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The diagram looks like it should work fine with the sketch you first provided.

But yeah.. I would check to make sure you don't have it hooked up backwards.  My two LCD's confuse me quite often as they have a different setup.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 83
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I did check the pins, they are labeled 1 and 16.
On the back of the LCD there is a simple diagram setup to show you what pin is which.

At this point I really think it's the LCD. Since they are rather cheap I may order two or three more.

http://www.adafruit.com/index.php?main_page=product_info&cPath=37&products_id=181
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 39
Posts: 4383
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Don't forget to let us know the outcome.

Don
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello again,

I played a bit more with compile, then upload.  upload definitely seems to compile first, followed by the upload.  no need to press 'compile/verify', then 'upload'.  Watch the subfolder using Windows Explorer and you can see the files being created.

well, now hello world is not working properly.  I can't get anything to show on lines 2 or 3 of my 4x20 display, and the boxes on rows 0 and 1, columns 8 thru 12, stay fully lit, like they are getting several characters at once.

I've tried pulling out each wire, one at a time, to see what a bad connection of each line would look like.  none of the wires will make this happen.  I'm wired up according to vampist's diagram.

I'm downloading a fresh copy of 0017.zip right now, I'll try again later with a pristine copy.

Rich.
Logged

tytower
Guest
 Bigger Bigger  Smaller Smaller  Reset Reset

Here are some of my lines running for my application . This may help out -especially the setup lines

lcd.begin(16,2);  for a 2line display-16,4 for a 4 liner?
  delay(500);
  lcd.clear();
  delay(1000);  
  lcd.print(F);
  lcd.setCursor(7,0);
  tempC=tempC*10;
  val=(int)tempC;
  lcdprintTenths(val);
  lcd.print("C");
  lcd.setCursor(13,0);
  lcd.print(reading0);
  lcd.setCursor(0,1);     // Next Row, Col then row , must start at 0,0
  lcd.print(L);
  lcd.setCursor(8,1);
  lcd.print(percent);
  lcd.print("%");
  lcd.setCursor(13,1);
  lcd.print(reading5);
  delay(4000);
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

a pristine copy of 0017.zip did not help.

If I print to rows 0 and 1, and stay within about columns 0 to 7, then I don't get the fully lit up blocks in columns 8 to 13.

I copied and pasted the sample code, it had some undefined stuff.  I commented out the undefined code, and it showed me that staying within column 7 helps.

Rich.

Rich.
Logged

Spokane, Washington
Offline Offline
God Member
*****
Karma: 1
Posts: 686
My name is Bob, and I'm an addict.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@Rich, I've gotten the same results, but only when I set the lcd.begin incorrectly.

Try using lcd.begin(20, 4);
or
lcd.begin(4, 20);  I can't recall which it is smiley

Another thing to check is loose wires, if you have a semi-good connection, you can get some weird behaviors. Make sure if it's on a breadboard it's a solid connection:P
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I loaded the example, hello world, and changed lcd.begin to both 20,4 and 4,20, same result.  (I think it is supposed to be 20,4.)

I've wiggled every connection, pulled them out and put them back in.  wiggling doesn't seem to do anything, which I think is good.

Is there a ctrl-alt-del for the lcd display?  I feel like it need a good reboot to clear out previous uploads?  I've done the upload, and then pulled the usb plug, and then reinserted the usb plug, for a power up of the display, no change.

Rich.
Logged

tytower
Guest
 Bigger Bigger  Smaller Smaller  Reset Reset

You need to read a bit more.
Of course it is 20,4 and reading the references is where you get that info

My lines above were just to prompt you to look at your sketch and make sure you have the
begin()
clear()
print()
setCursor()

functions set as they should be .
The screen contains no information you need worry about .
When you reset your arduino it resets the screen with the clear() command

You have to tell the cursor where to go for each line and it prints your characters from there. If the string is too long you get all sorts of stuff.

Its like a blackboard- you tell it to start at 0,0 and then next line is 1,0 and so on.

Post the code you have now and we will check it
« Last Edit: November 15, 2009, 09:27:15 pm by tytower » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I need to read lot's more!  This is neat stuff, and getting some experience is definitely needed.

For my code, I opened File, Examples, LiquidCrystal, HelloWorld and changed the begin from 16,2 to 20,4.  The example doesn't use clear().

It's possible that the example doesn't work right, because I may have damaged the LCD?

After I got hello world to work on saturday, I then loaded the Dallas Temperature Control library and One Wire.  

I've started a new topic with my questions on One Wire.
Thanks, Rich.
« Last Edit: November 16, 2009, 01:17:32 pm by 1999-1200S » Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 83
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well for anyone that is interested the new LCD came in today.
(contacted adafruit and they gave me a new one)

My jumper wires also came in a few days ago so setup was a snap.

I soldered the lcd pins, snapped it into a bread board. Programmed the arduino. Plugged in the wires.
aaaaaannnnnnnnnnddddddd

I get "hello, world!" Woohoo! smiley-grin

Thank you everyone for all your help with troubleshooting this problem.
Logged

Pages: 1 2 [3]   Go Up
Jump to: