SOLVED <Help me connect my LCD to my MEGA!>

``Hello,
I got a standard LCD display (the 16*2 one)
I bought it over Conrad.de (german radio shack)
Here is an english manual
http://www.produktinfo.conrad.com/datenblaetter/175000-199999/183043-da-01-en-LCD_MODUL_16X2_LED_GE_C1602B_YYH_JT_R.pdf

I would like to hook this up to my arduino mega, sadly this is not as easy as I thought (yes i have done the tutorial with the liquid crystal library)

Michael

Hi Michael!

I recently connected an LCD to my Mega 2560 so perhaps I can help. You mentioned doing a tutorial for the LCD...what happens when you connect it as described in the tutorial? Are you using the 10k pot wiper (middle pin) to control the back light (the VO pin...#3 on your board according to your manual)? And are you ensuring the LCD is mutually grounded along with the pot (the LCD should be grounded at pin Vss [pin 1] and R/W [pin 5] on your board according to your manual)?

Just some ideas to try above and double-check. Maybe with more information as to what is happening (board isn't display strings, no light, does nothing, etc.) we can get you hooked up and running! Cheers.

hello

what have you done to connect up the device and what was the sketch?

I usually connect it with the R/W pin to ground so you would only need six pins.

Liquid Crystal lcd ( 6, 5, 4, 3, 2, 1); //in order, the first position in the (), the arduino 6 pin would be the RS pin(4), then the arduino 5 pin is the E pin(6), then the arduino 4-1 pins are the digital pins DB4-DB1 on the display.

does your display have a backlight? if so, the A (pin 15) would go to + supply(through a resistor) the K (pin 16) would go to ground.

then you have the GRND and VDD, pin 1 is to ground and pin 2, VDD is to +5volts, pin 3 through a resistor to ground or you can connect it to a PWM output on the arduino and control the contrast that way.

the arduino pins are examples of what you could use, a lot of the time you see the RS, E and R/W pins using 13, 12 and 11 on the arduino. the DB pins use what pins on the arduino

setup on sketch should look something like this

#include <LiquidCrystal.h>

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

void setup()
{
   lcd.begin(16,1);
   lcd.print("hello, world!");
}

void loop() {}

go here for more
http://arduino.cc/en/Reference/LiquidCrystalConstructor

ben90036:
Hi Michael!

I recently connected an LCD to my Mega 2560 so perhaps I can help. You mentioned doing a tutorial for the LCD...what happens when you connect it as described in the tutorial? Are you using the 10k pot wiper (middle pin) to control the back light (the VO pin...#3 on your board according to your manual)? And are you ensuring the LCD is mutually grounded along with the pot (the LCD should be grounded at pin Vss [pin 1] and R/W [pin 5] on your board according to your manual)?

Just some ideas to try above and double-check. Maybe with more information as to what is happening (board isn't display strings, no light, does nothing, etc.) we can get you hooked up and running! Cheers.

Yes I have a 10k pot wiper to control the Contrast and yes it is grounded, the question was if I connect it to the PWM pins or the Digital pins?
Thanks

Michael

michael-schmid:
Yes I have a 10k pot wiper to control the Contrast and yes it is grounded, the question was if I connect it to the PWM pins or the Digital pins?
Thanks

Michael

You need digital pins, but... you can setup any IO-pin as digital output, so it doesn't really matter. If you want to, you can use the analog input pins and pins of serial ports as well.

michael-schmid:
the question was if I connect it to the PWM pins or the Digital pins?

Ah, I didn't see that in your original question. Digital. But what Simpson_Jr said is perfect.

Thanks to everyone, it was apparently just a wiring problem :roll_eyes:

Michael

“SOLVED” is not a good name for a topic - it’s hardly something one might search for. Please change it to SOLVED - .

Thanks for the tip

...