Go Down

Topic: 16x2 text display (Read 1 time) previous topic - next topic

Nicklas

Hi guys

Hoping someone have a bright idea about what's wrong with my display.

It's wired up to my Arduino Mega 2560 and as long as i'm utillizing "lcd.begin(16, 1);" everything works fine, great contrast and all (Though I can only use 1 line).
When I change the "lcd.begin(16, 2);" then the text in the display nearly fades completely out. I can barely make out the "hello, world!" and the next line does have the seconds counting up, but it's very low contrast.

I'm using the standard "Hello Example" as pasted below.

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

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);

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);
}

I hope someone have an idea?

Best regards
Nicklas

olikraus

some delay might help:

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);
  delay(100);
}

liudr

Did you use a potentiometer?

Nicklas

Yes I have a 10K potensiometer mounted at the Vo input on the display. and it's working as long as I'm only utillizing the upper line in the display.
I've now tried to use some delay 100-1000ms and it's still the same.
I've measured the voltage on the supply from the Arduino and it's 4,99V. the Vo input at the display gets 0V at min. and 4,98V at max.

liudr

If you do lcd.begin(16,2); and then adjust the potentiometer, will you get a better contrast? How did you connect the potentiometer to the lcd? A nice picture will be needed.

Go Up