Can't get LCD 1602 I2C show any characters

Hello!

I'm new to arduino, but before posting this I've searched about this and nothing helps to me. I've followed this instructions . I have a QAPASS 1602a 16x2 with I2C labelled "A0 A1 A2" (version 1 on link). I've found that it has address 0x3F using scanner. Starting sketch from limk I actually got my display blinking as excected, but still no characters. I've tried to tune contrast using Blue Potentiometer, still nothing. Am I doing something wrong?

Thanks

asyler: I've found that it has address 0x3F using scanner.

So then you changed LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); to LiquidCrystal_I2C lcd(0x3f, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); ?

Yes, sure

As the code to find the address worked the wiring and pin numbers should be correct. Can you post your code

so we can look for common mistake like writing to the lcd before using the lcd.begin(); (carnt write to it before we tell it to begin yet it will compile)

or writing a single line of text In a otherwise empty loop followed by lcd.clear(); (loop runs so fast its always being cleared)

Here it is

/* YourDuino.com Example Software Sketch
 16 character 2 line I2C Display
 Backpack Interface labelled "A0 A1 A2" at lower right.
 ..and
 Backpack Interface labelled "YwRobot Arduino LCM1602 IIC V1"
 MOST use address 0x27, a FEW use 0x3F
 terry@yourduino.com */

/*-----( Import needed libraries )-----*/
#include <Wire.h>  // Comes with Arduino IDE
// Get the LCD I2C Library here: 
// https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads
// Move any other LCD libraries to another folder or delete them
// See Library "Docs" folder for possible commands etc.
#include <LiquidCrystal_I2C.h>

/*-----( Declare Constants )-----*/
/*-----( Declare objects )-----*/
// set the LCD address to 0x27 for a 16 chars 2 line display
// A FEW use address 0x3F
// Set the pins on the I2C chip used for LCD connections:
//                    addr, en,rw,rs,d4,d5,d6,d7,bl,blpol
LiquidCrystal_I2C lcd(0x3f, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);  // Set the LCD I2C address

/*-----( Declare Variables )-----*/
//NONE

void setup()   /*----( SETUP: RUNS ONCE )----*/
{
  Serial.begin(9600);  // Used to type in characters

  lcd.begin(16,2);   // initialize the lcd for 16 chars 2 lines, turn on backlight

// ------- Quick 3 blinks of backlight  -------------
  for(int i = 0; i< 3; i++)
  {
    lcd.backlight();
    delay(250);
    lcd.noBacklight();
    delay(250);
  }
  lcd.backlight(); // finish with backlight on  

//-------- Write characters on the display ------------------
// NOTE: Cursor Position: (CHAR, LINE) start at 0  
  lcd.setCursor(0,0); //Start at character 4 on line 0
  lcd.print("Hello, world!");
  delay(1000);
  lcd.setCursor(0,1);
  lcd.print("HI!YourDuino.com");
  delay(8000);  

// Wait and then tell user they can start the Serial Monitor and type in characters to
// Display. (Set Serial Monitor option to "No Line Ending")
  lcd.clear();
  lcd.setCursor(0,0); //Start at character 0 on line 0
  lcd.print("Use Serial Mon");
  lcd.setCursor(0,1);
  lcd.print("Type to display");  


}/*--(end setup )---*/


void loop()   /*----( LOOP: RUNS CONSTANTLY )----*/
{
  {
    // when characters arrive over the serial port...
    if (Serial.available()) {
      // wait a bit for the entire message to arrive
      delay(100);
      // clear the screen
      lcd.clear();
      // read all the available characters
      while (Serial.available() > 0) {
        // display each character to the LCD
        lcd.write(Serial.read());
      }
    }
  }

}/* --(end main loop )-- */


/* ( THE END ) */

everything looks right. Which arduino are you running and do you have the lcd connected to 5v?

Arduino Mega 2560. Yes, I have. I will post my scheme in fritizng later

