Arduino Mega2560 and the LCD Keypad shows only one row blocks.

Hello, i am a noob. But i can communicate with the arduino! proud Than i solder the pins at the LCD keypad from linkspire. I think everything is fine. I controlled it for several times, it looks good. After connecting with the board i got only the upper row with 16 blocks. I controlled the contrast but its fine. There are 16 blocks and i doesn't know why. In the internet/videos it looks in the same way, but it works. The reset, restart, resoldering or other example programs have the same result. :-(

How can help me?

Is this a LCD keypad shield (which means it plugs right on top of your Arduino) ? You mentioned Linkspire (i guess the source of the LCD keypad), but that doesn't trigger Google to find anything Arduino related except for this thread.

You need to find out what pins are connected to the display. Then you need to tell this to your Arduino in your sketch, using a line in setup referred to as a constructor:

LiquidCrystal lcd(8, 9, 4, 5, 6, 7);          // This needs to be set correct for your own LCD

This one is valid from the one i got from DX, and it is different from what's in the examples i found until now.

//LiquidCrystal lcd(RS, E, D4, D5, D6, D7);

How can help me?

You are only going to get guesses until you tell us exactly which hardware and which program you are using.

There is no such thing as 'the' LCD keypad. There are several, made by different manufacturers, and they may or may not be similar. Specifically we have to know which LCD pins are connected to which Arduino pins in order to correctly write the constructor.

Don

Good morning.
As i wrote to you i use an Arduino 2560 Mega and the LCD Keypad from linksprite.
That is all i know! :frowning:
The box with the LCD keypad was empty.
No hint, no plan, no website, no idea.
I googeled the vendor and found this:
http://linksprite.com/wiki/index.php5?title=16_X_2_LCD_Keypad_Shield_for_Arduino#FAQ

I found other videos and they plug the shield together.
https://www.sparkfun.com/videos#all/HxmYbcLiYXk/118
So what can go wrong?

But i see the 16 blocks after USB connecting and hours of hard work :frowning:

After uploading an 16x2 LCD example, nothing happens…

Are you telling us you were incapable of going to the vendor’s website, looking at the test code and finding the
descriptor in the code below ?
Is that what you are telling us when you say “That’s all I know …” ?

#include <LiquidCrystal.h>
#include <LCDKeypad.h>
LiquidCrystal lcd(8, 13, 9, 4, 5, 6, 7);
char msgs[5][16] = {"Right Key OK ",
                    "Up Key OK    ",               
                    "Down Key OK  ",
                    "Left Key OK  ",
                    "Select Key OK" };
int adc_key_val[5] ={50, 200, 400, 600, 800 };
int NUM_KEYS = 5;
int adc_key_in;
int key=-1;
int oldkey=-1;
 
void setup()
{
  lcd.begin(16, 2);
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("     helle! ");
  lcd.print("      welcome!");
  lcd.setCursor(0,1);
  lcd.print("   LinkSprite");
  lcd.print("    LCD Shield");
  delay(1000);
 
  lcd.setCursor(0,0);
  for (char k=0;k<26;k++)
  {
    lcd.scrollDisplayLeft();
    delay(400);
  }
  lcd.clear();
  lcd.setCursor(0,0); 
  lcd.print("ADC key testing"); 
}
void loop()
{
   adc_key_in = analogRead(0);    // read the value from the sensor 
   key = get_key(adc_key_in);  // convert into key press
   if (key != oldkey)   // if keypress is detected
   {
     delay(50);  // wait for debounce time
     adc_key_in = analogRead(0);    // read the value from the sensor 
     key = get_key(adc_key_in);    // convert into key press
     if (key != oldkey)    
     {   
       lcd.setCursor(0, 1);
       oldkey = key;
       if (key >=0)
       {
           lcd.print(msgs[key]);              
       }
     }
   }
   delay(100);
}
// Convert ADC value to key number
int get_key(unsigned int input)
{
    int k;
    for (k = 0; k < NUM_KEYS; k++)
    {
      if (input < adc_key_val[k])
      {
        return k;
      }
    }   
    if (k >= NUM_KEYS)k = -1;  // No valid key pressed
    return k;
}

