IC2 LCD connection to Arduino

Hey guys,

I hope you can help me. Apparently I am to dump to run this I2C/TWI LCD1602 Module! >:(

I used the "Hello Word"-Example from the LiquidCrystal_I2C-Library which I installed.

I haven't found an example how to connect the module. All I found was always normal 16-pin interfaces like the arduino-liquidCrystal Tutorial

I've connected VCC + GND and SCL to analog pin 5 and SDA to 4. Another project used this setting for a i2c-connection. But I can't see if these are the right pins! How can I figure that out? Anywhere in the library?

When I upload Hello-word the display glows but no characters are shown :frowning:

What do I wrong? Thx for all replies!
Jason

this is the module: http://www.dfrobot.com/index.php?route=product/product&keyword=DFR0063&category_id=0&description=1&model=1&product_id=135

I've connected VCC + GND and SCL to analog pin 5 and SDA to 4.

That's right. You might also try a 4k7 pull up resistor from the SDA and SCL lines.

Another project used this setting for a i2c-connection

No problem you can use them both if the devices have different addresses.

But I can't see if these are the right pins! How can I figure that out? Anywhere in the library?

The library will not mention these pins because they are arduino names but they are right (providing you are not using a Mega).

When I upload Hello-word the display glows but no characters are shown

So it is either wired up wrong or you have a faulty display.

Have you tried adjusting the contrast?

Hey, thx guys for the fast reply. It's still not working.
Year, I checked the connection. I had no resistors in the circuit and I don't have 4K-resistors left :frowning: In another IC2-Arduino Project I saw a guy using just a 2K resistor for each wire. How exact has the resistor(s) to be? I tried to place them in a row. Now I have 2,3 Kohm and 2,2Kohm. No success. I changed the contrast as well.

I connected the resistors like that:

Are the LCDs easy to destroy? :-?

This is the code I used. Pretty simple:

//DFRobot.com
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display
void setup()
{
lcd.init(); // initialize the lcd

// Print a message to the LCD.
lcd.backlight();
lcd.print("Hello, world!");
}
void loop()
{
}

Nobody? Really need help ! :stuck_out_tongue:

The resistors are needed to the i2c work, without then the i2c connection will never work, and no it doesn't kill anything without then, but using something in the 4-10k would be better, 2k is pretty low and maybe the arduino cant pull the line low.
Are you sure that you have the right lcd address?

That picture you posted is not what you have implemented because it is not an LCD display that is shown. Can you post a picture of what you have.

However it is most likely the address that is wrong. There are two ways of specifying an I2C address, one with the least significant bit being the read / write line and the other with the read / write not specified.
As you have printed on the device and address of 0x27 try shifting it up and using 0x4E.

Hey, thx for your help[!]
This is my setting at the moment.

To be hornes - I have no clue how the adress-think works. Tried to understand this:
http://www.robot-electronics.co.uk/acatalog/I2C_Tutorial.html

I just have to change this?

//LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display
LiquidCrystal_I2C lcd(0x4E,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display

It is a bit hard to see but it looks like those pull up resistors are way too low. They look like 100R, where as you need 4k7.

Yes try just changing the address, although try putting the correct resistors first.

Hi,

mmm. I don't have a 4k7. I just read that I can use resistors from 4-10k.
So I tried my two 10k-resistors but it doesn't help. I was not sure if the resistor I used has orange or brown mulitplcator (hence 1 or 10k) so I changed them and even the arduino board.
Nothing :frowning: The display glows but no information is shown. What does the blinking PMW mean? The LCD needs 5 V?! There is no datasheet ...

New setting:

Apparently other people have the same problems :s
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1282584963

Are you running this code:-
http://www.dfrobot.com/wiki/index.php?title=I2C/TWI_LCD1602_Module_(SKU:_DFR0063)

I was not sure if the resistor I used has orange or brown mulitplcator (hence 1 or 10k) so I changed them and even the arduino board

It might just possibly be that using 100R resistors was too much for the display and you have burned it out. I would try sending it back.

Hi, thanx for continuing to try to help me :wink:

Ok, during the first try I didn't use a resistor either so maybe I really burned it :-/
That would be horrible. Need the display urgent and they a sold out at my local dealer here (Sydney) :frowning:

Is there any way to check if it's burned or not? And yes ... I used the code from http://www.dfrobot.com and from the library. I modified it with your new adress. but ... :cry:

Is there any way to check if it's burned or not?

There is but you will need an oscilloscope. Check the clock pulses on the clock line first. If they are Ok you have to check to see if the data line is being pulled down by the LCD at the end of the address. If it is burner out (or if the address is wrong) it will not pull down. Also make sure in normal operation this line is high and not being permanently pulled down.
I do realise you might not have a scope but see if you can get access to one or even try one of the arduino scopes if you have access to more than one arudion.

and they a sold out at my local dealer here

If you got the last one you might have been sold a dud.

No oscilloscope here at the moment :frowning:
I try to get another LCD from anywhere :cry:

But hey. THANX 1000 times for your help!

there is no way that my resistors and wires are connected wrong or?

dfrobot doesn't use resistors on their images?!

Whatever: It finally runs!!!!!!!!

We switched the wires (of pin 4 and 5) and changed the example code. This line was the problem:
lcd.setCursor(0, 1);

The new code looks like that:
///Arduino Sample Code
///www.DFRobot.com
///Last modified on 17th September 2010

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display

void setup()
{
lcd.init(); // initialize the lcd

// Print a message to the LCD.
lcd.backlight();
//lcd.setCursor(0, 1);
lcd.print("Hello, world!");
}

void loop()
{
// when characters arrive over the serial port...
if (Serial.available()) {
// wait a bit for the entire message to arrive
delay(100);
// clear the screen
lcd.clear();
// read all the available characters
while (Serial.available() > 0) {
// display each character to the LCD
lcd.write(Serial.read());
}
}
}

Now I have the problem to connect the lcd with Processing:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1286704613
Maybe you have some good ideas for that?

Thx for all your help[!]

Ok, apparently nobody has read till the end of my last post. I still have the problem to connect the lcd with firmata on the arduino board?

Nobody an idea or a hint? Would be great. Thx in advance,