Go Down

Topic: 16x2 LCD will not even show blocks/squares (Read 270 times) previous topic - next topic

pnschroeder

Jul 11, 2018, 05:34 pm Last Edit: Jul 11, 2018, 05:43 pm by pnschroeder
I have checked my wiring multiple times, and my pin headers are soldered to my LCD screen.  I am using a standard breadboard if that makes any difference.  Currently, I am using the Arduino UNO but I have also tried to do this using the Mega as well as a different LCD screen that is also 16x2.  I've also swapped out jumper wires in case of a faulty wire.

My pins are connected as follows:
VSS: ground
VDD: 5V
V0: middle leg of potentiometer       (each of the other 2 legs is connected - one to ground and one to 5V)
RS:digital pin 12
RW: ground
E: digital pin 11

D4: digital pin 5
D5: digital pin 4
D6: digital pin 3
D7: digital pin 2
A: 5V
K: ground


After attaching pins A and K on the LCD to 5V and ground, my backlight works.  However, if I am understanding this correctly, connecting VSS, VDD, and V0 should cause a row of blocks/squares to appear.  I cannot get any to show up, and I am not sure why.

Also, should turning the potentiometer modify the "brightness" of the LCD backlight?  I know it is supposed to change contrast to make text more legible, but currently, adjusting my potentiometer results in no changes on my backlit LCD screen.


My code is extremely simple, but I'm sure someone will ask for it, so here it is.  

Code: [Select]

#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  lcd.begin(16, 2);
  lcd.print("hello, world!");
}

void loop() {
}



I should note that I used this LCD screen earlier today and it worked fine, but then I attempted to move all of my wiring from one breadboard to another (my project had 3 breadboards and I wanted to condense it down to 1).  At first, I was also running 6 pushbuttons and a piezo on the same breadboard from the Mega, but for testing purposes, I moved my LCD and its wires to a clean breadboard and tried using the UNO.

Any help would be greatly appreciated.  Thanks!

bperrybap

After attaching pins A and K on the LCD to 5V and ground, my backlight works.  However, if I am understanding this correctly, connecting VSS, VDD, and V0 should cause a row of blocks/squares to appear.  I cannot get any to show up, and I am not sure why.
You are correct. If blocks/squares on one line don't show up, then there is either some kind of wiring issue or the LCD is dead - or there is a contrast control problem.
I would lean toward a wiring issue as the LCDs are pretty tough.

Quote
Also, should turning the potentiometer modify the "brightness" of the LCD backlight?  I know it is supposed to change contrast to make text more legible, but currently, adjusting my potentiometer results in no changes on my backlit LCD screen.
You should note that backlight brightness and pixel contrast are not the same thing.
While adjusting contrast can make the pixels darken/lighten it is not affecting the brightness of the backlight.
If the contrast control is working, then with the pot at one end all the pixels will be off, at the other end all the pixels will be on.
This is true regardless of what is supposed to be on the display.
Somewhere in between, only the pixels that are supposed to be on will be on.

Quote
I should note that I used this LCD screen earlier today and it worked fine, but then I attempted to move all of my wiring from one breadboard to another (my project had 3 breadboards and I wanted to condense it down to 1).  At first, I was also running 6 pushbuttons and a piezo on the same breadboard from the Mega, but for testing purposes, I moved my LCD and its wires to a clean breadboard and tried using the UNO.
This sounds like a wiring issue, which also includes soldering, and/or breadboard issues.

Can you post some clear photos of your setup so we can take a look at your wiring and soldering.

--- bill

floresta

Does your new breadboard have 'interrupted' power bus lines - typically represented by red and blue lines that have a break near the center of the breadboard.

Don

dharanivel

my 16x2 lxd is not initializing properly.It is showing black boxes.I think the header file is the problem.please help me

Paul__B

V0: middle leg of potentiometer       (each of the other 2 legs is connected - one to ground and one to 5V)
It is a minor point, but it is a mistake of some antiquity to connect the potentiometer to 5 V which makes contrast setting more difficult.  It should not, only to ground on one end.

Simple test, given that you actually have and measured 5 V on Vcc, is to connect Vo to ground as a trial.

my 16x2 lxd is not initialising properly.It is showing black boxes. I think the header file is the problem. please help me
Still haven't figured it after a week and multiple cross postings?

Since you never cited your code at all, nor a picture taken properly in daylight of your assembly, I can't see how we could possibly help you! :smiley-eek:

Go Up