LCD 1602 without I2C not working with arduino nano [Bad Soldering]

I am Madhav and I am a beginner in Arduino programming. Recently, I was using lcd 16*2 without I2C with Arduino nano and it is not displaying anything except white columns with library http://www.arduino.cc/en/Tutorial/LiquidCrystalHelloWorld modified modified by Arturo Guadalupi.



/* LiquidCrystal Library - Hello World

Demonstrates the use a 16x2 LCD display. The LiquidCrystal library works with all LCD displays that are compatible with the Hitachi HD44780 driver. There are many of them out there, and you can usually tell them by the 16-pin interface.

This sketch prints "Hello World!" to the LCD and shows the time.

The circuit:

* LCD RS pin to digital pin 10
* LCD Enable pin to digital pin 9
* LCD D4 pin to digital pin 2
* LCD D5 pin to digital pin 3
* LCD D6 pin to digital pin 4
* LCD D7 pin to digital pin 5
* LCD R/W pin to ground
* LCD VSS pin to ground
* LCD VCC pin to 5V
* 10K resistor:
* ends to +5V and ground
* wiper to LCD VO pin (pin 3)

Library originally added 18 Apr 2008 by David A. Mellis library modified 5 Jul 2009 by Limor Fried ([http://www.ladyada.net](http://www.ladyada.net/)) example added 9 Jul 2009 by Tom Igoe modified 22 Nov 2010 by Tom Igoe modified 7 Nov 2016 by Arturo Guadalupi

This example code is in the public domain.

http://www.arduino.cc/en/Tutorial/LiquidCrystalHelloWorld

*/

// include the library code: 
#include <LiquidCrystal.h>

// initialize the library by associating any needed LCD interface pin // with the arduino pin number it is connected to 
const int rs = 10, en = 9, d4 = 2, d5 = 3, d6 = 4, d7 = 5; 
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() { // set up the LCD's number of columns and rows: 
lcd.begin(16, 2); // Print a message to the LCD. 
lcd.print("hello, world!"); 
}

void loop() { // set the cursor to column 0, line 1 // (note: line 1 is the second row, since counting begins with 0): 
lcd.setCursor(0, 1); // print the number of seconds since reset: 
lcd.print(millis() / 1000); 
}

But when I use the same LCD 16*2 without I2C and the same library with Arduino uno it works fine. I am using a 10k potentiometer. Although I have used the same circuit and many times rechecked the circuit and pins, but it still not displaying any text with nano.

Arduino Nano is not defective as it did all other work the same as Arduino uno except for lcd 1602.I also uses the same power source for both same with usb.

Please help me to solve the problem without using I2C.

Welcome to the forum

To all intents and purposes, for what you are using them for the Uno and Nano are exactly the same. I suspect that you have a wiring fault

Did you use a breadboard when you used the Nano or did you connect directly to its pins as you presumably did for the Uno ?

1 Like

Question : for what you are using them for the Uno and Nano are exactly the same. I suspect that you have a wiring fault
Answer: Yes, I am using it on both uno and nano for the same without having any wire fault.

Q : Did you use a breadboard when you used the Nano or did you connect directly to its pins as you presumably did for the Uno ?
A : Yes, I use breadboard for lcd in each case and connected the pin correctly in case with nano and uno as in short time I make it direct.

But it works uno only not for nano

It is possible your Nano has a bad port pin, try another Nano and see if the problem goes away. Since the UNO and Nano are basically the same and it works on the UNO your code is OK. If you do not have another Nano then you need to test the involved Nano port pins.

Compare the number of free bytes remaining on compile. I am not sure if they are equal.

Has the breadboard got a continuous row of connections along its power lines or have they got breaks in the centre like some have ?

Please post clear 'photos of your test setup with the Nano connected and with the Uno connected

yes i have tested nano by using other sensors and module and it works well. I think there is not a hardware issue , might be software issue

Please humour me and post the 2 'photos

I am sorry but it is impossible to tell from those 'photos whether the Nano and LCD are connected as they should be to match the code being run. I am, however, very suspicious of this area
image

Are there pins from the LCD and pins from the Nano connected together via the breadboard ?

1 Like

Yes it is very suspicious area as my breadboard contain 30 rows only and after connecting nano and lcd together, then there is one row in common which 12th row and i declare 12th row as OUTPUT with lOW function and it functions as a ground for lcd.

pinMode (12, OUTPUT);
digitalWrite(12,  LOW);

also i connect to gnd pin too

But as it turns out the Uno and Nano are not actually wired to the LCD in exactly the same way. I am not saying that your workaround of using pin 12 as a surrogate GND is causing the problem but it would be interesting to eliminate the possibility, because frankly I don't like the sound of it at all

after elimination the problem still remain same

How did you work round it ?

I simply remove lcd from breadboard and directly connect them with wires

Sorry, but I am out of ideas

You can PM me on this forum but I can't guarantee that I will reply or if I will be able to help depending on other commitments

I do not use WhatsApp

No, none

okay last question; any last idea of issue

No, except from it being a wiring fault which you seem determined is not the case