asyler: Arduino Mega 2560. Yes, I have. I will post my scheme in fritizng later

Don't bother posting a fritzing diagram. It's usually a horrible mess to read. Make a pencil drawing and take a photo if you can't produce a CAD schematic.

This is very important! make sure the standard library has been removed. the new library uses some of the same file names and it can not differentiate between the two.

// Get the LCD I2C Library here: 
// https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads
// Move any other LCD libraries to another folder or delete them

Simple test Apply +5v / GND to LCD - display - and than apply background LED power ( sometime marked A/K) to the LCD module. No other connections ( data etc.) are necessary for this power up test. You should be able to discern ALL chatterers fields, but connecting contrast pot will make it easier.

It MAY not be totally visible but the module will initialize ( internally) on power up and ALL characters fields should show. Of course by now you know you need basically three "power" connections to the LCD - LCD itself, contrast and backlight. Sure looks as the main LCD power is missing - hence no intelligent data can be processed / displayed.

aarg:
Don’t bother posting a fritzing diagram. It’s usually a horrible mess to read. Make a pencil drawing and take a photo if you can’t produce a CAD schematic.

Here it is.

weldsmith: This is very important! make sure the standard library has been removed. the new library uses some of the same file names and it can not differentiate between the two.

// Get the LCD I2C Library here: 
// https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads
// Move any other LCD libraries to another folder or delete them

Yes, I did this

Vaclav: Simple test Apply +5v / GND to LCD - display - and than apply background LED power ( sometime marked A/K) to the LCD module. No other connections ( data etc.) are necessary for this power up test. You should be able to discern ALL chatterers fields, but connecting contrast pot will make it easier.

It MAY not be totally visible but the module will initialize ( internally) on power up and ALL characters fields should show. Of course by now you know you need basically three "power" connections to the LCD - LCD itself, contrast and backlight. Sure looks as the main LCD power is missing - hence no intelligent data can be processed / displayed.

I didn't understand the part about background LED power.

asyler: I didn't understand the part about background LED power.

I suppose more appropriate term is "backlight" .

LCD works by allowing light to pass thru the crystal and the backlight ( LED's ) is the source of the light.

It is connected via A ( anode) and K ( cathode) terminals at the far right edge of the connector. MOST of the time the required limiting resistor is build-in the LCD module. With the backlight functioning the entire LCD should glow( blue / green / white) , little brighter at the edges. With I2C piggyback controller this backlight connection is "hidden" and conveniently controlled by I2C software. But you have already tested / blinked that. Just keep the backlight on after the "blink" test. i

Vaclav: I suppose more appropriate term is "backlight" .

LCD works by allowing light to pass thru the crystal and the backlight ( LED's ) is the source of the light.

It is connected via A ( anode) and K ( cathode) terminals at the far right edge of the connector. MOST of the time the required limiting resistor is build-in the LCD module. With the backlight functioning the entire LCD should glow( blue / green / white) , little brighter at the edges. With I2C piggyback controller this backlight connection is "hidden" and conveniently controlled by I2C software. But you have already tested / blinked that. Just keep the backlight on after the "blink" test. i

Ok, got it. I did this. It lights (backlighted) after blink test, but nothing except this.

A logic probe or an oscilloscope would come in handy right about now.

asyler: Ok, got it. I did this. It lights (backlighted) after blink test, but nothing except this.

Backlight "blink" wouldn't work if you were not addressing the I2C correctly.

Just to make sure - you did adjust the contrast pot, right?

Hi,
Can you post a picture of your project, so we can see how it is layed out please?

Thanks… Tom… :slight_smile:

Actually, I haven’t one

Vaclav: Backlight "blink" wouldn't work if you were not addressing the I2C correctly.

Just to make sure - you did adjust the contrast pot, right?

Yes, I did.

TomGeorge: Hi, Can you post a picture of your project, so we can see how it is layed out please?

Thanks... Tom..... :)

Hi, I've record a short video. Sorry for quality.