0

LCD not working.
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

LCD not working.

by TheFool on Tue Apr 15, 2008 11:44 pm

I tried following your LCD tutorial and have been having no luck. i have the exact same lcd that was used in the tutorial and i believe i have wired everything correctly (rewired from scratch 4 times now) but I am still not able to get the code to do anything.

When I power up the LCD I see the boxes as shown in your pictures. And when I run the code that is still the only thing I see. I tried a simple case of just asserting 0 on D4-D7 as well as RS for a clear and still nothing. All I get are the boxes. Any ideas as to what could be wrong?

I would be happy to post more information if anyone thinks they can help. Also if there is a way to post pictures of it I can take pictures so someone can see my circuit.
TheFool
 
Posts: 3
Joined: Tue Apr 15, 2008 11:38 pm

by mtbf0 on Wed Apr 16, 2008 4:09 am

you need to adjust the contrast on the lcd.

i'm not familiar with the tutorial you're using, but you ought to have a 10k ohm pot connected between ground and pin3 of the lcd. the pot will have 3 pins. wire one of the end pins to ground and the middle to pin 3.

uh, assume you're using an hd44780 based character lcd.
User avatar
mtbf0
 
Posts: 1645
Joined: Sat Nov 10, 2007 12:59 am
Location: oakland ca

by TheFool on Wed Apr 16, 2008 7:54 am

