This one is an odd duck of a display. I got it with an Intro to LCDs
kit some years back, and it had a parallel port connector. Could never
get it to work with the example code when plugged into the parallel
port of a PC.
Now I'm trying to interface it to an Arduino. The "Hello World"
example doesn't work, no surprise. I do get the individual character
blocks to display as solid squares when wired up, but no characters.
Adjusting the contrast pot makes no difference.
Well, I think the problem is that this weird old LCD seems to need a
220 ns pulse on the Enable line, according to the specs anyhow. So,
has anyone got this working?
What makes it odd? It looks like a run-of-the-mill HD44780 compatible character mode LCD to me. The LiquidCrystal library should work just fine. Use the Adafruit tutorial (Arduino Tutorial - connecting a parallel LCD) to get started.
I do get the individual character blocks to display as solid squares when wired up, but no characters.
If they are only on the top line then it means that the device is not connected properly to the Arduino or the program code is wrong. Since the program code is good it looks like we need a photograph of your connections.
Adjusting the contrast pot makes no difference.
Another wiring problem??
this weird old LCD seems to need a 220 ns pulse on the Enable line, according to the specs anyhow.
There is no problem here, that's the minimum acceptable pulse width.
I've rechecked the wiring and played around with this some more.
If I wire it up exactly per the example and modify the sketch as instructed,
it seems to clear both lines of the display (faint flickering, as if rapidly
refreshing). But, and here's what's interesting, if I pull out the RS wire
(letting it float high), I get scrolling random characters on one row of the LCD.
I think the RS line is the problem here.
I should have added that a standard LCD shield works fine, using
the LCD4Bit_mod library. And the 'duino I'm using is a
Chinese-made 1280Mega clone, and I've had no problems
with that so far. So, the problem reduces to one of the
following:
My wiring (but, I don't think so).
The Truly LCD might be flaky. I'll note again that I've
never gotten that particular piece of **** to work, not
even interfaced to a PC parallel port.
You're confusing me. You have one LCD or one LCD and another LCD on a shield?
Lots of people are saying their wiring can't be wrong but most of their cases involve something wrong. If you have a working LCD shield and an LCD soldered on the shield, you shouldn't have problem with anything except for software. If you have a loose LCD, you're better off getting your wiring checked by a few more pairs of eyes. Won't hurt.
Since you tested the RS line and found problem, it could be this line is not connected right. Sometimes a bread broad can have bad spots too.
If you have been using this tutorial then you never should have proceeded to the part labeled 'Bus Wiring' where you connect the LCD module to your Arduino. You have to get the contrast potentiometer working first.
...it seems to clear both lines of the display (faint flickering, as if rapidly
refreshing). But, and here's what's interesting, if I pull out the RS wire
(letting it float high), I get scrolling random characters on one row of the LCD.
I think the RS line is the problem here.
All of this is indicative of a display that is good and wiring connections that are not. I don't think we can help you any more without seeing your version of the sketch and a photograph of how you have things connected.
All right. I finally got to the bottom of it and have this Truly "awsome" piece
of LCD working.
>> All of this is indicative of a display that is good and wiring connections that are not. <<
It wasn't the wiring, it was the software. Using the Adafruit example, but loading
the LCD4Bit_mod library, rather than the newer LiquidCrystal one, gets it working.
Of course, I had to modify the wiring, per the comments in the LCD4Bit_mod.cpp
source file, but with one other change. I grounded the RW line, as in the Adafruit
example (it didn't work with RW connected to D11, as in the cpp file comments).
Well, I hope all this will help people to connect weird old LCD displays, whether
they're in or out of spec. I certainly learned a lot from this, and I'm thankful for
all the helpful comments from people in the forum.
As a sort of sidebar, I'll not that in a previous thread someone said that you can use
the LiquidCrystal library instead of the LCD4Bit_mod one (making the wiring changes
per LCD4Bit_mod) with the LCD shields that seem to require LCD4Bit_mod.
That is simply not correct. I did try it.
Apparently, there are some patches and twiddles in LCD4Bit_mod that let certain
LCDs work with it if they don't work with LiquidCrystal. But, hey, I'm a
a newbie, so I'm nominally ignorant and clueless. Please correct me, with appropriate
lashes with wet noodle, etc.
Thanks for getting back on the board to share you experience. Is there a time code or model number you can find on your display? I think it's almost useful to have a list of "oldies" for LCD so people can look up their devices.
If you look at the actual code you will see comments such as:
"//DB should be an unseparated group of pins - because of lazy coding in pushNibble()"
"// pause 1 ms. TODO: what delay, if any, is necessary here?"
"//TODO: perhaps better to add a delay after EVERY command, here. many need a delay, apparently."
They don't really inspire confidence, do they?
it didn't work with RW connected to D11, as in the cpp file comments.
What did you do about this line in LCD4bit?
int USING_RW = false;
As a sort of sidebar, I'll not that in a previous thread someone said that you can use
the LiquidCrystal library instead of the LCD4Bit_mod one (making the wiring changes
per LCD4Bit_mod) with the LCD shields that seem to require LCD4Bit_mod.
That is simply not correct. I did try it.
I don't think you did it correctly. Was pin 4 grounded when you tried LiquidCrystal? Did you change the argument of LiquidCrystal lcd() to match your pin assignments?
Apparently, there are some patches and twiddles in LCD4Bit_mod that let certain
LCDs work with it if they don't work with LiquidCrystal.
This is absolutely not the case. The only changes are in the pin assignments "because of lazy coding in pushNibble()" in the original version. I don't think you will be able to find a display that works with LCD4bit that does not also work with LiquidCrystal. The opposite is probably not the case.
>> An old 4-bit LCD library (now redundant) Do not use this library <<
It works, and it provides a useful starting point.
>> What did you do about this line in LCD4bit? int USING_RW = false; <<
Nothing. I didn't feel like recompiling the library. And, if I pulled
RW low, it wouldn't matter anyhow. And it didn't matter.
>> Was pin 4 grounded when you tried LiquidCrystal? <<
Yes.
>> Did you change the argument of LiquidCrystal lcd() to match your pin assignments? <<
Yes.
>> This is absolutely not the case. The only changes are in the pin assignments "because of lazy coding in pushNibble()" in the original version. I don't think you will be able to find a display that works with LCD4bit that does not also work with LiquidCrystal. The opposite is probably not the case. <<
Well, if you insist. So far, I'm two-for-two. Both the Truly LCD and
the LCD shield worked with LCD4Bit_mod, and not with LiquidCrystal.
And I did, see above, try everything I could think of to make LiquidCrystal
work with the two displays. Maybe others would care to weigh in.
Now that you know that your display is good you will be a lot better off in the long run if you abandon LCD4bit and get your display working with LiquidCrystal. It doesn't surprise me that neither of your displays work with LiquidCrystal right now, you are probably having the same problem with both of them. If you post your code and the photograph that I have already requested twice we can probably get your problem resolved very quickly.
>> If you post your code and the photograph that I have already requested twice we can probably get your problem resolved very quickly. <<
The one is a generic LCD shield and a photo would show nothing of
the internal wiring. The other one I've temporarily dismantled.
What I'd really like to know is whether anyone has bought a generic
LCD shield off eBay, the kind that the seller specifies LCD4Bit_mod
for. And if one of those shields was made to work with the LiquidCrystal
library. And if so, how.
And by the way, Don, thanks for taking the time to respond to my questions
repeatedly.
The photo that is needed is the one of your connections - the ones you made between the LCD module and the Arduino. In the case of the LCD on a shield then we would need to have a link to information about the shield. I need to see the code to make sure that it matches the specific connections that you made or that are made by the shield. If you don't think that this information is necessary because you know that your connections are correct then I suggest that you check back through the forum posts for the past few years and see how many others have made the same claim.
What I'd really like to know is whether anyone has bought a generic
LCD shield off eBay, the kind that the seller specifies LCD4Bit_mod
for. And if one of those shields was made to work with the LiquidCrystal
library. And if so, how.
I've run into several of these in the past few years and the solution has always included the use the LiquidCrystal library instead of the LCD4bit library. I don't make this stuff up as I go along, my recommendations to you are based on feedback from those I have helped in the past. That is one of the reasons that I would like to resolve your problem with the LiquidCrystal library.
In the past there were a lot of problems with people forgetting to deal with the RW pin. A little over a year ago I convinced Tom Igoe to emphasize this need in the tutorial. He added the comment "[size=12pt]* LCD R/W pin to ground[/size]" in the circuit description and the problem magically went away for the most part.
Another problem that comes up is the implementation of the initialization command. It is covered quite well under 'Syntax' here LiquidCrystal - Arduino Reference but I guess that not too many LCD beginners look there. One additional comment in the example would help a lot.
// initialize the library with the numbers of the interface pins
// LiquidCrystal(rs, enable, d4, d5, d6, d7);
<------------- This one
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
By the way I just noticed that the page with the syntax information has the same problem that the tutorial used to have, it states that the use of the RW connection to the Arduino is optional but it doesn't say that the pin has to be grounded if you don't connect it to the Arduino.
>> He added the comment "* LCD R/W pin to ground" in the circuit description and the problem magically went away for the most part. <<
I've been well aware of this and made sure to ground RW after one
failed start. I've been working with electronics long enough (40+ yrs.)
to know that a TTL/CMOS logic line will float high if disconnected.
>> LiquidCrystal lcd(12, 11, 5, 4, 3, 2); <<
Did that, too.
I'll play with it some more in the next few days and post if any
interesting results.