Forum >DFR0063 I2C LCD
ArduinoGeneral

DFR0063 I2C LCD

userHead joe 2011-01-10 20:12:18 18519 Views29 Replies
I recently purchased the DFR0063 LCD and I am trying to connect it to my Arduino Mega.

I've connected Vcc to the regulated 5V source from the Arduino, Ground to Ground, and SDA/SCL to SDA/SCL on the Arduino Mega (Pins 20 and 21 respectively).

I've added the LiquidCrystal_I2C library to the Arduino IDE and I've tried the sample code located in the wiki plus the example code (changed it from 0x20 to 0x27 for the LCD address) but all I'm getting are dark squares on the top line and nothing on the bottom line. "Hello, world!" isn't displaying.

Is it possible that my LCD is faulty or have I done something wrong?
2011-01-12 22:07:39 HI Joe:

If it is a faulty one. We will replace yours.  Simply let us have your order ID, and send the detail to [email protected]  and we will figure out the rest for you.

Sorry for the faulty issue which takes you so many time.

userHeadPic R2D2C3PO
2011-01-12 22:07:39 HI Joe:

If it is a faulty one. We will replace yours.  Simply let us have your order ID, and send the detail to [email protected]  and we will figure out the rest for you.

Sorry for the faulty issue which takes you so many time.

userHeadPic R2D2C3PO
2011-01-12 22:07:39 HI Joe:

If it is a faulty one. We will replace yours.  Simply let us have your order ID, and send the detail to [email protected]  and we will figure out the rest for you.

Sorry for the faulty issue which takes you so many time.

userHeadPic R2D2C3PO
2011-01-12 20:48:46 thanks a lot with the advice. i think it's definitely faulty, the backlight should flicker on and off but it turns off once and never turns on again. once again, thanks for the help! userHeadPic joe
2011-01-12 20:48:46 thanks a lot with the advice. i think it's definitely faulty, the backlight should flicker on and off but it turns off once and never turns on again. once again, thanks for the help! userHeadPic joe
2011-01-12 20:48:46 thanks a lot with the advice. i think it's definitely faulty, the backlight should flicker on and off but it turns off once and never turns on again. once again, thanks for the help! userHeadPic joe
2011-01-12 03:30:13 also try working your contrast resistor back and forth a few times. Sometimes the wipers get dirty and they don't make contact. If you turn it back and forth a few times, it kind of wipes itself clean. userHeadPic anonymous
2011-01-12 03:30:13 also try working your contrast resistor back and forth a few times. Sometimes the wipers get dirty and they don't make contact. If you turn it back and forth a few times, it kind of wipes itself clean. userHeadPic anonymous
2011-01-12 03:30:13 also try working your contrast resistor back and forth a few times. Sometimes the wipers get dirty and they don't make contact. If you turn it back and forth a few times, it kind of wipes itself clean. userHeadPic anonymous
2011-01-12 03:23:32 I just tried mine again and it came right on displaying Hello, world!
If you are using a 4 pin straight through connector like I am, make sure you are plugging into the un-shrouded connector because the shrouded one reverses the SDA and SCL lines. But I see you have already tried reversing them. You also get the backlight on I think you have to get the address right to get the backlight on.
See if you can get the backlight to flash with this code. If the backlight flashes then you definitely have it hooked up and programming right. Then only two things could be wrong, your contrast resistor needs adjustment or your LCD display is defective. When all else fails, the only real way to figure that out is get another part.

[code]

//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("Flashing World");
 
}

void loop()
{
  lcd.backlight();
  delay(100);
  lcd.noBacklight();
  delay(100);
}
[/code]
userHeadPic anonymous
2011-01-12 03:23:32 I just tried mine again and it came right on displaying Hello, world!
If you are using a 4 pin straight through connector like I am, make sure you are plugging into the un-shrouded connector because the shrouded one reverses the SDA and SCL lines. But I see you have already tried reversing them. You also get the backlight on I think you have to get the address right to get the backlight on.
See if you can get the backlight to flash with this code. If the backlight flashes then you definitely have it hooked up and programming right. Then only two things could be wrong, your contrast resistor needs adjustment or your LCD display is defective. When all else fails, the only real way to figure that out is get another part.

[code]

//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("Flashing World");
 
}

