Hallo alle zusammen,
Ich hab letzt in meiner Bastel Kiste das Display gefunden und nachdem ich jetzt schon mit Textbasierenden Displays gearbeitet hab möchte ich es jetzt noch mal probieren mit diesem Grafikdisplay
…..
Ich versuche wie oben schon in der Überschrift zu lesen ist mit einen mega32 das Grafikdisplay EA DOGM132-5 anzusteuern. Das ganze funktioniert über SPI.
Mein erstes Frage ist, da ich das Controllerbord 1.4 von Robotik-Hardware für den Testaufbau verwenden will und meinen Mikrokontroller mit USB ISP sind die Pins für den Hardware SPI schon belegt durch die ISP….ich werde dann wohl die Software SPI nehmen. Hat es irgendwelche Nachteil wenn ich die Software SPI nehm? Der Vorteil ist ja das ich die Pins selbst bestimmen kann.
Zum zweiten Problem der Initialisierung. Ich will in Bascom programmieren. Ich hab schon einige Threads gelesen und die Bascom Hilfe durchgeschaut doch mir ist noch nicht alles so klar.
Ich benutze bei dem Display die Low Power Schaltung.
http://www.lcd-module.de/deu/pdf/grafik/dogm132-5.pdf
In dem Fall sieht die Initialisierung folgendermaßen aus (siehe auch Seite 6).
Code:A0 | Hex ------------------- 0 | $40 0 | $A1 0 | $C0 0 | $A6 0 | $A2 0 | $2F 0 | $F8 0 | $00 0 | $23 0 | $81 0 | $1F 0 | $AC 0 | $00 0 | $AF
Nun weiß ich nicht so recht wie ich die einzelnen Bytes zum Display schieb.
Mach ich das mit dem Befehl spimove oder spiout oder ist das egal
Mein Initialisierungsprogramm würde dann so aussehen (ich weiß das es falsch ist ich will es nur posten das ihr mir alle sagen könnt was ich falsch gemacht hab ).![]()
Code:$regfile = "m32def.dat" $crystal = 16000000 $baud = 9600 'Config Spi = Hard , Data Order = Msb , Master = Yes , Polarity = High , Phase = 0 , Clockrate = 16 , Noss = 0 Config Spi = Soft , Din = Pinc.7 , Dout = Pinc.6 , Ss = Non , Clock = Pinc.5 Config Portc.4 = Output Lcdreset Alias Portc.4 Config Portc.3 = Output A0 Alias Portc.3 Dim Y As Byte Dim 1command As Byte Dim 2command As Byte Dim 3command As Byte Dim 4command As Byte Dim 5command As Byte Dim 6command As Byte Dim 7command As Byte Dim 8command As Byte Dim 9command As Byte Dim 10command As Byte Dim 11command As Byte Dim 12command As Byte Dim 13command As Byte Dim 14command As Byte Dim Lcdon As Byte Dim Lcdoff As Byte 1command = &H40 2command = &HA1 3command = &HCO 4command = &HA6 5command = &HA2 6command = &H2F 7command = &HF8 8command = &H00 9command = &H23 10command = &H81 11command = &H1F 12command = &HAC 13command = &H00 14command = &HAF Lcdon = &HAF Lcdoff = &HAE Lcdreset = 1 Waitms 40 Lcdreset = 0 Waitms 40 Lcdreset = 1 A0 = 0 Spiinit Y = Spimove(1command) Y = Spimove(2command) Y = Spimove(3command) Y = Spimove(4command) Y = Spimove(5command) Y = Spimove(6command) Y = Spimove(7command) Y = Spimove(8command) Y = Spimove(9command) Y = Spimove(10command) Y = Spimove(11command) Y = Spimove(12command) Y = Spimove(13command) Y = Spimove(14command) A0 = 1 Y = Spimove(lcdon) Wait 3 Y = Spimove(lcdoff) End
Ich hoffe ihr helft mir auch wenn ich mich en bissel dumm anstelle.
Lg Micha








Zitieren

Lesezeichen