Ok, ich konnte das Problem nach längerem hin und her nun lösen.
Die Init routine:
Code:
void lcdInit(void)
{
// wait for more than 30ms after Vdd raised
_delay_ms(32);
lcdOut(0x00);
// set mode to 8 bit if the lcd got no reset
lcdOut(LCD_D5|LCD_D4);
lcdOut(LCD_D5|LCD_D4|LCD_E);
_delay_us(40);
lcdOut(LCD_D5|LCD_D4);
lcdOut(0x00);
lcdOut(LCD_E);
_delay_us(40);
lcdOut(0x00);
// set mode to 4 bit
lcdOut(LCD_D5);
lcdOut(LCD_D5 | LCD_E);
_delay_us(40);
lcdOut(LCD_D5);
// from now on display can be interfaced using 4bit mode
lcd4BitOut(0x28, 0); // function set 4 bit, 2 line mode, 5x8 Dots
lcd4BitOut(0x0F, 0); // display on, cursor on, blink on
lcdClear();
lcd4BitOut(0x06, 0); // entry mode, increment mode, entire shift off
}
Ob die sache mit dem "set mode to 8 bit" so sauber programmiert ist bin ich mir nicht sicher. Funktionieren tut es zumindest bis jetzt.
Lesezeichen