LCD 16 character 1 line

Hi

I have a 16 character 1 line LCD screen and when I try to use it with the example scripts it only display 8 characters. I have changed the example code for one 16 characters and 1 line, but I am not sure if that is the only place I should change it. Does anyone else have this may be?
The LCD screen is a GDM1601C from a velleman-kit.

ekke85

Quick googled and it seems that this display is compatible with HD44780, but some boards had slightly different wiring (switched Vcc, but don't think it's your problem since you say that display shows something) or need slightly more time to initialize (again probably not the issue).

Re-check connections and code. Are the pins used in LiquidCrystal() call exactly the same as pins connected to the LCD?

Following Fazzah's thoughts on "more time to initialize", are the displayed characters the beginning half of your string or the ending half? If it's the ending half, yeah, you need some delays between clear and print, try delay(100) and gradually reduce it to a value that will still display consistently.

I had similar problems until i found out that many 16 by 1 displays actually should be treated as 8 by 2 displays.

So try to initialize it as an 8 char by two lines display and write to it that way.

Hmm, this crossed my mind, but thought that if one controller is enough for a 16x2, why can't it drive a 16x1 :stuck_out_tongue: Single-line 8x2 makes sense :wink:

So ekke85, if the above is right, you must manually set cursor position to the other half of the display using SetCursor() function.

http://web.alfredstate.edu/weimandn/lcd/lcd_addressing/lcd_addressing_index.html

scroll down about halfway to get the 'crazy 8' addressing story.

I cannot imagine why it was ever done this way, but it is common.

In http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1264823411
I altered linewrap so that if you declare these as lcd.begin(8,2) then 'line 1' wraps onto 'line 2' so that if you:
lcd.print("abcedfghijklmnop");
the 16 characters print as you would expect.

That's some interesting reading, but I come to conclusion that it's just plain dumb :slight_smile:

That's some interesting reading, but I come to conclusion that it's just plain dumb

I assume that you are referring to the addressing scheme itself and not to my explanation of it. It's not so dumb when you take into consideration that the Hitachi controller was developed more than two decades ago when there were microprocessor and memory constraints that just do not exist today.

Hmm, this crossed my mind, but thought that if one controller is enough for a 16x2, why can't it drive a 16x1

One controller is not enough for a 16x2. That's why there are two IC's (or blobs) on those devices. One controller is enough to drive 40 columns of dots or 8 characters, with either one or two rows of characters. For each additional 8 characters in width you need another controller. That's why there are more IC's (or blobs) on the wider LCD modules.

Don

The standard library tends to get confused unless you're using 'standard' 162 or 204 displays :wink:

The standard library tends to get confused unless you're using 'standard' 162 or 204 displays

In what way does it get confused? Can you give some examples?

As long as you understand that these displays are designed to deliver simple short messages such as "Add more paper", "Your toast is done", "Your garage is on fire", etc. you will find that the standard library works quite well.

These displays were never designed to replace a standard terminal and display long strings of text flowing over multiple lines. Any such implementation must be done with software and the software becomes quite complex if it attempts to deal with more than one type of display. For such an implementation you should look into the LiquidCrystal440 library.

Don