I do not have this display, so my ability to help is limited since I cannot test any code. You are right, the data sheet is not easy to understand, I and am not sure if I understand it myself. This looks like a difficult instruction set.
... when I send the command 0x80, 0xA0 or increments of this the characters are write in wrong position or they´re not showed in display...
The display can only show 2 lines of text at once, so I assume that if your cursor address is in the range 0x80 to 0x9F (the first two lines), then the text should show. I think if you set the cursor to 0xA0 to 0xBF, then the data will enter into memory, but those line will not display. I am guessing that it is necessary to change to extended mode (
function set, RE=1) and use the scroll commands
(scroll select, SR=1 and
set scroll address) to show the other two lines, but I am not sure. You should try to experiment and see what the effect is.
What is the unit of time in your "delay()" function? Your delays in the init section are all the same between lcd writes, but the data sheet calls for different times (see comments).
Otherwise, your code seems to be OK, except a couple of things that should not cause a problem.
Code:
void lcd_init (void)
{
LCD_ALL_DIR_OUT;
LCD_RESET(0);
delay(400000); [B]// more than 40 mS[/B]
LCD_RESET(1);
delay(15000);
LCD_RS(0);
delay(5000); [B]// not necessary[/B]
[B] LCD_RW(1);[/B] // why is this here?
delay(5000); [B]// not necessary[/B]
lcd_write(0x30);
delay(5000); [B]// more than 100 uS[/B]
lcd_write(0x30);
delay(5000); [B]// more than 37 uS[/B]
lcd_write(0x0C);
delay(5000); [B]// more than 100 uS[/B]
lcd_write(0x01);
delay(5000); [B]// more than 10 mS[/B]
lcd_write(0x03);
delay(5000);
[B] lcd_write(0x30);[/B] // why is this here?
delay(5000);
}
Sorry I can't be more helpful.