Go Down

Topic: LCD has strange characters when not lcd.clear() is sent (Read 2 times) previous topic - next topic

floresta

Did you try the sketch that I posted for you?

Did you notice that loop() is empty in my sketch?  You do not want to send unchanging information to the LCD over and over again which is what you are doing. 


Don

dutchronnie

Hello Floresta,

Yes i have tried your code.
but first.

I have now an other display, the same type.
This one is better, not that much strange characters, but now i am missing the first character on the first line.

With you code i am missing the first character too.

"ello world!"
"it works!"

Mabey it is the type of display

floresta

Quote
Mabey it is the type of display

That is really the only explanation since I know that the code is correct and we also know that your wiring is correct since most of the message is displayed correctly.  Some of the bargain displays being sold are probably ones that don't quite meet the factory specs.

It looks like your display may be taking too long to complete the commands in the lcd.begin() function so it is missing the first letter sent to it by the lcd.print() function.  You could stick a 10 mS delay in before the lcd.print() function and see if that helps.


Don

mrmeval

You have this which does not match the example code or wiring.

LiquidCrystal lcd(12, 11, 10, 9, 8, 7);

When I tried to run your code it caused garbage. My LCD is wired per the example and when I changed your code to match it worked.
If it was designed by man it can be repaired by man.

floresta

Quote
You have this which does not match the example code or wiring.

LiquidCrystal lcd(12, 11, 10, 9, 8, 7);


There is nothing sacred about the pins used in the example.  It is, however, important to make sure that the code matches the wiring which is why we frequently ask for both the code and a photograph of the wiring when troubleshooting. 

Did you read reply #7?  Since he does get a valid display some of the time we know that his wiring does match his code so the problem must be elsewhere else.


Don

Go Up