You did not see this descriptor in the test code ?

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

Is that what you are telling us ?

If there is a language problem here you need to let us know.

1602+LCD+Shield+Sch.pdf (163 KB)

You did not see this descriptor in the test code ?

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

Is that what you are telling us ?

Did you not see that there are other examples with different descriptors making the information on that website ambiguous?

One of those implies that the R/W line is implemented which if correct would explain why any of the constructors with only six entries in the argument would cause his problem.

If there is a language problem here you need to let us know.

Didn't you see that he is from Germany?

Rubbernose: I suggest that you try the 'Minimal Display Example' shown about halfway down the linksprite page. If it doesn't work with the descriptor shown ( LiquidCrystal lcd( 8, 9, 4, 5, 6, 7 ); ) then try it with the descriptor from the other example ( LiquidCrystal lcd(8, 13, 9, 4, 5, 6, 7); ).

Don

Don, Don't you think it would have saved time if he had just given us the link and told us he did not know how to use the information there ?

Rubbernose, Do you understand how to use the descriptor for wiring purposes ? The numbers in the descriptor represent Arduino pin numbers for pins on the lcd.

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

The descriptor pins represent lcd pins(RS, RW ,E, D4,D5,D6,D7). (pin-4,pin-5,pin-6,pin-11,pin-12,pin-13,pin-14)

When you use [u]THIS[/u] descriptor, connect your lcd RW pin (pin-5) to ground.

[b]( LiquidCrystal lcd( 8, 9, 4, 5, 6, 7 ) [/b]

When you use [u]THIS[/u] descriptor, connect the RW pin to Arduino pin -13. LiquidCrystal lcd(8, 13, 9, 4, 5, 6, 7); ok ?

Hello,

i only know that i bought a 2560Mega and the LCD Shield: http://linksprite.com/wiki/index.php5?title=16_X_2_LCD_Keypad_Shield_for_Arduino#FAQ Without any other informations. And this has to fit without welding wires to different pins. It has to work with the same pins like other shields do (i think). The descriptors has to fit (i watched some videos and read some programs and the docus). This shield is made for the arduinos. So i don't understand the problem and why it works today. But sometimes with pressing the "reset" button on the LCD shield and sometimes without (after upload)....

Adding to the ambiguity, the LCD4Bit_mode library provided down below, while it appears to not be used, uses digital pin 11 to control the R/W line.

So there is quite a bit of conflicting information: (in order of appearence on the web page)

  • First exmaple test code uses digital pin 13 for R/W in constructor
  • Schematic shows R/W connected to Ground
  • Pin Definition and Rating implies R/W control not needed (connected to ground)
  • Usage - claims "is very simple to use because it is fully compatible with the Arduino "LiquidCrystal" library" Yet the LiquidCrystal library default pinout is different from the way this board appears to be wired.
  • Minimal Display Example doesn't use R/W in constructor (implies connected to ground)
  • Complex Example doesn't use R/W in constructor (implies connected to ground)
  • Resources LCD4bit_mode code hard codes all the pins including digital pin 11 to control the LCD R/W pin

So from their web page I count 4 different wirings.

On the positive side, this vendor actually has their own support - which is quite rare. Rubbernose, I'd hit them up for some support and for sure take the time to create a trouble ticket to point out some of issues on their web page. You could even point them to this thread since I've listed the biggest issues above. That way things can get fixed and users following behind you can benefit from your experience. Otherwise, if you just get it working for you, somebody else in the future may have work through the same issues again.

--- bill

Rubbernose, it sounds like you soldered the LCD to the shield yourself. Perhaps there are soldering issues. Can you post some clear photos of the shield (both front and back) so we can take a look at the soldering. Make sure to use macro mode so the photos are in focus.

But do make sure to go to their support site and create a trouble ticket about their web page information.

--- bill

Hi Rubbernose.
Your last reply raises more confusion.
Did you ever get the display to work, or are you still trying to without any luck ?

Did you solder the pins yourself, or were they already soldered to the shield ?
This part in your first post let me think you did the soldering yourself, and you misspelled the brand of the shield so that’s why i couldn’t find it).

