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
/*
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());
}
}
}
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?
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
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
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.
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....
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
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.
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
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.
While you are at it you might as well correct this mis-information:
Figure 2: . . . Drops of black resin cover the Hitachi HD44780 chips (one for each line of characters).
The larger of the two epoxy blobs (on the right) is the HD44780 (or equivalent) LCD controller which contains all of the memory and also the control circuitry for the left side of the display (two rows of eight characters).
The smaller of the two epoxy blobs (on the left) is the HD44100 (or equivalent) auxiliary controller which contains the control circuitry for the right side of the display (two rows of eight characters).
Also change the reference of 'lines' to 'rows' to avoid confusion when comparing your information to the data sheet. The term 'lines' in the data sheet refers to the HD44780 memory addressing and there are only two lines of memory, even when controlling a display that has four 'rows' of characters.