Pages: [1]   Go Down
Author Topic: 1602LCD with Sainsmart I2C  (Read 939 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Edison Member
*
Karma: 9
Posts: 1010
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


I2C Scanner
Scanning...
No I2C devices found

Scanning...
No I2C devices found
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
« Last Edit: February 07, 2013, 07:05:03 am by runningdude22 » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Offline Offline
Edison Member
*
Karma: 9
Posts: 1010
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: