I2C Display

I'm having a lot of trouble with my LCD. It is the LCD I linked to below and when powered up I get the standard boot screen that it shipped with but it does not accept any commands from the Arduino.

I've tried it with the SDA SCL connections reversed and everything. Jumper, no jumper, everything.

The only reason I'm asking here is I've contacted them twice this week with no answer. >:(

http://web4robot.com/SerialLCD.html

Please post your code, so we have somewhere to start.

Make sure you are connecting the I2C to the ANALOGUE pins 4 & 5 and not the digital ones.
I would also add a 3K3 pull up resistor on each I2C line.

I would also add a 3K3 pull up resistor on each I2C line.

Even though the arduino supposedly uses internal pullups on analog 4 and 5 when you use I2C? My only I2C experience is with an RTC, which worked with and without external pullup resistors. (I had them in the circuit since many I2C examples show them, but then removed them after I read about the internal resistors.) Would there be different cases when you would or wouldn't add external pullup resistors, or is it a case by case, trial and error thing?

Even though the arduino supposedly uses internal pullups on analog 4 and 5 when you use I2C?

Yes the internal pull ups are only about 10K. If you look at the signals on an oscilloscope without external pull ups it looks very bad. Yes it still works, but for the sake of two resistors you are throwing away so much margin.

Good to know, thanks.

Here is the code. I can't make it more simple than it is! lol

#include <Wire.h>
#include <LCDI2C.h>


 // Number of lines and i2c address of the display
LCDI2C lcd = LCDI2C(2,16,0x4C,1);  

void setup() { 

  lcd.init();                          // Init the display
 
  lcd.print("Hello World!");  
}

void loop()
{
  
}

I'll have to try the pull up resistors since that is something I haven't tried!

How does one calculate the "right" value for the pull-up resistors?
(In many schematics I saw 10K.)
Thanks.

No go on the pull up resistors. I tried from 10k to 1k and nothing. I'm guessing it is a bad i2c receiver or it has a non-standard address.

I could test the address thing.

EDIT yeah, no it wasn't the address thing.

How does one calculate the "right" value for the pull-up resistors?

You look in the data sheet of the device you are using. It will either give a pull up resistor in the AC operating conditions, or give a current required for the pull down and you can work out the resistor from the voltage rail you are using.

(In many schematics I saw 10K.)

Yes but that doesn't mean it's right, there is a lot of rubbish circuits on the internet.
The other thing to do is to look at the rise time of the signals on an oscilloscope. If the pull up is too high this rise time will be too slow.

Kylej
Check the address of your I2C device some addresses include the read / write bit others do not. I would try an address of 0x26. Also check the wring on any external address pins.

I never got a reply from the company, go customer service, but I figured out the problem. After upgrading to 0017 and burning a new bootloader I was able to get the LCD working. I wrote a quick program to give me the results from a light sensor and while playing with it opened it in 0016 to upload it. My raw and calculated input values displayed but none of the text I was sending to it.

Works fine now even without the pull-up resistors. Display works great, albiet a little slow, but I won't be buying from them again.

Have you seen the playground page about this.
http://www.arduino.cc/playground/Code/LCDi2c

There is a specific library for the web4robots i2c lcd display.
It has all the extended features covered as well.
Works well.

I cant comment on the customer services but the lcd controller seems a good bit of kit and the library produced by Dale, dwentz on this forum is easy to use.

Gordon

what is the default address for it ?

Ive looked at the doc and its a little unclear 0x42 ?
which is 0x21 arduinio wire .

Because addressing is the most common problem with i2c .

I made a i2c scanner , but not with the wire library to scan the full i2c address range to find any i2c devices.

The default address for the device used in the examples is "0x4C".
and it works for me.

Gordon

Works fine now even without the pull-up resistors

Yes but I said:-

Yes it still works, but for the sake of two resistors you are throwing away so much margin.

Anyway the internal pull up resistors in the arduino are actually between 20 to 50K. You need external ones.

I didn´t know you needed external ones also in the case you have internal ones.

I'll end up using the external resistors anyway as a just in case.

The library you linked to is the one I'm using, I honestly have no idea why I was having so much trouble with this thing. It was discouraging to say the least.

Do external pull-ups affect speed of I2C communications at all? I've had it running successfully at 300KHz with no external pull-ups, but that was over a 4-inch run of wire.