Go Down

Topic: IC2 LCD connection to Arduino (Read 5897 times) previous topic - next topic

jasonb

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 :(

What do I wrong? Thx for all replies!
Jason

jasonb

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

Grumpy_Mike

Quote
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.

Quote
Another project used this setting for a i2c-connection

No problem you can use them both if the devices have different addresses.
Quote
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).

Quote
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.

thegeekway

Have you tried adjusting the contrast?

jasonb



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 :(  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()
{
}

jasonb


Senso

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?

Grumpy_Mike

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.

jasonb

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


Grumpy_Mike

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.

jasonb

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 :( 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

Grumpy_Mike

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

Quote
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.

jasonb

Hi, thanx for continuing to try to help me ;)

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) :(

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 ...  :'(

Grumpy_Mike

Quote
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.
Quote
and they a sold out at my local dealer here

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

jasonb

#14
Oct 07, 2010, 06:46 am Last Edit: Oct 07, 2010, 06:49 am by jasonb Reason: 1
No oscilloscope here at the moment :(
I try to get another LCD from anywhere  :'(

But hey. THANX 1000 times for your help!

Go Up