Pages: [1]   Go Down
Author Topic: LCD and Arduino Troubles  (Read 821 times)
0 Members and 1 Guest are viewing this topic.
illinois
Offline Offline
Newbie
*
Karma: 0
Posts: 19
helps im noobz
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am having trouble with an lcd screen i have it hooked up to work with the Examples Serial Display program that comes with the arduino program.  The LCD worked perfectly before i had it hooked up to a keypad and it would display numbers words ect... when i was doing a final go around with the project i was working on i turned it on and the lcd screen powers up but doesn't display anything.  So after a while of trouble shooting i still haven't found the problem i have checked all the connections for week solder joints ect and all of them seem to be working... The thing that gets me is that it powers up and everythign and when i put in text to be sent to it via the serial monitor all that appears are these characters ||||||?||||||
any help would be appreciated
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 221
Posts: 13848
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is there a contrast pin, or potmeter? COnnect to another serial source? Baudrate set correctlyin the sketch?
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

illinois
Offline Offline
Newbie
*
Karma: 0
Posts: 19
helps im noobz
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yes theres a pot connected ... and the baudrates are matching
Logged

illinois
Offline Offline
Newbie
*
Karma: 0
Posts: 19
helps im noobz
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

not too sure what you mean by connected to another serial source...
as far as i know no... because i've isolated the LCD out of everything else and am just trying to get it to work
Logged

Holland
Offline Offline
Sr. Member
****
Karma: 0
Posts: 439
Arduino likes cookies too
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Eliminate as many variables as possible.
This means.. throw out the serial monitor, make the microcontroller print to the LCD, and only that (I'd do this in the setup routine). Remove all other attached parts, use only the LCD.
Still garbage? have another LCD laying around? try swapping them. If the other is 'bugged' too, it is likely the wiring.
Have a multimeter? check each solderpoint.

If this yields no results, I'd suggest taking pictures of your hardware setup, and posting those together with your entire sketch.
Logged

illinois
Offline Offline
Newbie
*
Karma: 0
Posts: 19
helps im noobz
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've taken everything but the LCD, a pot, and the arduino out of the circuit.  I tried the just printing to the LCD using the Example Hello World sketch and when i do that it prints all of the lines and characters as a weird skinny W type shape i've also checked every point to make sure there was connectivity and there was on all of them... I dont have an extra LCD but i did have an extra arduino that had a program already loaded on it to display a sentence... i plugged in that arduino and powered it up and the displayed sentece worked... so i thought nice its fixed lol so i uploaded the serial display program and boom nothing again tried reloading the old program and nothing still.  
http://www.sparkfun.com/products/255
thats the LCD im using i'll have to upload all the other pictures later at work for a few more hours now.
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 39
Posts: 4389
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yellowcouch:

You really have me confused.  In your original post you imply a serial LCD and in reply #2 you verify baud rates, which only apply to serial devices.  Now in reply #5 you mention taking everything "but the LCD, a pot, and the arduino out of the circuit".  You don't mention still using any serial backpack adapter and you are talking about an "the example Hello World sketch" which, as far as I know is for a parallel LCD.  You also posted a link to a parallel LCD module.   So what is going on?

How about posting your code and a photo of the interconnections while using that code along with a photo of the display?

Don

« Last Edit: November 16, 2010, 11:19:36 pm by floresta » Logged

illinois
Offline Offline
Newbie
*
Karma: 0
Posts: 19
helps im noobz
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

perhaps i was confused too... either way it started working!  lol Basically i took out the wired mess i had and replaced it with some ribbon cable and that cleaned it all up so i totally rewired everything from the ground up and now when i run the "Hello World" example from sketch book it works so i then put in custom code for the keypad to display on the lcd and it worked just fine too!  I'm still not sure what the problem was probably a wire or something... but i still had a question about the Serial display... and it goes back to floresta... i am using a parallel lcd apparently and so the Serial Sketch doesn't work for it? (i tried and it didn't do anything) How would i display characters that i type in the computer to the screen?  would i have to write a different code than the default Serial Display Sketch in the Examples ?  
also thanks to everyone who took the time to read my posts and help im sure it was very very frustrating and confusing for you but i really do appreciate it ! thank you!
-Yellow
Logged

Greenwood, Indiana
Offline Offline
God Member
*****
Karma: 0
Posts: 508
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is included in the arduino IDE
file -> examples -> liquidcrystal -> serial display

Code:
/*
  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
 * 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 8 Feb 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);

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

If it was designed by man it can be repaired by man.

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 39
Posts: 4389
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The datasheets that are provided for electronic components are terse and often cryptic.  The application notes that are sometimes available are somewhat better in this regard, but not much.  Unfortunately the examples provided with the Arduino follow this same pattern.

Here's the comment at the beginning of the sketch:

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 first (cryptic) paragraph tells you that the LCD interface is the standard parallel one and the second (terse and cryptic) paragraph tells you that the source of the information to be displayed on the LCD comes in via the Rx pin and uses the USART in the ATmega, frequently via the USB cable.  Remember that USART stands for Universal Synchronous and Asynchronous serial Receiver and Transmitter and USB stands for Universal Serial Bus.


Quote
file -> examples -> liquidcrystal -> serial display
Thus 'serial display' is an unfortunate choice for the folder and sketch name since the term 'serial' refers to the source of the data that is being displayed on the LCD rather than the type of interface to the LCD.

Don

PS  Did you notice how the sketch cleverly avoids any reference to the R/W pin on the LCD?
« Last Edit: November 20, 2010, 10:25:58 pm by floresta » Logged

Pages: [1]   Go Up
Jump to: