SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By RC
#147196
I have been using the 20x4 SerLCD for some time with an AVR and I just got a few more (LCD-09568), which no longer have the backpack. Hooked the LCD up to the AVR running code I use to initialize and test, which sets the splash screen to blank lines with command \x7C\x0A, then enters a loop that clears the display and writes a test pattern to each line with a one second delay.

All works well but now at power up the LCD displays a few strange characters similar to a pipe character on line three and sometimes on line one. I read some posts that suggested this was noise on the LCD's Rx line but I still get the strange characters at power up if only the Gnd and Vdd lines are connected to the LCD. Anyone have any ideas how I can power up the LCD with a completely blank screen and no splash screen?
By RC
#147235
Yes, I do have a cap between the power and ground lines. I did find an error in my code for positioning the LCD cursor at the start of line two, which should have been \xFE\xC0. That appears to have solved the odd characters on line three at power up. Even though you populate lines one and two to set, the splash screen actually appears on lines two and three. I am still getting the strange characters now randomly at the beginning of line one but only on power up of my LCD initialize circuit, which is on a breadboard. When the LCD is then connected to the main project board it works fine without the stray characters.
By RC
#147242
I flashed my breadboard circuit's AVR with the main project's code to see if this was a hardware issue and the LCD consistently powered up without the stray line one characters. Then I compared the LCD initialization code in the main project with my LCD test code. There was one difference in LCD initialization in the test code. After setting the baud rate it cleared the display with \xFE\x01 just before setting the LCD type to 20x4 with \x7C\x03 and \x7C\x05. After commenting out the command to clear the display, the stray characters no longer appear. Strange.