DIP204B-4NLW LCD problem

This is very confusing problem, but somebody might have seen it before. I tried to search old posts, but none of them actually helped.

Link to short video clip: KS0073 based LCD, problem - YouTube

I use LiquidChrystal library and 4-bit parallel mode. Could't get SPI to work, (forget the contrast pin... :roll_eyes:)...

Anyway, test program shows how characters appears nicely, second counter simply sends current value, until 11s passed.

Connected pins

function      Duemilanove      LCD
data 4            5                    11
data 5            4                    12
data 6            3                    13
data 7            2                    14
enable           11                    6
R/W              GND                  GND
RS               12                    4

Actual testcode:

#include <LiquidCrystal.h>


LiquidCrystal lcd(11, 12, 5, 4, 3, 2);
long Counter;
long OldCounter;
long Old_ms;

void setup() {
  lcd.begin(20, 4);
  lcd.setCursor(0, 0);
}

void loop() 
{
 if ((millis()/1000)>Old_ms)
  {
   lcd.print(millis()/1000);
   Old_ms=millis()/1000;
  }
}

Again, I don't know how to start searching for the actual problem. Other LCD's works fine. Maybe this is not compatible with the code, who knows.

Cheers,
Kari

I suspect this is an artifact of the display memory on the LCD. Could you try this to see if you get the same result?

lcd.print(char(millis()/1000+' '));
This should output one character at a time starting from space. Maybe this display uses the memory differently than other ones.

Yes. I tested at first one character at the time, I just wanted to see sconds at the same time.
:wink:

And I tested with your codeline, no change. When the 13th character is written to row 0, it simultaneously starts to fill the row 1.

Should I think it is defected part, or compatibility issue?

Cheers,
Kari

Kari

There are a few puzzling things besides the 'artifacts'. The characters on a 20x4 display should appear on lines 1, 3, 2, 4 in that order. Also, there should be no missing characters and no delay between any of the lines.

Could you try this code and let me know what happens. It may be functionally the same as liudr's but I understand this one. Un-comment the delay to slow things down.

#include <LiquidCrystal.h>

// Don't forget --> LCD RW pin to ground

//LiquidCrystal lcd(RS,EN,D4,D5,D6,D7);
LiquidCrystal lcd(11, 12, 5, 4, 3, 2);

void setup()
  { 
  lcd.begin(20, 4);	
  for (int i=33; i<113; i++)     // send 80 sequential ASCII characters to the LCD DDRAM
    {
    lcd.print(i,BYTE);           // display each character as it is stored
//    delay(100);                  // un-comment to observe addressing sequence
    }
  }

void loop()
  {  
  }

Don

Don,
It is still making the same pattern. That is so weird. I have checked wirings so many times, and I expect some sort microgasm if Ifind the problem.

Well, I'lle let it stay at home, alone, and hope that it fixes itself while I'm gone.

But I don't give up until I can prove to myself that this is really broken piece.

Cheers,
Kari

It is still making the same pattern.

It couldn't really be the same since these are all single characters being 'printed' whereas your problems began with the double digit numbers. Could you post a video or describe the sequence of events?

Don

floresta:
It couldn't really be the same since these are all single characters being 'printed' whereas your problems began with the double digit numbers. Could you post a video or describe the sequence of events?

Don

As you can see reply #2, I have already tested it with single character, it is acting the same, regardless what characters, or how many are send to LCD. It is the 13th (no 12?) location when it start to fill row nro1 from the beginning. When it begins on row nro2, the same happens on row nro 3; 13th character are echoed(?) from row nro 2.

Video is not needed here, I hope you can take my word.
:slight_smile:

Cheers,
Kari

Kari,

This is a wild guess: is it possible that this display is custom-made and it uses the memory differently. Say if someone had custom made 12 character by two row displays in the past with the second line using memory directly after the first line (24 consecutive memory bytes). To upgrade into a large display, the company made the request to the manufacturer to be compatible. So the larger display only uses 12 columns and starting from 13th, it's the next line. This way may reduce the need to reprogram older machines.

Oops again, I forget to add the link for the datasheet;

I believe that this should be NEARLY compatible display, not a custom made. But any good guess works here now.

If that information in the datasheet gives you any usefull glues, I would really appreciate extra info. I'm totally out of ideas.

