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.
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,
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.
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?
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.
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.
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, 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.
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?
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.
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.