Go Down

Topic: LCD with shield and without shield question (Read 843 times) previous topic - next topic

Hello, simple question:

I have an LCD with shield, that i put on top of my Uno Rev3, it worked at 1st try. Perfect.
Now i have an LCD without shield,exactly equal to this one:
http://arduino.cc/en/Tutorial/LiquidCrystal

i did all the wire work with the potenciometer and i have light on the lcd but any text.

My question is:  Is the code equal with or without shield version?  I am talking about simple functinos like "hello word", of course my shield has buttons, the one without will not do that... but i talking about simple text funcion, does it work the same way??
I read somewhere that i would need to change some i2c address ?!

Thank you

floresta

Quote
My question is:  Is the code equal with or without shield version?  I am talking about simple functinos like "hello word", of course my shield has buttons, the one without will not do that... but i talking about simple text funcion, does it work the same way??
I read somewhere that i would need to change some i2c address ?!

The only way that you can possibly get an accurate answer is if you provide us information that will positively and unambiguously identify exactly which shield and which 'LCD without shield' you have.

I can say that if your shield uses I2C and your 'LCD without shield' uses the 14-pin parallel interface then the answer is no.


Don

Ok, here it goes:

LCD only, no shield, is this one:
http://dx.com/p/16-x-2-character-lcd-display-module-with-blue-backlight-121356

LCD with Shield, is this one:
http://dx.com/p/lcd-keypad-shield-for-arduino-duemilanove-lcd-1602-118059

Thank you

floresta

OK.  That shield does not have any kind of serial interface and it uses the standard LiquidCrystal library.  You will be able to use your 'LCD without shield' with the same code as long as you wire it up with the six lines (RS,E,D4,D5,D6, and D7) going to the same Arduino pins as they do on the shield.  Take a look at the first customer review on your second link.  The alternative would be to use the same wiring as in the Tutorial, or use any other combination of I/O pins that you care to,  and change the LiquidCrystal lcd(...) statement to match.

Don't forget to deal with the backlight wiring.


Don

Thanks Don !! I didn't notice that, i will try that.
thanks a lot for the suport!

Don,
my english sorry, i will try to explain:

- i am allready using the sequence LiquidCrystal lcd(8, 9, 4, 5, 6, 7)   for the LCD with shield this one:
http://dx.com/p/lcd-keypad-shield-for-arduino-duemilanove-lcd-1602-118059

- in the no shiled lcd this one:
http://dx.com/p/16-x-2-character-lcd-display-module-with-blue-backlight-121356
i now have image (blue) but no letters, only backgroung, look like the potentiometer is set to no contrast.

So what i did was go to the with shiled and set it to no contrast in potentiometer, and the image i got is the same that in the no shiled version, excatly the same, blue background but no letters or numbers. The code is fine i am sure and the version with shield prints "hello world" ok.

So i looked into the potentiometer i have and it says:  W-50K 8009ER...  instrutions say it must be a 10K, could this be the problem ??


floresta

Quote
My question is:  Is the code equal with or without shield version?

That depends on how you connect your LCD to your Arduino.  You must make sure that the numbers in the LiquidCrystal lcd (x, x, x, x, x, x) statement match the connections between your LCD and your Arduino.

It would have been a lot clearer if the perpetrators of the tutorial had included at least a few more comments:


Code: [Select]

//LiquidCrystal lcd(RS, E, D4, D5, D6, D7);
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);      // put your pin numbers here

In the example above the LCD RS pin goes to the Arduino D7 pin, The LCD E pin goes to the Arduino D8 pin, etc.

Code: [Select]
//LiquidCrystal lcd(RS, E, D4, D5, D6, D7);
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);      // put your pin numbers here

On your shield the LCD RS pin goes to the Arduino D8 pin, the LCD E pin goes to the Arduino D9 pin, etc.

Code: [Select]
//LiquidCrystal lcd(RS, E, D4, D5, D6, D7);
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);      // put your pin numbers here

In the tutorial the LCD RS pin goes to he Arduino D12 pin, the LCD E pin goes to the Arduino D11 pin, etc.

It really doesn't matter which Arduino pins you use as long as the connections and the LiquidCrystal led() contents match.  This means that you can use the same code with and without the shield if your LCD to Arduino connections match those on the shield.  

It is much easier, however, to connect the wires so they are easy to follow or so they do not conflict with other devices you have connected to the Arduino, and adjust the code to match.  This is essentially what they did when they designed the pc board for the shield.


Quote
So i looked into the potentiometer i have and it says:  W-50K 8009ER...  instrutions say it must be a 10K, could this be the problem ??

That is a 50K potentiometer and it should work correctly as long as you have connected it correctly.  With just the backlight, the power, and the potentiometer connected (LCD pins 1, 2, 3, 15, and 16) you should be able to see blocks on the LCD with the potentiometer at one end and a blank screen with it set at the other end.  The correct setting is when you can just barely see a line of blocks on the top row.

YES !!
it worked,
it was the pin sequence, it must be LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
Thank you so much Don !!!!

Go Up