Hi, this is my first post on this forum, so system does not allow me send links on it.
I can't get this LCD working:
powertip pc0802lrs-awa-b-q: it is an 8x2 parallel cd, farnell number 1671494. Datasheet is axvailable in farnel's product page, of course, but it is not much more than a description and pinout.
From this LCD pinout I wired it as indicated by liquidcrystal examples from arduino IDE 0018. I checked this more than twice, and even changed it to some other wiring after seeing some ladyada tutorial with no luck: I always get the same results.
It "sort of" works but I can't get it to display things right using the very same examples available on arduino ide 0018 nor the ladyada ones:
I get lots of strange symbols
Even the few ascii characters displayed are wrongly placed
second line (allmost) does not work
Could you give some pointer? It seems that there are no posts in this forum about it, and googleing for "arduino ks0076" gives only two results, but at least I found that it is ks0076-based, wich should be "compatible" with "normal" parallel lcd's?
(1) Include a link to the datasheet.
(2) Show us your code.
(3) Show us a photograph of your connections.
(4) Search for HD44780.
(5) If you correctly follow the ladyada tutorial at Arduino Tutorial - connecting a parallel LCD it will work.
Besides floresta's suggestions, also add delays like delay(10) after every command. Sometimes an older display is slow and needs more delay than the liquid crystal display library has. Give it a try.
But I found this, wich seems to be a complete one:
It would seem that this LCD is st7066u-based
// 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 rows and columns:
lcd.begin(8, 2);
// Print a message to the LCD.
lcd.print("hello!");
}
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);
}
Besides floresta's suggestions, also add delays like delay(10) after every command. Sometimes an older display is slow and needs more delay than the liquid crystal display library has. Give it a try.
The reason that this suggestion may sometimes work is because many (if not most) programmers, even those who think they are following the recommendations in the HD44780 datasheet, do not read the 'fine print'. The Execution Times that are recommended in the instruction set assume a specific clock frequency for the LCD controller. Elsewhere in the data sheet the chip specifications state that the actual frequency may in fact be significantly lower, thus requiring a longer delay.
For this suggestion to work you would have to modify the LiquidCrystal library. Putting time delays into the 'Hello World' sketch will not have the desired effect.
All grounds must be connected together. Else the various pieces have no common point of reference from which to communicate.
Thank you. So I guess connections are fine as in the photograph. But I can't understand why this LCD does not work properly.
As you can see on the photograph, the string "hello!" is displayed badly, first row begins with "llo!", then there is some strange symbol, then there is seconds counter, then there is "e", but it was "he" before the counter reached "10"... and second row is mostly alien DNA.
Could it be that
a) LCD initialization is bad?
b) Memory addresses are not standard?
Since my code is a pure arduino 0018 liquidcrystal example, only changed to be 8x2 and string clipped to be less than 8 characters, I fear that this LCD controller is not supported, and that liquidcrystal library must be modified in order to support it.
To modify any libraries is out of my reach just now and I'm in a little hurry, so unless some god illuminates me, I think I'll need to buy a real standard LCD
May be in the future I'll have time and knowledge to do it.
I've seen this type of "llo!' before. I guess The most appropriate thing is to modify the LCD library. I don't know how to do that either. What I did was I added delay between lcd.begin and lcd.clear, and more between lcd.clear and lcd.print. That was how my problem was solved on a display I bought in a surplus store. For displays I bought in regular stores and other displays I bought from the same surplus store, they all work fine without any delay.
Notice, you're running your little code at its full speed! Add delay(100) in your loop!
So, while you're trying to solve the problem, why NOT try this delay thing? delay(10) most places and delay 100 in your loop to SLOW it DOWN!
Where did you get this display anyway?
BTW, where does your breadboard get its ground and 5V?
The LCD was initialized fine, I guess. Otherwise nothing but black blocks will appear on it. I guess we could sweep the "where the 5V and GND go" question under the carpet and deal with it next time it comes around.
Richard, I don't know if it's just me or something, our questions to help seekers are often simply ignored, like this other post:
We cannot see any ground connections between the ARrduino board, the LCD display, and the breadboard.
Hmmm.... Arduino is powered from USB, but breadboard is powered itself by a 7805 + voltage inverter. 7805 itself is powered from a 12 V wallmart.
Since I have read that LCD logic power is not exactly the same as LCD power, I was thinking there were no problem by connecting only logic wires to Arduino and power wires to breadboard which has a different power supply.
I realize now that it all should be powered from the 7805? Or at least should be there a GND connection from Arduino to breadboard? Which would be the best (maybe the only) way to do it rigth? I don't want to blow something...
3/4 of the breadboard work at +5.90 - 5.90 V (two resistors added to 7805) but the LCD section is regulated to +4.97v - GND by way of a 5.1 V zener + 15 ohm resistor, this is somewhat visible at upper rigth corner of the photograph.
However at the very least I tried to power all from the Arduino with no luck. I will try it again tommorrow after some sleep, I feel really tired right now.
I don't know if it's just me or something, our questions to help seekers are often simply ignored
Sorry, I really tried delay first. It is my fault because I forgot answer this question. I can only apologize by saying this thing is driving me nuts... and that it is not easy for me to write in english. I find easier to read it.
I repeated the test right now adding delay(100); lines after lcd.begin, lcd.print, lcd.setCursor and lcd.print(millis()) with no luck. Tried also with delay(500);. No way.
Initialization could be bad after all, uploadind a second example gives 2 rows of solid black boxes. I must unpower/reconnect the breadboard to get alien DNA back again.
Maybe they want help without bothering to collect the required information
Please let me say this is not the case. However, it is not easy for me to see what information I need to search for, about something I dont fully understand: two months ago I was unable to read resistor codes. But of course I will bother to search any information and give any answers to questions made by people willing to help me.
Since I'm myself giving help on linux forums usually, I can really appreciate your help.
Sometimes I found myself giving what I think is "complete" information about something "very easy" only to realize that the helped guy is puzzled by collateral questions . Like "edit /etc/resolv.conf to say blah blah" Not all the people has the knowledge base needed (like "how to use vi/nano to edit a file?" or even "how to use the shell?")
I found that these people often is afraid to ask for clarification. I think that who ask looks dumb once but those that don't ask remain dumb for life. However, it is easy to become afraid of this: I'm realizing it myself just now.
Can kids these days read anything over 140 characters without skipping out and developing memory holes?
Well I'm not sure there are no holes on my memory, and it is sweet being called "kid" but if there are some holes in my brain it would be problably Alzeimer since I'm 44 years old
But, wait a minute: it must be that this damned thing is making my brain :-/ liquefied
I repeated the test right now adding delay(100); lines after lcd.begin, lcd.print, lcd.setCursor and lcd.print(millis()) with no luck. Tried also with delay(500);. No way.
You are wasting your time with this. Did you read my explanation of why these delays will not help you (the last sentence of reply #4)?
Will you please save us a all a lot of time and just go back to your setup and sketch from reply #3 and simply add a wire between the Arduino GND and the Breadboard/LCD GND. It may possibly not work after the addition of this wire, but I can guarantee you that it will not work without this connection.
Will you please save us a all a lot of time and just go back to your setup and sketch from reply #3 and simply add a wire between the Arduino GND and the Breadboard/LCD GND. It may possibly not work after the addition of this wire, but I can guarantee you that it will not work without this connection.
3/4 of the breadboard work at +5.90 - 5.90 V (two resistors added to 7805) but the LCD section is regulated to +4.97v - GND by way of a 5.1 V zener + 15 ohm resistor, this is somewhat visible at upper rigth corner of the photograph.
This unusual power supply may be the source of your problem. I suggest powering the LCD module from the 5V and GND pins of your Arduino and see if it works that way. This will also take care of the previous GND problem.
No luck, I can only see black boxes, but it toggles between only one row of "solid" black boxes and two rows of "faded" black boxes.
What do you mean by 'it toggles'? One row of solid boxes means that the LCD controller is powered but not initialized. Two rows of faded boxes means it is powered and initialized but no display data has been sent to it.
It looks like you may have E and RS swapped. Both wires are white so it's hard to tell. Your description for these two in reply #21 does not match the code in reply#3.
LCD pin 3 (Vo, black) goes to Arduino GND (if not I can't see the black boxes)
You will be able to get a nicer looking display (less contrast) if you use a potentiometer to supply this pin, but this will do for now.
What could I do?
Let us see the code again. Copy and paste it from your actual sketch in the Arduino IDE, we want to see what you are actually using.
For those all dumb noobs like me who could benefit from it, here is the hello, world! example adapted to an 8x2 parallel LCD
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(11, 10, 5, 4, 3, 2);
void setup() {
// set up the LCD's number of rows and columns:
lcd.begin(8, 2);
// Print a message to the LCD.
lcd.print("hello!");
}
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);
}
You can connect LCD data pins (marked D0-D7 on LCDs datasheet) to any Arduino digital pin. To save Arduino pins, you can connect D4-D7 only, it is called 4-bit mode.
You can connect LCDs' RS and E pins to any Arduino digital pin, too.
If all you want is to write on the LCD, LCD's RW pin can be connected to Arduino GND. If you need to read/write, then LCD's RW pin can be connected to any Arduino digital pin.
The important thing is to give the Arduino pin numbers in the right order in the "LiquidCrystal lcd(pin-numbers) line. If LCD RW is connected to a digital pin, you need to give that number too; if LCD RW is conneceted to GND, you must skip it.
Order is:
LiquidCrystal lcd(RS, RW, E, D0, D1, D2, D3, D4, D5, D6, D7);
If you want only write, simply skip RW number so line becomes:
LiquidCrystal lcd(RS-pin, E, D0, D1, D2, D3, D4, D5, D6, D7);
And, to use only 4-bits, skip D0, D1, D2 and D3 numbers too, so line becomes:
LiquidCrystal lcd(RS-pin, E, D4, D5, D6, D7);
Of course LCD GND pin (marked probably as Vss on LCD's datasheet) should be connected to Arduino GND and LCD Vdd should be connected to Arduino +5V. In this case LCD GND is pin 1 and LCD Vdd is pin 2.
In this case LCD pin 3 is for contrast control, in your datasheet it will probably marked as Vo. This can be connected to a pot: about 0.65V on this pin should give a nice contrast, but it can be simply connected to GND (0V) and it will work.
If your LCD has backlight, there will be two more pins probably marked A and K, A goes to +5V and K goes to GND. You can use a resistor on A if backlight is too bright.