0
\$\begingroup\$

I an trying to connect a 16x2 LCD text module with Arduino and it continuously shows only the green backlight. My code is correct and my connections are also correct. I tried the same project on Proteus and it works fine.

Thanks for everyone issue is solved..i buy new LCD and everything is fine.

#include <LiquidCrystal.h> 

LiquidCrystal lcd(1, 2, 4, 5, 6, 7);

void setup() { 
   lcd.begin(16,2); 
}

void loop() { 
    lcd.print("Sanjeev"); 
    delay(3000);  
    lcd.setCursor(2,1);
    lcd.print("LCD is working"); 
    delay(3000); 
    lcd.clear(); 
    lcd.blink(); 
    delay(4000); 
    lcd.setCursor(7,1); 
    delay(3000); 
    lcd.noBlink();
    lcd.cursor(); 
    delay(4000); 
    lcd.noCursor();
    lcd.clear(); 
 }

Schematic

Photo of hardware 1

Photo of hardware 2

enter image description here

\$\endgroup\$
12
  • 3
    \$\begingroup\$ Welcome to the site. Please note that it's not a free design house, homework-answering service or on-line technical encyclopedia, copied out to you on demand. People will help you take the next step if your question shows you've done as much as you possibly could on your own - which yours doesn't, I'm afraid. Please edit your question and greatly improve it. Show your work and findings so far in considerable detail with a schematic. The schematic tool here is a breeze to use. The better the quality of question, the better the quality of the answers you will attract. Again, a very warm welcome. \$\endgroup\$
    – TonyM
    May 17, 2020 at 11:59
  • 2
    \$\begingroup\$ It’s good practice to include schematics and/or code with your question. You assert your code and connections are correct but you do not include them so we just have to guess. Did you test your Arduino and your display separately? \$\endgroup\$
    – StarCat
    May 17, 2020 at 12:21
  • 2
    \$\begingroup\$ Proteus is a simulator. It skips a lot of details and it lets you do things in absolutely stupid ways that would normally fail to work in real life. So it is extemely unlikely that the display is broken, it is far more likely that the problem is in your code or connections to the display. Post the code and schematics to see where the issue is. Also picture of the built hardware to see if it matches the schematic or not. \$\endgroup\$
    – Justme
    May 17, 2020 at 12:51
  • 2
    \$\begingroup\$ I have found that displays like yours need time to initialize themselves. Try adding a delay of 0.3 seconds at initial runtime and then communicate with the display. \$\endgroup\$
    – Marla
    May 17, 2020 at 13:50
  • 2
    \$\begingroup\$ @Reroute If the display was turned on, and the contrast pin would be 0V, the characters would be black. Currently, either the display is not even initialized to on, or if it is initialized to on, the contrast is not 0V. \$\endgroup\$
    – Justme
    May 17, 2020 at 14:03

2 Answers 2

3
\$\begingroup\$

After a bit of contrast adjustment the photo show pin 3 is connected:

enter image description here

But as others have commented the Original Poster needs to edit the question to add more details about what has been connected to what and example code that proves that when the controller code changes a signal that change reaches the LCD module.

EDIT

Sanjeev,

This is the Arduino sketch I got to work:

#include <LiquidCrystal.h>

LiquidCrystal lcd(1, 2, 4, 5, 6, 7);

void setup() {
    lcd.begin(16,2);
}

void loop() {
    lcd.print("Sanjeev");
    delay(3000);
    lcd.setCursor(2,1);
    lcd.print("LCD is working");
    delay(3000);
    lcd.clear();
    lcd.blink();
    delay(4000);
    lcd.setCursor(7,1);
    delay(3000);
    lcd.noBlink();
    lcd.cursor();
    delay(4000);
    lcd.noCursor();
    lcd.clear();
}

This is how I connected my Arduino UNO:

enter image description here

This is it running:

enter image description here

EDIT 2

@sanjeev-sharma, From your photos it looks like you have reversed the order of the data bit lines from the Arduino to the LCD module.

\$\endgroup\$
6
  • \$\begingroup\$ @SamGibson Again same problem, I recheck connection and code but still got nothing. should I go with new lcd ? \$\endgroup\$ May 18, 2020 at 5:45
  • \$\begingroup\$ @sanjeevsharma - Hi, I would write my own short troubleshooting answer if the question was open. until then, I'll just give a few thoughts: "Again same problem" So you have a problem with your setup, that Dan1138 doesn't have. "should I go with new lcd ?" That is one option, but I can't say that you should do that, as I don't know all your constraints. So apply troubleshooting skills - which parts can you check in other ways? Which parts can you swap with other, known-good parts? How can you visualise signals? You could solve this in 5 mins with a cheap logic analyser (or scope). \$\endgroup\$
    – SamGibson
    May 18, 2020 at 9:03
  • \$\begingroup\$ @sanjeevsharma, Can you post a clear, close up photo of the connections between the Arduino and the LCD module? \$\endgroup\$
    – Dan1138
    May 18, 2020 at 15:57
  • \$\begingroup\$ @Dan1138 Sir, I share a photo of my connection. Please check it. \$\endgroup\$ May 18, 2020 at 19:03
  • \$\begingroup\$ @sanjeevsharma, The LCD module data bits look to be in the correct order. Have you tried it yet? \$\endgroup\$
    – Dan1138
    May 18, 2020 at 19:21
0
\$\begingroup\$

It is not very clear in the image you have taken and also you didn't provide us enough information, but by the looks of it i think pin number 3 is not connected to anything which is the pin for setting the Contrast. Try connecting it to the circuit supply via a potentionmeter (Don't connect it directly to the supply) and then rotate the knob until you can see the text on your LCD screen.

\$\endgroup\$
2
  • \$\begingroup\$ thanks for suggestion sir, \$\endgroup\$ May 17, 2020 at 18:31
  • \$\begingroup\$ but pin 3 is connected to potentionmeter, male header pin is solidered to wire.. \$\endgroup\$ May 17, 2020 at 18:33

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.