LCD won't display anything

I tried to display something simpler before going on to what my project needs but even after following a simple code, my LCD still won't display anything. I think the potentiometer and the wire connections are all alright since they display the "blocks," but when I upload the code, it still doesn't do anything. Here's the simple code:

#include <LiquidCrystal.h>

 LiquidCrystal lcd(A0,A1,A2,A3,A4,A5);

 void setup() {
  // put your setup code here, to run once:
  lcd.begin(16,2);
}

void loop() {
  // put your main code here, to run repeatedly:
  lcd.setCursor(0,0);
  lcd.print("A: Oct B: Binary");
  lcd.setCursor(0,1);
  lcd.print("C:Hex D:Decimal");
}

this is what the LCD looks like before and after uploading the code, nothing changes:

image

I'm using arduino uno r3, 16x2 LCD display

Do you see any change when you adjust the potentiometer attached to V0?

yes, the blocks just disappear. but still no text displayed.

  1. show what LCD pins are connected to these Arduino pins.
  2. put a delay(2000) in your loop

A0 - RS
A1 - E
A2 - DB4
A3 - DB5
A4 - DB6
A5 - DB7

arduino and lcd pins connection

Do invest money in an I²C interface card for the LCD. This saves time in troubleshooting.

1 Like

okay, will do! it's also what we have planned on doing as well. thank u.

Follow this.

1 Like

https://www.youtube.com/watch?v=wEbGhYjn4QI

I can't exactly follow it because the pins that the LCD takes up on the arduino is used for the keypad. Forgive me, this is really not my course. I'm a computer science student, we just got assigned this project randomly.

A computer requires hardware. :grinning:

1 Like

Show us a pic of your complete setup and a schematic. Scribble your schematic on a piece of paper if you need to.

Perform continuity on all connections with an ohm meter. Verify none of your jumpers have failed. They do fail. Breadboard internal contacts fail as well. You may have a bad connection somewhere.

3 Likes

Once again...learn how to use I2C ...........
https://www.brainy-bits.com/post/a-keypad-lcd-with-only-2-pins-no-problem-with-the-i2c-protocol

1 Like

Follow it and just replace the pin numbers there with the pin numbers for your connections.

1 Like

The code you posted does not set up the pins as outputs. Does the LCD library do that for you?

EDIT;
Okay, I just rewatched the video I used to test my display. No need to configure the pins.

Watch this video to learn both ways to interface: parallel and serial. No real need to get the serial adapter just for experimenting. It does save a lot of I/O pins if you are using it in a project though.

Try to get some of the example sketches to work before rolling your own.

Hi, @masumizuu
Welcome to the forum.

Can I suggest you forget about your project and connect the LCD up as per the library's "Hello World" example and run that?
Post a copy of the library's code.

Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.
Just the power supply, UNO and LCD connections as by the example code.

This is to establish that you can basically communicate with your LCD in its basic from.

Thanks... Tom.. :grinning: :+1: :coffee: :australia:

2 Likes

Is the RW Pin connected to GND?

I assume you have your LCD working now.
Please post what the problem was and how you corrected it for the next person with the same issue.

Thank You

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.