Rubbernose:
Than i solder the pins at the LCD keypad from linkspire.

If you did solder the pins yourself, are you able to take a photograph and upload or attach it here ?
Maybe we can see some error you are overlooking.

It has to work with the same pins like other shields do (i think).

That is an assumption.
Assumptions are dangerous, you should look things up.
Always have a look at data provided by your source.
If no data is provided, don’t buy it.

But the site you linked to has a lot of data available.
Maybe it’s not really presented the best way, but there is a lot over there.
Edit: I didn’t check to see what others did see: conflicting data, which really doesn’t help.

Last but certainly not least:
If some language barrier might be too large, did you know that this forum also has a German language part (click) where you could also try to find information ?

Here's the Sparkfun (Auth. Linksprite distributor) link for the same product : https://www.sparkfun.com/products/11851 Link to video is on same page. I believe Rubbernose's point is it should be PLUG & PLAY. That raises the question: if the wiring is carved in stone because it is a shield, how can there be different wirings ? From the datasheet the example that matches the schematic should work. Rubbernose, What did you mean about "sometimes" & the RESET button ? Is it working at all ?

Also visible in the pictures over there. Those headers also allow other shields to be placed on top of this product, which doesn't make sense as there is already a piggyback on there (the display) and it would render the whole thing useless.

There's also some datasheet at the Sparkfun page. It tells you this:

datasheet: A0: Buttons (no part of the constructor) D4: LCD bit 4 D5: LCD bit 5 D6: LCD bit 6 D7: LCD bit 7 D8: LCD RS D9: LCD Enable LCD backlight with current limiting, brightness and on/off controllable by D10. (also no part of the constructor)

This should be enough to know how to use the constructor.

i only know that i bought a 2560Mega and the LCD Shield:

The Mega is compatible with most shields designed for the Arduino

Plug and play with any Arduino 'classic' - UNO, duemilanove, diecimilla, etc.

(MEGA NOT LISTED !) RUBBERNOSE, I think your assumption that it would be plug & play with the Mega might be incorrect.

They sold the RS232 shield to me. Together with the LCD keyboard and the mega. I don't know why the RS232 shield doesn't work. I compared the pins, the shield uses exactly the same pins than the mega. By the way.... the LCD keypad doesn't work at the moment. No example works! I get only 16 blocks... The upload is ok. That works perfect in the past! I checked all connectors but it's the same like before. Why?

So you bought it from the Linksprite STORE (HERE):

If you look on the page you linked before:
http://linksprite.com/wiki/index.php5?title=16_X_2_LCD_Keypad_Shield_for_Arduino#FAQ

IT SAYS THIS:

Plug and play with any Arduino ‘classic’ - UNO, duemilanove, diecimilla, etc.

(see attached screenshot for highlighted text)
Note that “Mega2560” is NOT one of the ‘classics’.
I don’t know if it matters now but Linksprite is NOT in CHINA, they are in Colorado, USA.

Corporate Headquarters:
LinkSprite Technologies, Inc.
1067 S Hover St, Unit E-186
Longmont, CO 80501.
USA

Tel: 720-204-8599
Fax: 775-540-9885

E-mail Contacts:

Product Inquiries - sales@linksprite.com
Technical Support- support@linksprite.com

There is no Tech Support phone number or I would call. I tried calling and got a voicemail.
Which model do you have A or B ?
see page below for photos:
http://linksprite.com/wiki/index.php5?title=16_X_2_LCD_Keypad_Shield_for_Arduino#FAQ

Obviously you didn’t call them and ask about compatibility but did you send an email asking if it was
PLUG & PLAY compatible ?

They sold the RS232 shield to me. Together with the LCD keyboard and the mega.
I don’t know why the RS232 shield doesn’t work.

