16*2 LCD not working.

hey guys,
i cant get the lcd to work.
i checked the pin nos on the back side, so numbering are fine acc to me.
on the board, rightmost is gnd, and left is 5v.
i have jhd 162a.

CODE::

#include <LiquidCrystal.h>
void setup()
{
//LiquidCrystal(rs, rw, enable, d4, d5, d6, d7)
LiquidCrystal lcd(12,11,10,5,4,3,2);

lcd.begin(16,2);
lcd.clear();
lcd.setCursor(0,1);
lcd.print(“Hello!!”);
lcd.display();
}

void loop()
{
}


This maybe a silly question but how are those wires connected to the screen? In the pic it kinda looks like they're just loose in the solder holes. (if there's not a good connection obviously it won't work)

Also have you tried adjusting the pot? The screen looks very bright (maight just be the photo)

^^ yes i used jumper wires to plug the pins into the brad board. i checked the connections using the multimeter, the data pins are fine, 5v and gnd and the contrast r fine as well. pardon me but im totally a newbie, started just 2 days ago.

You should solder pins to the display board, and then put it in the breadboard. The potmeter is not correct wired. It has 3 pins and you need to use 3 pins for this to work. You have connected the center pin, and one other pin (i'm guessing it is connected to 5 volts). So the output of the potmeter is the same as the input.

So i connected the middle pin to the lcd, others to 5v and gnd. now i get black boxes on one row. and now i can change contrast of the boxes via the pot. Now wats wrong ?

Like MAS3 says you should solder the connections, just using the through holes are going to lead to intermittent problems. Usually people use a pin header, that way it's easy to plug into a breadboard.

Now wats wrong ?

Your LCD controller is not being properly initialized.

As others have said, you must have solid reliable contacts for the data and control signals. Any discontinuity on any of the leads for even a fraction of a second will mess up the communication between the Arduino and the LCD controller.

Don