void loop()
{
  lcd.backlight();
  delay(100);
  lcd.noBacklight();
  delay(100);
}
[/code]
userHeadPic anonymous
2011-01-12 03:23:32 I just tried mine again and it came right on displaying Hello, world!
If you are using a 4 pin straight through connector like I am, make sure you are plugging into the un-shrouded connector because the shrouded one reverses the SDA and SCL lines. But I see you have already tried reversing them. You also get the backlight on I think you have to get the address right to get the backlight on.
See if you can get the backlight to flash with this code. If the backlight flashes then you definitely have it hooked up and programming right. Then only two things could be wrong, your contrast resistor needs adjustment or your LCD display is defective. When all else fails, the only real way to figure that out is get another part.

[code]

//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("Flashing World");
 
}

void loop()
{
  lcd.backlight();
  delay(100);
  lcd.noBacklight();
  delay(100);
}
[/code]
userHeadPic anonymous
2011-01-11 15:27:35 awesome, that's good to hear.

it's listed as a library in the arduino ide so everything should be setup properly. i've used that code but nothing displays on the lcd. i've also used the serial code which should display what's sent through serial but that doesn't work either, however, when it does receive data the lcd flashes so i assume something is updating but all i'm getting are black squares (the data going to the lcd should be fine as i'm also echoing the input back as output via serial and there's no issue with that).
userHeadPic joe
2011-01-11 15:27:35 awesome, that's good to hear.

it's listed as a library in the arduino ide so everything should be setup properly. i've used that code but nothing displays on the lcd. i've also used the serial code which should display what's sent through serial but that doesn't work either, however, when it does receive data the lcd flashes so i assume something is updating but all i'm getting are black squares (the data going to the lcd should be fine as i'm also echoing the input back as output via serial and there's no issue with that).
userHeadPic joe
2011-01-11 15:27:35 awesome, that's good to hear.

it's listed as a library in the arduino ide so everything should be setup properly. i've used that code but nothing displays on the lcd. i've also used the serial code which should display what's sent through serial but that doesn't work either, however, when it does receive data the lcd flashes so i assume something is updating but all i'm getting are black squares (the data going to the lcd should be fine as i'm also echoing the input back as output via serial and there's no issue with that).
userHeadPic joe
2011-01-11 11:23:22 That's the right library. I use that DFR0063 LCD I2C Display too.
You need to install the libraries in the proper directory.
I used c:\Programs\Arduino\libraries\LiquidCrystal_I2C on my computer
in the LiquidCrystal_I2C directory you should have the files 
keywords.txt
LiquidCrystal_I2C.cpp
LiquidCrystal_I2C.h
LiquidCrystal_I2C.o
Once you have all that, the code for Hello World is:
[code]

//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()
{
}
[/code]
userHeadPic anonymous
2011-01-11 11:23:22 That's the right library. I use that DFR0063 LCD I2C Display too.
You need to install the libraries in the proper directory.
I used c:\Programs\Arduino\libraries\LiquidCrystal_I2C on my computer
in the LiquidCrystal_I2C directory you should have the files 
keywords.txt
LiquidCrystal_I2C.cpp
LiquidCrystal_I2C.h
LiquidCrystal_I2C.o
Once you have all that, the code for Hello World is:
[code]

//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()
{
}
[/code]
userHeadPic anonymous
2011-01-11 11:23:22 That's the right library. I use that DFR0063 LCD I2C Display too.
You need to install the libraries in the proper directory.
I used c:\Programs\Arduino\libraries\LiquidCrystal_I2C on my computer
in the LiquidCrystal_I2C directory you should have the files 
keywords.txt
LiquidCrystal_I2C.cpp
LiquidCrystal_I2C.h
LiquidCrystal_I2C.o
Once you have all that, the code for Hello World is:
[code]

//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()
{
}
[/code]
userHeadPic anonymous
2011-01-11 02:43:33 also, i downloaded the library from http://www.xs4all.nl/~hmario/arduino/LiquidCrystal_I2C/

is that the right library or should i be downloading it from somewhere else?
userHeadPic joe
2011-01-11 02:43:33 also, i downloaded the library from http://www.xs4all.nl/~hmario/arduino/LiquidCrystal_I2C/

is that the right library or should i be downloading it from somewhere else?
userHeadPic joe