Yeah, about that, I don’t think there is ANY website that has Artificial Intelligence software checking to see
if you are ordering incomptible items. The order is just sent to a wharehouse that simply fills the order without
asking questions. You can order anything you want and they’ll sell it to you.
About the RS232 shield, I have one for my UNO and I noticed that I could NOT upload a program to it WHILE
the RS232 shield was connected, but if I removed the USB cable and the RS232 shield , then reconnected the
cable, I could upload a program that uses the RS232 but I had to turn off power before plugging the shield in.
I am even able to use the RS232 shield with an SD shield plugged into the top.
If you look at the attached schematic, the only pins used are the Tx & Rx , which explains why you can’t have
it connected when you are trying to upload a program.
Based on the Mega photo (attached), it looks like you are right about it using the same pins on the Mega,(Tx & Rx)
since your RS232 shield is definitely PLUG & PLAY compatible with an UNO and the Mega pinout is layed out
to be compatible with most of those shields.
I would remove all the shields before uploading you program and then plug them back in and connect power.
That’s what I have to do with my SD shield, RS232 shield and my UNO. I can’t upload a program with them
connected. I don’t get any ERRORS on the screen. I only discovered this because it was still running
the last program I loaded PRIOR to trying to upload a program for the RS232 shield, yet there were no errors
on the screen. If you have not been removing the shields before uploading your program it is very likely that
NONE of the programs you have uploaded to it EVER got loaded, AT ALL. You can test this easily.
Load a simple blink led program and run it on the Mega with NO shields connected.
Then plug all your shields in and load the program for the LCD KEYPAD.
You will not get any on-screen errors. It will LOOK like it uploaded ok but the blink led program
will still be running , indicating that the LCD KEYPAD program WAS NEVER LOADED.
If I am wrong , PLEASE LET ME KNOW so I can better understand what circumstances apply to this anomoly.
If I am right and the blink led program is still running , then remove all the shield and upload the LCD KEYPAD
program (along with the RS232 code) , turn off power, reconnect the shields, turn on power and test it.
Good luck…

arduino_RS232.pdf (29.5 KB)

Hello, the RS232 works. The pins are correct, but if all the pins are pluged in, the mega jams.
I connected ONLY the TXD, 5V and GND and it works. I think that other pins disturb the upload/work to the mega.

The LCDkeypad works perfect, . . . if you have the right example and reset after the upload of the right library.
Without a reset and/or the upload of other (wrong?) examples it will not work.
It takes very much time to learn that all. I have seen it in the www that it has to work.

At the moment i receive 2 precise frequencies on my PC from the mega via Xojo. That’s brandnew too.
Now i’m happy. Thanks to all!

Hello, the RS232 works. The pins are correct, but if all the pins are pluged in, the mega jams. I connected ONLY the TXD, 5V and GND and it works. I think that other pins disturb the upload/work to the mega.

Did you try what I suggested about removing all the shields before uploading your program and then replacing the shields with the power off ?

if you have the right example and reset after the upload of the right library. Without a reset and/or the upload of other (wrong?) examples it will not work.

What are the "right example" for the Mega ?

I connected ONLY the TXD, 5V and GND and it works. I think that other pins disturb the upload/work to the mega.

I had the same experience when I tried to use rs232 with an ATtiny85. I had to disconnect the Rx pin for it to work. Glad to hear everything is working and you got it all worked out. Did my suggestion about running the blink led example help or did you figure it all out by trial & error ? BTW: What did you mean about XOJO ? I know it's some kind of web app but I didn't get the importance of you statement about frequencies. What did that mean ?

Did you try what I suggested about removing all the shields before uploading your program and then replacing the shields with the power off ?

That is the first thing i try. That works. But it's not possible to disassamble a machine, only to do an upload. The arduino is not for playing. Maybe it will be a new generation of our machine control unit? It has to work in every situation!

I tried the function with a simple LED test. With the shield an upload was not possible.

What are the "right example" for the Mega ?

That is an example that works perfect with the LCDKeypad/Mega. It's tricky, because some examples are working out of the box. Others don't (different pins). I am a beginner and if i change something in the source code, i don't save it, because i'm not sure if it's ok. At the next start, the original (right/wrong) code starts. And if you load the right you need to reset the keypad! Without restart it will not work! :-(

I know it's some kind of web app but I didn't get the importance of you statement about frequencies. What did that mean ?

If we can't measure, calculate, display and send (RS232) the frequencies (engine speed), we don't need that all.