Getting second line to work on GDM1602K LCD?

Recently I bought this 16x2 GDM1602K LCD to use with my Arduino.

http://www.sparkfun.com/commerce/produc … ts_id=709#

I am using this 4-bit library with it and it works well.

http://www.arduino.cc/playground/Code/LCD4BitLibrary

For the first line at least. The problem is that I can not seem to figure out how to make this display go to the second line.

Does anyone have any experience with this LCD that can help me?

Thanks!

As far as Character LCDs usually go, they treat the display as an 80x1 or a 40x2 display regardless of the number of characters on the LCD itself.

You should find that since your display is a 2-Line unit the 2nd line will start at memory address 40 (0x28 in hex) so you need to write your 2nd line starting there.

When I set it to start at 0x28 it still goes on the first line. It will wrap around but not perfectly as it takes a few second for the message to get to the bottom.

I think the trick is in this initializing code

LcdCommandWrite(0x2C); // function set:
// 4-bit interface, 1 display lines, 5x7 font

I don’t know how I would change it to 1 line though.