Go Down

Topic: 1602LCD with Sainsmart I2C (Read 1 time) previous topic - next topic

I bought a microtivity IM161 LCD Module 1602 and connected it to a Sainsmart LCD2004 I2C. I've tried addresses 0x20, 0x24 and 0x35 with SLC on A4 and SDA on A5. All I get is white boxes on the blue background when I attempt a simple hello world. Any suggestions are greatly appreciated, as I am stumped on what to try next. I downloaded the latest I2C libs. Thanks in advance...

//YWROBOT
//Compatible with the Arduino IDE 1.0
//Library version:1.1
#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()
{
}

Krodal

To get an I2C device working, start with the i2c_scanner : http://playground.arduino.cc/Main/I2cScanner

Are these the components you are using ?
http://www.microtivity.com/p/IM161/lcd-module-1602-white-on-blue-with-backlight
http://www.sainsmart.com/sainsmart-iic-i2c-twi-serial-2004-20x4-lcd-module-shield-for-arduino-uno-mega-r3.html

SDA = A4, SCL = A5
http://arduino.cc/en/Reference/Wire

Why did you download the newest I2C libs ? You should use the newest Arduino software, version 1.0.3.

Thanks for the link. When I run the test program I get:


I2C Scanner
Scanning...
No I2C devices found

Scanning...
No I2C devices found

#3
Feb 07, 2013, 12:26 pm Last Edit: Feb 07, 2013, 01:05 pm by runningdude22 Reason: 1
Got it!!! The link you sent me led me to find the correct address, which is 0x3F. Does capitalization matter? I can't imagine it does...

Thanks so much for your kind help!

Another question, while I'm at it. I see that the LCD came with a diode and I've read that the LCD runs off of 4.2v instead of 5.

1. Will I do any damage not using a diode?
2. How would I know what kind of diode to place on the power to it if it didn't come with one?

Krodal

I would suggest a resistor of 47 ... 330 ohm for the backlight.
The '0x3f' is the same as '0x3F'.

Go Up