Thanks guys!

Cheers,
Kari

Increase the delay to 1000 and see what happens.

Don

In my video there is 1s delay, it just print current value in seconds. But I tried it with your code too, no change.

Kari

I give up. I'm not there to run the tests I would like to do to evaluate the situation so I have to rely on you doing them for me. I am not sure which of them you have done and I have not seen the results from any of them.

Don

Don, it doesn't help you if you see the video that does the same thing with longer delay. I know your disbelief when I just say how things are, I work as it-administrator and try to support people by phone, and it is incredibly hard to make them really to do what you ask them to do. There's always some "human_to_pro_to_human" language barrier between two people.

I thank you for your help, it is very nice to have people like you here to guide.

Some topics were found in germany, and even after translation I didn't really understood if they have their problems solved.

If this problem finally get answered, I'll post the solution here.

Cheers,
kari

Hello GaryP

here is my solution of your problem,

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1273918261

It is in German but you will be able to use the display.

I use at first the Lcd4bit.Library but the LiquidChrystal-Library is better!

I hope this will help you

Juergen_S

Oh boy!!!

I read it trough google translator and... I didn't quite got the whole picture, english-germany is fun but needs more than I have at the moment.
Do only need to add the code in the second last post? And use LiquidChrystal library? Or do I make changes to some .cpp file as well?

If that works, it makes one problem out of dozen.

Thanks Juergen!

Cheers,
Kari

Juergen!!!
Excellent!

I didn't examine that extra part yet, what is inside of it and what it does, but now it works perfect:

This is what I added, well this is the whole setup part. I hope someone else get help from Juergens work!

void setup() {
  // set up the LCD's number of columns and rows: 
  lcd.begin(20, 4);
  {
    lcd.command(0x01);//clear display lcd.command (0x01) / / clear display
    delay(02); delay (02);
    lcd.command(0x24);//function set RE=1 lcd.command (0x24) / / function set RE = 1
    delay(50); delay (50);
    lcd.command(0x0C);//control, display on, cursor off, blinken off lcd.command (0x0C) / / control, display on, cursor blink off, off
    delay(50); delay (50);
    lcd.command(0x20);//function set RE=0 lcd.command (0x20) / / function set RE = 0
    delay(50); delay (50);
    lcd.command(0x06);//entry mode segment bidirectional lcd.command (0x06) / / entry mode bidirectional segment
    delay(50); delay (50);
    lcd.command(0x24);//function set RE=1 lcd.command (0x24) / / function set RE = 1
    delay(50); delay (50);
    lcd.command(0x09);//extended function set, 4 lines, 5-dot fontwith lcd.command (0x09), / / ??extended function set, 4 lines, 5-dot font with
    delay(50); delay (50);
    lcd.command(0x20);//function set RE=0 lcd.command (0x20) / / function set RE = 0
    delay(20); delay (20);
    lcd.command(0x01);//clear display lcd.command (0x01) / / clear display 

  }
  lcd.setCursor(0, 0);
}

Thanks

Hello GaryP,

It´s good to know, that i can help you to solve your problem.

Juergen

I did a little more research. Your display uses a Samsung KS0073 controller which appears to be based on the Hitachi HD44780 controller but it is not a clone. The instruction sets have enough similarity that the LiquidCrystal library does work, sort of. You should not expect it to work perfectly.

[Edit]Update: The KS0073 appears to be based on the Hitachi HD66712U whose software is upwardly compatible with the HD44780.

Don

Thank you Don!

But I think I can expect (now) it to manage basic functions perfectly, I don't use it to anything special, just simple informative writings. I'll do few more test, and they are just for checking that cursor finds it way to correct coordinates. Then I'm happy with this.
This LCD has been waiting in my drawer for seven years, I had similar problems then, and I decided to let it rest for a while. It was worthed, in the meantime I used traditional LCD's, just fewer lines, and that was the problem mostly.

Little thing can be a savier of the day.

And to the next problem solving!!!!

Cheers,
Kari

Ok. I have now tested this devil...

I have something weird going on still. If I try to set the cursor on third column, it won't play with me.

Solution would be, if not CPU and timing critical, to create the whole string for one single write.

I just so like the color, I wouldn't like to replace this. Better try to find more solutions to manage with this.
:expressionless:

Cheers,
Kari