Pages: [1] 2   Go Down
Author Topic: Interfacing 40x4 LCD (SPLC780D or ST7066U)  (Read 3607 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm trying to get the lcd working with LiquidCrystal440.

Here is the code im using:

Code:
#include <LiquidCrystal440.h>

//LiquidCrystal lcd(RS,RW,Enable1,Enable2,data3,data2,data1,data0); // for 40x4 lcd
LiquidCrystal lcd(31,33,35,37,39,41,43,45);

void setup()
{
  lcd.begin(40,4);
}

void loop()
{
  lcd.print(" Testing ");
  delay(400);
 
}

Problem is, nothing is appearing on the lcd. Has anyone tried interfacing with this model or similar?

The 40x4 LCD I'm using is :NHD‐0440WH‐ATFH‐JT#
http://www.newhavendisplay.com/specs/NHD-0440WH-ATFH-JT.pdf


Logged

Israel
Offline Offline
Sr. Member
****
Karma: 5
Posts: 291
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

When you only apply power to the LCD, do you see 2 white lines?
Have you connected Vo (contrast) to a POT? Try to connect Vo to GND.
Logged


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

Quote
I'm trying to get the lcd working with LiquidCrystal440.
Have you tried the updated version?  The original LiquidCrystal440 library was written for the earlier versions of the Arduino IDE (pre v1.0) .
To get a copy start here:--> http://code.google.com/p/liquidcrystal440/ and follow the Downloads link to get to the latest version.


Quote
The 40x4 LCD I'm using is :NHD‐0440WH‐ATFH‐JT#
Many of the New Haven displays use a controller that has an instruction set based on that of the Hitachi HD44780U but the instructions are not identical nor are the timing requirements.  It is likely that the library would have to be modified to work with those displays.

Don
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

When you only apply power to the LCD, do you see 2 white lines?
Have you connected Vo (contrast) to a POT? Try to connect Vo to GND.

I dont see any lines when i power the lcd. I do see two # lines when i connect Vo to ground or set the 20k pot all the way up. Does this mean something?

Quote
I'm trying to get the lcd working with LiquidCrystal440.
Have you tried the updated version?  The original LiquidCrystal440 library was written for the earlier versions of the Arduino IDE (pre v1.0) .
To get a copy start here:--> http://code.google.com/p/liquidcrystal440/ and follow the Downloads link to get to the latest version.


Quote
The 40x4 LCD I'm using is :NHD‐0440WH‐ATFH‐JT#
Many of the New Haven displays use a controller that has an instruction set based on that of the Hitachi HD44780U but the instructions are not identical nor are the timing requirements.  It is likely that the library would have to be modified to work with those displays.

Don

I have modified my liquidcrystal440 to work with the new software. simply changed two void functions to return the correct values and replaced a library to be arduino.h

I did go to the link but are you referring to liquidcrystal440 that was released in april 2010? Is that the newest? Should i try any of the other libraries there?
Logged

Israel
Offline Offline
Sr. Member
****
Karma: 5
Posts: 291
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You need to either hook up a POT or hook up Vo to ground, this is the contrast pin, without doing so you will not see anything on the display.
Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You need to either hook up a POT or hook up Vo to ground, this is the contrast pin, without doing so you will not see anything on the display.

So the lcd should have these 2 rows that are dark square blocks? That's normal?
Logged

Israel
Offline Offline
Sr. Member
****
Karma: 5
Posts: 291
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

When you apply power, yes. After you initialize the display it should go blank and allow you to send data to it.
Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Anyone know someone who may be able to help with the coding to get this LCD working?
Logged

Israel
Offline Offline
Sr. Member
****
Karma: 5
Posts: 291
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Doesn't the code you posted in the first post work?
Logged


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

Quote
Doesn't the code you posted in the first post work?
That is not really a good sketch to use for testing any LCD, much less one with four lines.

The most important problem is that by putting the code in loop() you are rewriting the same information to the display over and over again, even though the information does not change.  That type of information should should be displayed in setup().

Also, you are not checking out the cursor positioning which is especially important with a display such as yours which has two controller chips.

Here's what I typically recommend for a generic 16x2 display.  


Code:
#include <LiquidCrystal.h>

//LiquidCrystal lcd(RS, E, D4, D5, D6, D7);
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);      // put your pin numbers here

