problem with the arduino shield lcd

i bought the arduino lcd shield , when i connect it it lights up and at first when i tried different codes it would turn on and off then nothing happens and now it just lights up , what should i do ???????

what should i do ???????

Start by reading the very first post in the 'Displays' section called "How to use this forum - please read."

i bought the arduino lcd shield

Which one? There are lots of them. Don't forget to include links to the product page and to the data sheet.

when i tried different codes

It would help if we could see them.

Don

Arduino Shield "LCD Keypad Shield" [ARDUINO.SH.LCD1602.KEYPA] The product page : http://ram-e-shop.com/oscmax/catalog/product_info.php?cPath=243&products_id=2595 The data sheet : http://www.ram-e-shop.com/ds/general/Shield_LCD1602.pdf

I placed the shield on the arduino then connected it with USB , then tried the ( Hello world ) from the examples and the screen on lights up and nothing happens . Also the code from the data sheet above didn't work .

tried the ( Hello world ) from the examples

My crystal ball is out of commission so you will have to provide more information about the code that didn't work.

Don

What model arduino are you using?

Post the actual sketch (code) that you are running, and tell us what happens when you try to run this sketch. When you say nothing happens, do you mean the code runs but nothing on the LCD shows up?

Hello world code , when i uploaded it nothing appeared on the lcd
 
[code]
// include the library code:
#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);
}

[/code]

What Arduino model are you using, as it makes a huge difference?

arduinodlb: What Arduino model are you using, as it makes a huge difference?

Arduino Shield "LCD Keypad Shield" [ARDUINO.SH.LCD1602.KEYPA]

Not the shield model (although that is helpful information), the Arduino model.

Arduino Uno, Due, Mega, Mega R3, etc....?

arduinodlb: Not the shield model (although that is helpful information), the Arduino model.

Arduino Uno, Due, Mega, Mega R3, etc....?

arduino uno

Have you done the wiring as per this diagram?

http://arduino.cc/en/Tutorial/LiquidCrystal

If not, you will need to change the pin numbers in your:

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

line to match the wiring you have done.

The LCD constructor as written takes:

LiquidCrystal lcd(RS, En, D4, D5, D6, D7);

And in the tutorial, this means: * LCD RS pin to digital pin 12 * LCD Enable pin to digital pin 11 * LCD D4 pin to digital pin 5 * LCD D5 pin to digital pin 4 * LCD D6 pin to digital pin 3 * LCD D7 pin to digital pin 2

You may be wired up differently.

The include file you are using are the original file from the Arduino implementation.
According to the RAM Electronics description they use D4-D7, D8 and D9 for the LCD, but they don’t
say which signals they carry. You are going to change the Digital Port numbers in :
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
to reflect the correct ports. A schematic of the LCD keypad shield would be handy.
I would give it a try by using these lines:
LiquidCrystal lcd(9,8,7, 6, 5, 4); or LiquidCrystal lcd(8, 9, 7, 6, 5, 4);
If the LCD shows some rubbish, the try swopping the last 4 digits to 4, 5, 6, 7.

Did you try tweaking the contrast pot on the shield? Do you see anything on the screen when it is powered up? The first row should be full of white blocks. If you can't see the blocks it most likely means that your contrast isn't set correctly.

You have to have the correct pin numbers I just found this the same forum :

Arduino UNO with LCD 2x16. Weird characters after some time in operation dated september 4'th 2013

Almost the same shield : ARDLCD216 Display shield (Factory assembled)

LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

I would try this setup.

Pin numbers don't matter when he doesn't even see the row of blocks any uninitialized HD47780 display will show when it is first powered up. My bet is on contrast not being set correctly.

We really can't do much more until we establish whether the contrast is adjusted properly as outlined in reply #13.

On the other hand: From reply #10

Have you done the wiring as per this diagram? http://arduino.cc/en/Tutorial/LiquidCrystal If not, you will need to change the pin numbers in your: LiquidCrystal lcd(12, 11, 5, 4, 3, 2); line to match the wiring you have done.

He has not done the wiring as per that diagram because he is using a shield. This means that the numbers in the constructor have to match the wiring that was done by the perpetrator of the shield.

My opinion is that the values given in reply # 13 are probably correct. His documentation mentions the same pin numbers so his shield is likely have the same configuration. Here's the DFRobot schematic for a similar, if not identical, shield --> http://www.dfrobot.com/image/data/DFR0009/DFR0009SCH01.pdf

Don

Thank you ffur!!! Your suggestion to change the pins assignments to:

LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

worked perfectly!

:)