-1

I am working with an I2C lcd display with an arduino uno board I have connected the gnd pin to gnd of arduino uno and the vcc pin to 5V of arduino uno and the display is not even lighting up there is only a red led lighting up on the back so I tryed connecting the rest of the pins and run a code to detect the i2c display and it worked successfully I got the adress but the lcd did not light up. The lcd display is a new one I bought yesterday here are the pictures:

https://photos.app.goo.gl/x9QPAWig98yLg4DW9

The script I tryed to display text was this one with the NewLiquidCristal library:

//Libraries 
#include <Wire.h>  
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);  // Set the 
LCD I2C address, if it's not working try 0x27.

void setup(){
lcd.begin(16,2);   // iInit the LCD for 16 chars 2 lines
lcd.backlight();   // Turn on the backligt (try lcd.noBaklight() to turn it 
off)
lcd.setCursor(0,0); //First line
lcd.print("I2C LCD Tutorial");
lcd.setCursor(0,1); //Second line
lcd.print("*Ardumotive.com*");
}

Here is the model nmber of the I2C: PCF8574A And the lcd is a QAPASS Ui also I don't have a spec sheet and the LCD seems to show empty chars when rotating the pot.

7
  • There are tons of different variations of LCD modules. It does look like it's an LCD with an I2C "backpack" on it. Post the model number, a link to the spec sheet if you have it, as well as a link to the specific library you're using and the code you are using to initialize it and send data to it.
    – Duncan C
    Jul 11, 2019 at 21:59
  • From the pictures it looks like the I2C "backpack" has both a backlight adjustment pot (potentiometer) and a jumper on it. Sometimes removing/moving the jumper lets you turn the backlight off, but it appears to have the jumper installed. If it came with instructions or a link to the data sheet, see what it says about the adjustment pot. You might try turning the adjustment pot and see if that causes the backlight to turn on.
    – Duncan C
    Jul 11, 2019 at 22:02
  • did you add lcd.begin(); and lcd.backlight(); to void setup? Jul 12, 2019 at 5:31
  • I have added all the missing information sorry if late
    – CHAMCHOUN
    Jul 12, 2019 at 9:50
  • you have an I2C LCD right? use this: LiquidCrystal_I2C lcd(0x27, 16, 2); instead of LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); . Jul 12, 2019 at 10:22

1 Answer 1

2

Try this:

#include <Wire.h>  
#include <LiquidCrystal_I2C.h>

// LiquidCrystal_I2C lcd(0x27, 16, 2);
// OR
LiquidCrystal_I2C lcd(0x3F, 16, 2);

void setup(){
lcd.begin();   
lcd.backlight();
lcd.setCursor(5,0);
lcd.print("TA DAA...!");
}
void loop{
// do nothing here
}

If that didn't work probably your LCD have a different address than 0x27 which in that case you should run a I2C scanner to show you the addresses of I2Cs that connected to your Arduino:

#include <Wire.h>
// I2C scanner

void setup()
{
  Wire.begin();

  Serial.begin(9600);
  Serial.println("\nI2C Scanner");
}


void loop()
{
  byte error, address;
  int nDevices;

  Serial.println("Scanning...");

  nDevices = 0;
  for(address = 1; address < 127; address++ ) 
  {
    // The i2c_scanner uses the return value of
    // the Write.endTransmisstion to see if
    // a device did acknowledge to the address.
    Wire.beginTransmission(address);
    error = Wire.endTransmission();

    if (error == 0)
    {
      Serial.print("I2C device found at address 0x");
      if (address<16) 
        Serial.print("0");
      Serial.print(address,HEX);
      Serial.println("  !");

      nDevices++;
    }
    else if (error==4) 
    {
      Serial.print("Unknow error at address 0x");
      if (address<16) 
        Serial.print("0");
      Serial.println(address,HEX);
    }    
  }
  if (nDevices == 0)
    Serial.println("No I2C devices found\n");
  else
    Serial.println("done\n");

  delay(5000);           // wait 5 seconds for next scan
}

Check the jumper behind the I2C module (plug it out and in again).

Check the voltage of LED using a multimeter if there's no voltage there, maybe it's just a "bad LCD" try replacing it.

1
  • Thanks this worked for me!!
    – Giri
    Nov 26, 2023 at 11:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.