Unable to  write data to LCD  LMB162ABC arduino 21

Good evenining,

I’m trying to write some char running an LCD LMB162ABC bought from seeedstudio, using examples present in Arduino 21, like:

/*
  LiquidCrystal Library - display() and noDisplay()
 
 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 uses the 
 display() and noDisplay() functions to turn on and off
 the display.
 
 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(8, 2);
  // Print a message to the LCD.
  lcd.print("hello, world!");
}

void loop() {
  // Turn off the display:
  lcd.noDisplay();
  delay(500);
   // Turn on the display:
  lcd.display();
  delay(500);
}

I’m only changing lcd.begin(8, 2) from lcd.begin(16, 2) as idicated in seeedstudio website

Display is blinking good (noDisplay to display), but I haven’t the printed “hello world”.

Should be a problem in library? Wires are correct and I think I’ve done a good work with solder.

Thanks a lot :smiley:

Marco

After your first post, you can post links. This might be a good time to do just that.

If you are using a different display than the one that the sketch was written for, have you confirmed that the pinout of your LCD is the same as that of the LCD the sketch was written for? Have you confirmed that the LCD IS wired to match the sketch?

More importantly, though, do you know what the commands you are using do, and when the functions are called?

In setup(), which is called once, you write some data to the LCD. Then, loop() is called, nanoseconds later. In loop(), the first thing you do is turn the display off. Why?

Bad Sunday Paul? :o . Seemed a little bit sharped response.

About link, how it works? I noticed that I haven't a "new" tag like other posts, is it "linked" with the concept of link? I can't find this link in the help, please could you explain me how to do that?

Display is wired following the datasheet, provided from seeedstudio shop, shouldn't be the problem. Dunno if it has of some significance but I have a variable voltage over the 4 data bus of my display.

Code is taken from here http://arduino.cc/en/Tutorial/LiquidCrystalDisplay which states :

LiquidCrystal - display() and noDisplay()

The Liquid Crystal Library allows you to control 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 example sketch shows how to use the display() and noDisplay() methods to turn on and off the display. The text to be displayed will still be preserved when you use noDisplay() so it's a quick way to blank the display without losing everything on it.

Tomorrow I'll put at least a delay in the loop, now here it's late, bed is calling :) Have a good evening!

Seemed a little bit sharped response.

I re-read what I wrote. I don't see where you got that impression.

About link, how it works? I noticed that I haven't a "new" tag like other posts, is it "linked" with the concept of link? I can't find this link in the help, please could you explain me how to do that?

I don't quite follow this. You have some LCD. You told us it's name. A URL to the actual device/manufaturer/data sheet is more useful. The first button on the top row inserts url tags. Paste the URL between the tags, and it appears in the post as a hyperlink.

This example sketch shows how to use the display() and noDisplay() methods to turn on and off the display. The text to be displayed will still be preserved when you use noDisplay() so it's a quick way to blank the display without losing everything on it.

I'd still make loop() do nothing. Then, you would know whether the problem was with the noDisplay() function or with the ability of the LCD to display text.

Still, not having a link to the LCD you have, it's hard to say what the problem is.

'morning Paul.

Ah, I did not understand about the link, here my LCD: http://www.seeedstudio.com/depot/datasheet/LMB162ABC-Manual-Rev0.2.pdf

later at home I will try to mess a little in the loop

Thanks!

How is the weather there in the North?

The difference between sending commands and sending text to the LCD is pulling RS LOW. I suppose you could carefully check that wire/solder connection. That's the first pin number in the LiquidCrystal line.

On the other hand if you can blank and unblank the display twice per second, you've clearly sent some commands to it, which implies that almost everything must be correct.

The contrast potentiometer could also be the problem, maybe more likely--you're not actually seeing any text.

Perhaps it would be in your best interest to read the first 10 lines of your program, then take a close look at your LCD. Notice the driver that your LCD uses and the driver that the LCD library expects the LCD to use.

The difference between sending commands and sending text to the LCD is pulling RS LOW. I suppose you could carefully check that wire/solder connection

Thanks for reply Jr,my RS pin (the 4th in my case) is receiving a 0 from pin 12.

Perhaps it would be in your best interest to read the first 10 lines of your program, then take a close look at your LCD. Notice the driver that your LCD uses and the driver that the LCD library expects the LCD to use.

Interpolating a pair of information I have to say that the lcd is an Hitachi 44780 compatible. In datasheet driver is indicated as an S6A0069/65

The 4-bit Arduino LCD library What is it? Why?

This is an unofficial Arduino library which allows your Arduino to talk to a HD44780-compatible LCD using only 6 Arduino pins. It is neillzero's conversion of the code from Heather's original Arduino LCD tutorial which required 11 Arduino pins.

Download it! (includes an example sketch).

Compatibility

This library should work with all HD44780-compatible devices. It has been tested successfully with:

  • Xiamen GDM1602K (from Sparkfun)
  • Display Elektronik DEM 16101H (16x1) and DEM 16217SYH (16x2) (from Maplin).
  • Display 20x4 (KS0066U-00PCC et KS0065BPCC controllers, HD44780 code compatible) usable with Jonathan's modified library to get all 4 lines working: (From LEXTRONIC France) (this version also adds some optimizations and WriteCGRAM to use user-defined characters). Read more on 20x4 modifications.
  • Display 16x2 (KS0066 controller, black & white, no back-light, HD44780 code compatible). First line is working, but both lines are greatly dimmed when displayed at the same time (I think it's a problem in my circuit, not in the library)
  • Hantronix HDM16216L-B display, 16 characters X 2 lines.
  • Tianma TM404A, 40 characters x 4 lines, first 2 lines are working, for third and fourth line a modification is necessary, see LCD4BitLibrary-tm404a
  • Everbouquet MC0802A-SGR, little 8x2 (from Farnell)
  • DMC16249 2x16 display from Optrex
  • DE-LM001, 8 characters x 2 lines (from Sure Electronics)
  • Emerging Display Technologies Corporation display # 24210
  • Sharp LM40A21, 40x2, using HD44780A00. Mostly worked, adding a delay(2) after the CMD_HOME in cursorTo() fixed periodically garbled display problem. The HD44780 datasheet (pdf) I looked at specifies a 1.52ms delay for the Return home command at nominal f_osc of 270kHz, but it appears that this value could be as high at 2.16ms at low end of f_osc range, 190Khz.
  • POWERTIP PC-4002B A, 40x2
  • Tinsharp TC1602A-09T, 16x2
  • Displaytech 162B, 16x2 (from RS)
  • ECM1602A (16x2, S6A0069 based)
  • Batron BTHQ21608VSS (16x2, based on the Samsung KS0070BP-00CC)
  • DEM16217 2x16 from Segor (Datasheet)
  • NHD-0216K1Z-NSB-FBW-L (Newhaven Display 16x2)
  • Dalian YM1602C (edited code to move Enable pin from 2 to 11)
  • Hitachi LM071L
  • Winstar WP2002A-Y-JCS 20x2
  • Tinsharp Electronics TC1602D-02(R) 16x2 (added 2nd Apr 2009)
  • Fordata Electronic FDCC1602G-NLYFTW-R
  • Samsung 16T202DA1 (16x2 VFD Display)
  • Samsung 20T202DA1E (20x2 VFD) Unused pins can be left floating
  • add your tested device here

taken from http://www.arduino.cc/playground/Code/LCD4BitLibrary

and from seeedstudio

Hook everything up EXACTLY like in this picture from the Arduino page: http://arduino.cc/en/uploads/Tutorial/lcd_schem.png Now load the "Scroll" Example from Arduinos LiquidCrystal Library. Change these two lines

lcd.begin(16, 2); lcd.setCursor(0,7);

to

lcd.begin(8, 2); lcd.setCursor(0,0);

now upload it to your Arduino or Seeduino and watch your display fire up! You may have to adjust the potentiometer a little if you can't see anything.

As an alternative to the potentiometer you can connect the Vo pin of the LCD with any available PWM-output (I use pin 9) and add the following code in the setup() section:

pinMode(9, OUTPUT); analogWrite(9, CONTRAST);

replace CONTRAST with the value of your choice. Values around 10-20 give a nice bright output. (thanks for above tutor from DedeHai)

which suggests to use a example based on Hitachi chip.

With the example code present in the 4 bit LCD library (another library, thanks Paul then) I'm able to fill my 16 digits with full black, not yet characters.Just have to mess with code.

Will post sketch and photos if could obtain improvements.

Guten nacht

Today also full digits won’t start. Really don’t know how it works. I’ve posted also in seeedstudio forum

marcz:

If you were offended by Paul's initial reply then make sure you stay away from AVRfreaks.

taken from http://www.arduino.cc/playground/Code/LCD4BitLibrary

I hope you aren't considering using this library.

Display is blinking good (noDisplay to display), but I haven't the printed "hello world".

If you haven't printed the message then exactly what is blinking?

Did you verify the setting of the contrast potentiometer as John mentioned in reply # 6. Take a look about midway through the tutorial at http://www.ladyada.net/learn/lcd/charlcd.html if you don't understand what this means. You don't need or want the Arduino connected at this point.

On second thought you should just use this tutorial in it's entirety to verify that your LCD works before you mess with the seedstudio stuff.

Don

Forget everything above. I think are interpreting your LCD pins incorrectly. That looks an awful lot like the number 16 next to what you think is pin 1.

Don

If you were offended by Paul's initial reply then make sure you stay away from AVRfreaks.

Why? What's happening in AVR freaks? Is it a sort of "House of Flying Daggers? :).

No, really, I'm not offended by Paul. We all can just say a million of thanks to him, me first.

Now I'm back to the original LCD library. Blinking is in my display, half second more shiny than the next.

In photo my display seems off but is on.

I will soon take a look on your suggested tutorial! Thanks Don!

In photo my display seems off but is on.

If that really is a '16' next to the leftmost pin on your display module then pin 1 is at the other end. Also, every display that I have seen has pin 1 at the outside edge, but there could be exceptions.

The display is not on, it is the backlight that is on. You have applied power to pins 15 and 16, which is the backlight. You have nothing connected to pins 1 and 2 so the display module is not getting power. Also the rest of your connections are exactly backwards as well.

Pull your module out of the breadboard, turn it 180 degrees, reinsert it and try again.

Don

You are probably right Don, I will try at home. Later I will post (hope an hello world).

If you are right it remembers me the left-hand murder episode of South Park... me donkey :-/

Thank you so much guys.

I'm a donkey as expected :'( :D :D

Uploaded with ImageShack.us

Just needed to invert wiring, explained by Don.

Thanks a lot!!! :D