Hallo Group :o) Ich habe mir oben besagtes LCD Display zugelegt und würde es gerne mit einem AVR 3213 zum laufen bringen.Jedoch scheitere ich irgendwo und weiß nicht wo.Vielleicht hat ja schon jemand mit diesem LCD gearbeitet und sieht anhand des Quellcodes wo der Bock sitzt. Wäre für jede Hilfe dankbar.Programmiersprache Bascom. Code:
$regfile = "2313def.dat" 'AT90S2313 $crystal = 4000000 Ddrd = &B0011000 Const Dsm0822a_lcd = &H70 'Defines the address of the DSM-0822A
Const Pcf8574_write = &H40 Const Pcf8574_read = &H41 Config I2cdelay = 10 Config Scl = Portb.3 'Configure i2c SCL Config Sda = Portb.2 I2cinit Dim A As Integer Dim I As Integer
I2cstop
Do Portd.4 = 1 'Rote LED (Pin PD3) an Portd.3 = 0 Waitms 500
For I = 0 To 255 I2cstart 'generate start I2cwbyte Pcf8574_write 'send slave address I2cwbyte I 'send a value I2cstop Waitms 100 'generate stop Next
I2cstart I2cwbyte Dsm0822a_lcd 'send slave address // Display anprechen I2cwbyte 128 + 64 + 32 + 0 '1110_0000 224 DEVICE SELECT Subdevice 0 select I2cwbyte 128 + 64 + 8 '1100_1000 200 MODE SET Display an, LCD BIAS 1/3 MUX 1:4 I2cwbyte 0 '0000_0000 0 LOAD DATA POINTER auf 0 For A = 1 To 16 I2cwbyte 255 Waitms 100 Next I2cstop
Portd.4 = 0 Portd.3 = 1 'Rote LED aus Waitms 500 Loop End
Vielen Dank Troelli