16x2 lcd

i m trying to interface LCD with arduino leonardo..
but lcd doesn't write anything on the screen.
i checked my connection.they are properly done.
i upload this program...
#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);
}
this program shows nothing on lcd.
i checked voltage on each pin.
i found that enable pin which is pin no. 11 of arduino has always 0V.
is this causes problem to write data on lcd?
and i m using 1K variable instead of 10K..is this a problem?

Most spec sheets I read online about these displays require 2K to 20K potentiometers but 1K might be fine if you can see black boxes. Did you see black boxes on the display if you turn the potentiometer?

i checked my connection.they are properly done.

Where have I seen that before???

this program shows nothing on lcd.

What do you mean by 'nothing'?

i checked voltage on each pin.
i found that enable pin which is pin no. 11 of arduino has always 0V.
is this causes problem to write data on lcd? [/quote]
A voltmeter will tell you nothing here, you need a logic analyzer or an oscilloscope to get any meaningful information.

and i m using 1K variable instead of 10K..is this a problem?

This will work fine as far as the LCD is concerned. You are, however, drawing 10 times the current from your power supply which could cause a problem. Your voltmeter will give meaningful information here.

Don

i can see only this on lcd....(image is below)

lcd writes data when enable pin receives high to low pulse.....
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
in this syntax 11 no. pin is connected to enable pin of lcd...
but i noticed this pin remains low..means at 0V...
is this a problem due to which lcd displays no letters..?

i can see only this on lcd....(image is below)

That means the device is getting powered up, has the right contrast, but not correctly initialized.

The LCD looks decent so now where is the other side of the connection?

lcd writes data when enable pin receives high to low pulse.....

That is not correct. It is the microcontroller that is writing the data, the LCD is receiving data. This does indeed occur on the falling edge of the enable pulse but only if you have observed all of the other timing requirements.

but i noticed this pin remains low..means at 0V...

How did you determine this?

You appear to have the power and contrast set up correctly. To figure out why your LCD is not being properly initialized we will need a clear (in focus) photograph showing both ends of all of the wires that connect between your Arduino and your LCD module.

Don

thank u so much...
it works fine now...

Well done Don, the thought of a photograph cured it :slight_smile: