210Views10Replies

Author Options:

Hi, I have a problem with a 16x2 lcd... Answered

So I connect this display to my arduino uno and I upload the code from the arduino website. I also do the same wiring... But the lcd displays only a row of black boxes. I tried many other wiring options and connections from the Internet but none of them works. I have always the same resut.
wating your answers
Thank you in advance

Discussions

0
user
IlirD2

1 year ago

this is the code I used:

/*
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 12
* LCD Enable pin to digital pin 11
* LCD D4 pin to digital pin 5
* LCD D5 pin to digital pin 4
* LCD D6 pin to digital pin 3
* LCD D7 pin to digital pin 2
* 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)
example added 9 Jul 2009
by Tom Igoe
modified 22 Nov 2010
by Tom Igoe

This example code is in the public domain.

http://www.arduino.cc/en/Tutorial/LiquidCrystal
*/

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

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12,11,5,4,3,2);

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

voidloop(){
// 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);
}

As I said before my display shows only black boxes in the first row.

Can I connect it in 8 bit mode? May it function in 8 bit?

LCD_Base_bb_Fritz.png

The program isn't sending the correct initialisation to the screen, or your wiring is wrong, or you need to deliberately wire the unused AD lines 4..7 to ground. I remember one particular display that had to have the AD lines pulled in 4 bit mode.

Thanks man. Now the lcd doesn't show anymore the black boxes but it shows strange characters. The circuit hasn't been changed. I've only connected the unused databuses pins to the pot's ground. Please help.

20170123_200527.jpg20170123_200521.jpg20170123_200541.jpg

Do I connect the AD lined directly to the ground of the pot or to the ground of the arduino? If I have to connect them to the ground of the arduino, which I choose: the digital gnd or one of the normal gnd?

Which ever is easiest. Pot ground is closest. All the grounds on the arduino are common, but digital ground is "dirty" and used for digital signals like the ones to your screen

Sounds like your contrast is off wire it like this and adjust the pot.

LCD_16x2_16pin_c.png

Serial or paralell connection?
5V supply for the display is sufficient?
Coorect code for the type of display used?

No clue where you found it but usually they come with a potentiometer to adjust the contrast level.
Without that you need to address the right pin on the display and set the contrast by code.
Most code you find online for these displays is made for a complete display (plug and play) but not for a barebone so you might have to make adjustments.

0
user
iceng

1 year ago

Contrast may be too high.....

Are you running 4 bit code ?

Is this your first LCD ?

Don't forget to run the initialisation code for the display, before it can display anything. Have you connected the traditional contrast pot too ?