Hi Gento,

ich dachte das ist hier ein Forum, wo man gerne hilft!
Ich bin Anfänger in der Programmierung. Wenn ein erfahrener Programmierer das hier liest und die Augen verdreht, da er es aus dem ff beherscht, dann soll er sich entweder die Zeit nehmen und es erklären oder gleich weiterklicken.
Ich habe nun mal Privat ein größeres Projekt vor. Ob ich damit jemals was verdienen könnte, ist weit entfernt. Ich versuche es so zu entwickeln, als wäre es bereits ein kommerzielles Produkt. Und träumen darf doch noch jeder oder? Ich könnte mich über solche sprüche nur aufregen, aber est ist noch zu früh, da ich gestern sehr lange an diesem Problem gesessen habe und gefrustet für diesen Tag aufgegeben habe.


Wenn ich nur ein Display mit der richtigen initialisierung anspreche mit

Config Lcdpin = Pin , E = Portc.1 , Rs = Portc.0 , Db4 = Portd.7 , Db5 = Portb.0 , Db6 = Portb.2 , Db7 = Portd.4

dann funktioniert es.

An dem Beispiel was mir coco geschickt hat, kann ich 2 Displays betreiben, diese bleiben bei mir dann aber ohne funktion.

jetzt bin ich gerade an der bit für bit programmierung,da ich 4 Displays ansprechen muss, leider noch ohne Erfolg.


Die initialisierung habe ich aus einem anderen Beitrag umgeschrieben.

$regfile = "m168def.dat"
'ATmega168
$crystal = 1000000 'Quarz: 1
MHz
Config Portc = Output
'DOG 162, 4bit, 5 Volt
'Portc.0 = D4
'Portc.1 = D5
'Portc.2 = D6
'Portc.3 = D7
'Portc.4 = E
'Portc.5 = RS

' ---------------------- LCD DOG162 Init ---------------------
Dog:
Portc = &B00000011 : Gosub Enbl : Waitms 2 ' dummy Funktion Set
Portc = &B00000011 : Gosub Enbl : Waitms 2 ' dummy Funktion Set
Portc = &B00000011 : Gosub Enbl : Waitms 2 ' dummy Funktion Set
Portc = &B00000010 : Gosub Enbl : Waitms 1 ' dummy Funktion Set
Portc = &B00000010 : Gosub Enbl : Waitms 1 ' Funktion Set 1
Portc = &B00001001 : Gosub Enbl : Waitms 1 ' Funktion Set 2
Portc = &B00000001 : Gosub Enbl : Waitms 1 ' Bias 1
Portc = &B00001100 : Gosub Enbl : Waitms 1 ' Bias 2
Portc = &H5 : Gosub Enbl : Waitms 1 'Power/Icon/Contrast 1
Portc = &H2 : Gosub Enbl : Waitms 1 'Power/Icon/Contrast 2
Portc = &H6 : Gosub Enbl : Waitms 1 ' Follower control 1
Portc = &H9 : Gosub Enbl : Waitms 1 ' Follower control 2
Portc = &H7 : Gosub Enbl : Waitms 1 ' Contrast Set 1
Portc = &H4 : Gosub Enbl : Waitms 1 ' Contrast Set 2
Portc = &B00000000 : Gosub Enbl : Waitms 1 ' Display On 1
Portc = &B00001111 : Gosub Enbl : Waitms 1 ' Display On 2
Portc = &B00000000 : Gosub Enbl : Waitms 1 ' Clear Display 1
Portc = &B00000001 : Gosub Enbl : Waitms 2 ' Clear Display 2
Portc = &B00000000 : Gosub Enbl : Waitms 1 ' Entry Mode Set 1
Portc = &B00000110 : Gosub Enbl : Waitms 1 ' Entry Mode Set 2
Portc = &B00000000
Return
Enbl: ' Enable ein
Set Portc.4
Waitus 400 ' Enable aus
Reset Portc.4
Return

Nach datenblatt wollte ich testweise ein Zeichen ausgeben.
Bin gerade in der Firma und da habe ich den Quellcode nicht.
Ich beachte RS , E , und R/W
Aber irgendwas mache ich da noch falsch.

Benutze diese allgemeine Anleitung:

http://sprut.de/electronic/lcd/index.htm