Hey, thanks for the reply. I am actually using a potentiometer (not a 10k couldn't find one lying around, this one is a lot bigger) and am able to adjust the contrast. I can go from really dark blocks to really light/non-existing blocks (using the first 1/8 of the pot), thats about it...

Do you think that the potentiometer might be the problem? As far as I can tell all it does is adjust the current going to the LCD causing the individual dots to get brighter/dimmer. I don't think it adjusts contrast between lit segments. Please correct me if I am wrong and I will order a 10k pot.

And yep, it is hd44780 based.
TheFool
 
Posts: 3
Joined: Tue Apr 15, 2008 11:38 pm

by mtbf0 on Wed Apr 16, 2008 8:36 am

adjust to where the black blocks are barely visible. at that point you should be able to see if you're actually getting something to the display. once you know you're getting something to display you can adjust further to get rid of the blocks.

if the display is not backlit, make sure you have good light.

pin 5, the r/w line, should connect to ground. probably.

if your using 4 data lines they should be 11-14, not 7-10, with pin 11 being the lsb.

if you're still not seeing anything you could post a picture, (extra credit for in focus and well lit but not washed out), and your code.

i assume you're using code that's worked for someone else, but timing, (especially during initialization), on those little buggers can be tricky. timing is less critical if you're using the r/w pin, but most folks don't want to sacrifice another i/o on their arduino.

that's all i got.
User avatar
mtbf0
 
Posts: 1645
Joined: Sat Nov 10, 2007 12:59 am
Location: oakland ca

by TheFool on Thu Apr 17, 2008 6:41 pm

Thanks for the help everyone.

It seems
As far as I can tell all it does is adjust the current going to the LCD causing the individual dots to get brighter/dimmer. I don't think it adjusts contrast between lit segments. Please correct me if I am wrong and I will order a 10k pot.
was inaccurate. By turning down the contrast so I can barely see the blocks I was able to get it to show up properly. This was very difficult to do because I had a 200k pot and thats it...

Anyways
adjust to where the black blocks are barely visible. at that point you should be able to see if you're actually getting something to the display. once you know you're getting something to display you can adjust further to get rid of the blocks.
was the advice that saved me. And the suggestion to take pictures resulted in me having a much cleaner circuit (rewired the whole thing cleanly so that I could get a picture that actually allowed someone to see where stuff is going to).

So once again thanks.
TheFool
 
Posts: 3
Joined: Tue Apr 15, 2008 11:38 pm

what's the LSB mean in the pinout?

by crmjolnir on Sat May 24, 2008 9:18 pm

I am having a similar looking trouble using a different LCD module (GB-1494-V-O) with this putative pinout (see below)...

I get just the 8 blocks of "all dark".

can you explain what LSB/MSB means?
because I don't even have pin 7 (LSB?) connected... since i have tried to use DB 4-7.

thanks a lot.
C

-------
Pin number Symbol Level I/O Function
1 Vss - - Power supply (GND)
2 Vcc - - Power supply (+5V)
3 Vee - - Contrast adjust
4 RS 0/1 I 0 = Instruction input
1 = Data input
5 R/W 0/1 I 0 = Write to LCD module
1 = Read from LCD module
6 E 1, 1-->0 I Enable signal
7 DB0 0/1 I/O Data bus line 0 (LSB)
8 DB1 0/1 I/O Data bus line 1
9 DB2 0/1 I/O Data bus line 2
10 DB3 0/1 I/O Data bus line 3
11 DB4 0/1 I/O Data bus line 4
12 DB5 0/1 I/O Data bus line 5
13 DB6 0/1 I/O Data bus line 6
14 DB7 0/1 I/O Data bus line 7 (MSB)


(Taken from http://www.hardforum.com/showthread.php?t=861112)
crmjolnir
 
Posts: 3
Joined: Sat May 24, 2008 9:08 pm

Re: what's the LSB mean in the pinout?

by mtbf0 on Sat May 24, 2008 9:45 pm

crmjolnir wrote:can you explain what LSB/MSB means?


least significant bit/most significant bit.

what have you got hooked up to the contrast adjust? a 10k pot is the usual choice. if the blocks are black you will not be able to see characters. adjust the contrast to where the blocks are very faint but still visible. that way you will be able to see characters if and when you get any to display. once you get your firmware squared away you can finish adjusting the contrast to your liking.

another good idea is to make sure you have good light available.
User avatar
mtbf0
 
Posts: 1645
Joined: Sat Nov 10, 2007 12:59 am
Location: oakland ca

by crmjolnir on Mon May 26, 2008 2:57 pm

thanks for the "bits" info.

I have a 10k pot and the contrast is adjustable from "nothing" to "all black", but i still do not see any text while i adjust the pot (slowly, in either direction).

I have a bright desk lamp to see by.

Also, upon power up (with full contrast), I only see 8 characters light up (not 16), which is different from the pic in the adafruit HOWTO.


RE: wiring... you mentioned previously "if your using 4 data lines they should be 11-14, not 7-10, with pin 11 being the lsb."

According to my pinout, if i wire as in the HOWTO, then i don't have LSB connected at all (just DB4 to DB7).

Thanks again
crmjolnir
 
Posts: 3
Joined: Sat May 24, 2008 9:08 pm

by mtbf0 on Mon May 26, 2008 7:07 pm

crmjolnir wrote:RE: wiring... you mentioned previously "if your using 4 data lines they should be 11-14, not 7-10, with pin 11 being the lsb."

According to my pinout, if i wire as in the HOWTO, then i don't have LSB connected at all (just DB4 to DB7).


well lsb and msb are relative. with a four bit interface you start with sending the least significant nybble, bits of which are more or less significant than one another but one of which is, indeed, the least significant bit of all.

anyway, is this known good hardware? what code are you running? timing on lcds can be very tricky. not all hd44780 compatible controllers have the same timing. longer waits will never hurt.

if you do not have the contrast adjusted it is possible to get your software working and not know it, so adjust the contrast like i said.

i've been known to put leds on all the lines to the lcd and put long waits in my code so i could see what's happening. it can help to get things going, but you can break the code when you start taking waits out.

lcds are a pain in the tookus.
User avatar
mtbf0
 
Posts: 1645
Joined: Sat Nov 10, 2007 12:59 am
Location: oakland ca

by crmjolnir on Tue May 27, 2008 12:57 am

I am using the LCD4BitExample that comes with the library. (http://www.arduino.cc/playground/upload ... ibrary.zip)

What "waits" are you referring to ? the delays between words/messages written to the LCD? or are you referring to something in the library?

The hardware isn't brand new, it's a pull from an old HP laserjet III. I have a few others to harvest, but i will boot up the printers to see what i can see before i make any extractions next time.

I will give the LED indicators a try too.

ultimately, i think i have to buy a new one just to prove to myself that my wiring was OK.


Thanks again for all this fast feedback.
chris
crmjolnir
 
Posts: 3
Joined: Sat May 24, 2008 9:08 pm

Please be positive and constructive with your questions and comments.