Hallo Leute habe einen Atmega 8 und ein LCD-Display 16*1 von Conrad.

Habe folgende Pins benutzt!

PD0-PD7 = Datenbus
PB0 = RS
PB1 = R/W
PB2 = E

Und dazu folgendes Testprogramm geschrieben.


Code:
$regfile = "m8def.dat"
$crystal = 3686400


Ddrb = &B00000111
Ddrd = &B11111111
Portb.0 = 0

Waitms 10
' Interface auf 8-Bit 3 mal
Portd = &B00111100
Portb.2 = 0
Waitms 10
Portb.2 = 1

Waitms 10
Portd = &B00111100
Portb.2 = 0
Waitms 10
Portb.2 = 1

Waitms 10
Portd = &B00111100
Portb.2 = 0
Waitms 10
Portb.2 = 1

' Display Löschen
Waitms 10
Portd = &B00000001
Portb.2 = 0
Waitms 10
Portb.2 = 1

'Display An
Waitms 10
Portd = &B00001100
Portb.2 = 0
Waitms 10
Portb.2 = 1

' Kursor nach Rechts und Schift aus
Waitms 10
Portd = &B00000010
Portb.2 = 0
Waitms 10
Portb.2 = 1

Portb.0 = 1
' Buchstabe H ausgeben
Portd = &B01001000
Portb.2 = 0
Portb.2 = 1
Waitms 50
' Buchstabe E ausgeben
Portd = &B01000101
Portb.2 = 0
Portb.2 = 1
Waitms 50
' Buchstabe I ausgeben
Portd = &B01001001
Portb.2 = 0
Portb.2 = 1
Waitms 50
' Buchstabe K ausgeben
Portd = &B01001011
Portb.2 = 0
Portb.2 = 1
Waitms 50
' Buchstabe E ausgeben
Portd = &B01000101
Portb.2 = 0
Portb.2 = 1
Waitms 50
Leider ist mir dieses Programm zu umständlich. Ich habe auch schon andere Programme aus dem Forum ausprobiert.
z.B.
Code:
$regfile = "m8def.dat"
$crystal = 3686400


Config Lcd = 16 * 1
Config Lcdpin = Pin , E = Portb.2 , Rs = Portb.0 , Db7 = Portd.7 , Db6 = Portd.6 , Db5 = Portd.5 , Db4 = Portd.4       'Belegung am MEGA8
Config Lcdbus = 4
Config Lcdmode = Port
Waitms 1000

Cls

Locate 1 , 1
Lcd "hallo"

End
Aber alle Benutzen nur das 4Bit System. Die habe ich dann entsprechend geändert. Aber das Display zeigt nichts oder nur wirres Zeug an.
Wer kann mir helfen!!!!!!!!!! Bild  
[-( Danke!!!