So ich habe jetzt diesen Code mit dem es funktioniert:
Allerdings gibt es noch ein paar Probleme wie man auf dem Display erkennen kann wird der Text nicht richtig angezeigt und die Fehler wandern langsam pber das Display woran kann das liegen?Code:$regfile = "M32def.dat" 'Atmega 32 $crystal = 6000000 ' 6 MHz $baud = 9600 'Baudrate der RS232 Schnittstelle $hwstack = 150 $swstack = 120 $framesize = 150 $lib "KS108.LBX" $include "Font8x8.font" ' Disable JTAG interface Dim Bz As Byte Bz = Mcucsr 'READ VALUE OF &H34 Bz = Bz Or &H80 'SET UPPER BIT Mcucsr = Bz 'WRITE TWICE TO DISABLE JTAG Mcucsr = Bz 'for Glcd Ks108 Config Graphlcd = 128 * 64sed , Dataport = Portb , Controlport = Portc , Ce = 3 , Ce2 = 2 , Reset = 4 , Rd = 5 , Cd = 6 , Enable = 7 ', Mode = 6 'The dataport is the portname that is connected to the data lines of the LCD 'The controlport is the portname which pins are used to control the lcd 'CE = CS1 Chip select 'CE2 = CS2 Chip select second chip 'CD = DI Data/instruction 'RD = R/W Read/Write 'RESET = RST reset 'ENABLE = E Chip Enable do Cls Wait 2 Setfont Font8x8 Lcdat 1 , 3 , "SETUP MENU " Lcdat 3 , 3 , "Wait ....." Wait 5 loop End
Bild hier







Zitieren

Lesezeichen