LCD Troubles...

I picked up a LCD - JHD162A - 16 pins

however i'm unable to get it to work. I've tried both libraries - the standard one as well as the lcd4bit one. I'm able to download the program but the display doesnt change. It looks the same like it does when the lcd powers up. Now how do i troubleshoot this? I've connected only 4 pins, should i try the other 4 pins(DB0-DB3) as well?

:-/

Now i've tried using all 8 pins(DB0-DB7) still it doesnt work. How do i check this?

Can you show us how you have it wired and what code you are using to test it. Also a better description of what does and does not work would help. Don't forget to adjust the contrast.

Have you wired the contrast pot up and adjusted it?

If not you probably cant see anything at all.

Thanks a ton guys.

No, I haven't wired contrast up. I have 2 pins for contrast led+ an a led- now i coudn't find any instructions on how to wire it up for 2 pins. Also i presumed that since i was able to see black boxes in the display that the contrast was ok. please let me know how to wire this up? In the meanwhile i will rewire the setup and take a picture to be posted here(i took off the whole thing after a frustrating 2 hrs!)

Now i figured out the other 2 pins and connected... Voila it works but then prints wrong characters! lol...

"Hello" is printed as "Jgnno" here is more for reference

lcd.print("Hello");
//Jgnno
lcd.print("World");
//Wornf
// lcd.print("ABCDEFGHIJKLMNOP");
//CBCFGFGJKNONOR

Should i do some character mapping or something? and how do i get to print on the second line? :-X

I think your DB5 (DB1?) line is not wired securely/properly.

To print on the second line, I use:

lcd.setCursor(0, 1); // Column 0, row 1 (LiquidCrystal Library)

Mikal

ok i rewired the whole stuff and it works! Yay! but can you explain how you figured out it was DB5(DB1)? what are these for? just curious... ::slight_smile:

Hi Dummy,

Using an ASCII table is a great way to debug LCD 8-bit data communication.

Note that the second bit from the right changes:
"H" 01001000
"J" 01001010

-Mike

Quite right, Mike.

I noticed that in every case the unexpected character differed from the correct value by +2, leading me to suspect that the next-to-low-order bit was faulty. I guessed it was probably DB1 (or DB5 in the 4-wire case), but was too lazy to verify by reading the docs. So I just threw it out there, making it seem like like I possessed some special power to diagnose problems in HW I haven't even seen! :smiley:

Richard Feynman tells the amusing boyhood story of a neighbor who had a problem with his radio. Young Feynman thought for a few minutes about the unusual symptoms, and concluded that two of the vacuum tubes must have been switched during construction. After swapping them fixed the problem, the man exclaimed to everyone, "that kid fixes stuff jus' by thinkin'!" :slight_smile:

Mikal

If you wire it back the way it was then you have a (simple and not too secure) code engine :stuck_out_tongue:

Great Everyone! Good Learning.. After all these years i get to see the importance of bits in play! now the value of a bit makes much more realistic sense (whoever a 0 or 1 could mean so much difference) :wink:
more to gain from here...