Go Down

Topic: LCD does half of its obligation...just back light (Read 352 times) previous topic - next topic

sabishaw

Hi everybody!
I have an LCD 16 x 2
it glows the backlight but  dosent show any text which i send via serial monitor..
I did use some other simple examples like hello world....guess what,its still same...
here my setup...ya pics arent cool so i m giving blue print,you gotta believe me i did it according to blueprint, if my pics arent clear...""BELIEVE"" > >:(
along with it we shall cast upon ya our code to run ,Behold !the code is from arduino.cc
THANKS


Code: [Select]
/*
  LiquidCrystal Library - Serial Input

 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 displays text sent over the serial port
 (e.g. from the Serial Monitor) on an attached LCD.

 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
 * 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
 modified 7 Nov 2016
 by Arturo Guadalupi

 This example code is in the public domain.

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

*/

// 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 = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // initialize the serial communications:
  Serial.begin(9600);
}

void loop() {
  // when characters arrive over the serial port...
  if (Serial.available()) {
    // wait a bit for the entire message to arrive
    delay(100);
    // clear the screen
    lcd.clear();
    // read all the available characters
    while (Serial.available() > 0) {
      // display each character to the LCD
      lcd.write(Serial.read());
    }
  }
}

sabishaw

https://www.arduino.cc/en/uploads/Tutorial/LCD_Base_bb_Fritz.png


groundFungus

#3
Dec 14, 2018, 07:56 pm Last Edit: Dec 14, 2018, 07:57 pm by groundFungus
I wired a 16x2 LCD to my Uno as shown in your diagram, uploaded and ran the posted code and whatever I enter in the serial monitor is displayed on the LCD so the code works fine. 

Have you tried adjusting the contrast potentiometer?  Does anything show on the LCD?  A row of boxes?  Blank display?

sabishaw

Thank you groundFungus  for reading and expermenting with what I did.....
and good to know it works fine..
Actually i dont have potentiometer now,but when same thought struck ma mind,i used  a couple of resistors one by one but still didnt work....I  was tryin to upload photos of my setup of lcd and arduino,but i dont know why it dosent gets uploaded
thanks again

groundFungus

#5
Dec 14, 2018, 08:06 pm Last Edit: Dec 14, 2018, 08:07 pm by groundFungus
When testing LCDs I don't use a pot.  A 1K resistor from pin 3 (contrast) to ground usually gives good contrast.   Try that.

sabishaw

No sir
didnt work...
but ya,as i put one of the resistors, dotted rectangles showed up.....a minute change,hardly visible,did happen when i sent data from serial monitor....
does it mean its all about contrast

groundFungus

It is looking that way.  You can try just tying the contrast pin directly to ground.  That is maximum contrast.  If that is too dark use a resistor lower than 1K.

sabishaw

Thanks Fungus
It actually works unexpectedly......
i tried all of em,but in vain
but,...now i took voltage from % volts(before i took from #.# volts)...now what happened is:
1.back light became brighter
2.lower line was fully filled with black dotted blocks,and didnt react to message....

groundFungus

#9
Dec 14, 2018, 08:53 pm Last Edit: Dec 14, 2018, 08:55 pm by groundFungus
The solid black boxes are caused by mximum contrast.  Raise the resistance between the LCD pin 3 and ground.  Try 1K, again.

Quote
now i took voltage from % volts(before i took from #.# volts).
What does that mean?  What are %  and #.#?

sabishaw

Damn!
I have a couple of resistors and dont even know what their value is....should i get my self a pot tomorrow to continue it??  if there lies the solution.....
cant buy now...its midnight here...lol
thanks Fungus tho

groundFungus

Yes, the pot will be the way to get the contrast right. 

Paul__B

A useful hint.  Just as you have been using single resistors here, do not connect the 10k contrast potentiometer to 5 V - just leave that end unconnected (or tie it to the wiper).

This is a silly mistake that has become ingrained in hobby (and no doubt, some professional) designs since the "early days".  Not connecting it makes contrast setting twice as easy!  Using a 1k pot makes it even easier.


sabishaw

Thanks Paul__B for telling me that now....i,otherwise,would have made a mistake of buying wrong pot,...and asking questions on this fourum ""POT NOT WORKING"" and would find finalli i ma moron

Paul__B

Not necessarily.  Connecting the pot between ground and 5 V will work - it is the basis of all of the current "shields" and "backpacks" - and "How-to"s.

It's just a silly way to do it when connecting it as a variable resistor and a better value makes things much easier - and reduces unnecessary current drain though this is of course minimal compared to the LED current.

Go Up