void setup()
  {
  lcd.begin(16, 2);                          // put your LCD parameters here
  lcd.print("hello, world!");
  lcd.setCursor(0,1)
  lcd.print("it works!");
  }

void loop()
  {
  }

If you use this code with your display and the standard LiquidCrystal library it should work correctly for either the upper or lower two lines depending on which chip select line you use.  You can also use it to test out both halves of the display at once (with the same information on each half) by connecting both of your chip select lines to the same Arduino pin.

This code can also be modified fairly easily to test your display with the updated LiquidCrystal440 library.  Make sure that you
follow the Downloads link to get to the latest version as I mentioned earlier.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The reason my code is the way it is is because once the first row is filled up it will go to the next and so on(right??). So there shouldn't be a problem with how I have the lcd.print in the loop() instead of in the setup(). I've tried all the basics like using the normal liquidcrystal library and running half and half. So 40x2 with one enable pin and another 40x2 with the other enable pin. Nothing at all works. I've used pretty much all the libraries in the downloads link you suggested floresta.

I have a feeling your right when you said: "Many of the New Haven displays use a controller that has an instruction set based on that of the Hitachi HD44780U but the instructions are not identical nor are the timing requirements.  It is likely that the library would have to be modified to work with those displays."

So that leaves coding the library which I don't have a clue on. Is there a chance we can get someone to help with modifying the 40x4 library to work with the controller used in this LCD? That would be a great service to myself and anyone else who purchases this LCD considering its on digikey and easy to purchase.
Logged

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

Quote
The reason my code is the way it is is because once the first row is filled up it will go to the next and so on(right??).
Yes, as long as you are not interested in controlling where your message appears.

Quote
So there shouldn't be a problem with how I have the lcd.print in the loop() instead of in the setup().
The display does not have to be 'refreshed'.  If the information does not change it only has to be written to the display once.  There's no problem in rewriting the information unless you try to do it too quickly and as long as you don't care about any flicker that may come up.  BUT - you don't want to do this while you are verifying that your display is working.  You want to write something to the display and see if it actually appears there.  By doing this in loop() you are introducing the possibility that your information was written correctly and was then immediately overwritten by something else.  The bottom line is that you don't really want to do anything in loop() while you are initially trying to get your LCD to work.

In order to determine if your New Haven display can use a library written for an HD44780U controller or if there is another problem you will need to get a copy of the datasheet for your particular display.  The information at the link in your original post is more like a sales blurb than a datasheet.

Since there have been many questions in the forum about this topic I approached New Haven and asked them to send me one of their displays so that I could work with it and be better equipped answer such questions.  They offered to sell me one but declined to send a complimentary sample.  I am not inclined to spend money on a display just so I can do their product support for them.

Quote
Is there a chance we can get someone to help with modifying the 40x4 library to work with the controller used in this LCD?
John Raines, the author of LiquidCrystal440, used to participate in this forum (jrraines) but I have not seen him around in a while.  You could try and contact him.

Don


Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yeah, he hasn't been on since 2012. I doubt I'll have any luck finding him.

I could not find a datasheet other than the one I found that i posted on the first post. I did find the two controller datasheets.

Controller Information
Built‐in SPLC780D. Download specification at http://www.newhavendisplay.com/app_notes/SPLC780D.pdf
Built‐in ST7066U. Download specification at http://www.newhavendisplay.com/app_notes/ST7066U.pdf

Do you know why there are two different controllers and how do you select which controller to use when you want to display information on the lcd?
Logged

Israel
Offline Offline
Sr. Member
****
Karma: 5
Posts: 291
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

have you tried the standard LiquidCrystal library? It would work on half of the display, but should still let you test whether your display is good or bad.
Unless the controller on it is not HD47780 compatible.
Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

have you tried the standard LiquidCrystal library? It would work on half of the display, but should still let you test whether your display is good or bad.
Unless the controller on it is not HD47780 compatible.

Yea i posted about that up on replay #10. I will probably redo my tests again using all the libraries just to make sure i didn't do something wrong. That would suck if it was a bad lcd to begin with but I don't think it is considering it does show the two dark lines across the screen whenever the VO pin is grounded.
Logged

Pages: [1] 2   Go Up
Jump to: