Hi, i have tried several versions of printing hello world onto an lcd including the one on here. i dont get any results the lcd lights up but that is it. i don't get any text or anything.
is there a known bug or is there something more sinister going on
many thanks
coop
Do you want another guess?
Or are you going to post all the required details according to the forum guidelines.
Code (with code tags), connection diagram, and pictures.
Leo..
Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html . Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Can you post a picture of your project so we can see your components and layout?
here is the code i got it from going to file → examples ->liquid crystall-> hello world in the arduino ide.
/*
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
modified 7 Nov 2016
by Arturo Guadalupi
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/LiquidCrystalHelloWorld
*/
// 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);
// 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);
}
the circuit diagram was again from this site and can be found here https://www.arduino.cc/en/Tutorial/HelloWorldt
as both the code and the diagram are from the same source im guessing the header file is the right one but anything is possible at this stage.
cooper1200:
I don't get any results the LCD lights up but that is it. I don't get any text or anything.
Define "any text or anything".
With only pins 1,2,3, 15 and 16 connected there is something you should see when you adjust the contrast pot. Do you? If not, there is a wiring error.
Incidentally, it will make it easier if you first correct a known bug that has propagated for many years in designs. Do not connect the contrast potentiometer to 5 V - Vcc. Leave that end unconnected.
You do not disconnect ground, you leave ground connected and diisconnect the Vcc (5V) end of the pot. So the pot is connected only to ground and the wiper of the pot goes to pin 3 of the LCD.
is vo a voltage out???? if so it makes no sense for it to be connected to +5v in the diagram. if its an input then unless it is connected to ground internally it will need a ground.
ok lets get down to the nitty gritty here and start eradicating things.... what v out do you get from the pwm pins on the arduino.... as the inputs for the lcd are basically binary i assume if i set a pin high i should be able to see the corresponding bit on the lcd or does it need some form of a clock shift it internally
If, when you adjust the contrast pot, nothing shows, then there is likely a problem with the wiring. A properly wired but uninitialized display should show a line of boxes. We really need to see your wiring and the code that you uploaded.
code is on post 7
i don't know how else to show you the connections other to write them out long hand but they are as per he circuit diagram linked to
vss = ground
vdd = 5v
vo = voltage divide of the pot
rs = pin 12
r/w is pulled to 5v
e = pin 11
db4 = pin 5
db5 = pin 4
db6 = pin 3
db 7 = pin 2
a goes to plus 5v with a 220 ohm resistor in series
obviously the 2 outer legs of the pot go to 5v and ground
all this is on the circuit diagram i linked to in post 7 i think