lcd.begin.. Has no effect on my display.

Hi, I am using a HD44780 controlled 20x4 lcd with an Arduino mega 2560.

When I send anything to it it gets split up at a new line.. its acting like a 16x2 no matter how I set up lcd.begin.

When it comes to the end of line it misses the row beneath it and carries on to the one after the next line (3rd one down instead of 2nd).

Anybody have any ideas as to why? I've rewired it twice and I'm 100% sure all wiring is correct (nothing would display otherwise).

Thanks
Oli

Skipping line is normal. Post pictures if you want others to understand your point regarding display bahaving like 16*2 all the time.

Your 'problem' will not be influenced by lcd.begin() because, as it is currently implemented in the library, it is not designed to do so. The first argument, number of columns, is used solely to implement the placing of the cursor at the beginning of a line (although it does not work correctly for 16x4 displays). The second argument, the number of rows, is used solely to inform the controller whether or not you are using a true 1-line display vs. any of the others.

The two of these together could be used to implement the line wrapping that you expected but that has not been done in the standard library. You could try the LiquidCrystal1.0 library which was written specifically to deal with 40x4 displays. That library handles the smaller displays as well, does the expected line wrapping, and also works with some out of spec (slower) controllers that don't work with the regular library. Start here --> Google Code Archive - Long-term storage for Google Code Project Hosting. and follow the Downloads link to the latest version.

For an explanation of why your display goes from line 1 to line 3 follow the LCD Addressing link at http://web.alfredstate.edu/weimandn.

Don

Thank you, using the other library fixed it :slight_smile:

Thanks
Oli