Versuch mal:
Eigentlich sollte das funzen (hoff ichCode:Dim Koordbytes(4) As Byte Dim Koordinate As Long At Koordbytes Overlay Dim Ix As Byte Dim Low_adresse As Byte Dim High_adresse As Byte Dim Eeram_adr As Word At Low_adresse Overlay Eeram_adr = &H0000 Koordinate = 294 Gosub Print_out Gosub Ee_out Eeram_adr = Eeram_adr + 4 Koordinate = -313 Gosub Print_out Gosub Ee_out Eeram_adr = &H0000 Gosub Ee_inp Print Str(koordinate) Eeram_adr = Eeram_adr + 4 Gosub Ee_inp Print Str(koordinate) End Print_out: Print Str(koordinate) ; "-> "; For Ix = 1 To 4 Print Str(koordbytes(ix)) ; " "; Next Print Return Ee_out: I2cstart 'Start I2cwbyte &B10100010 'Sende Slavadresse (Adresse für A0=EIN) I2cwbyte High_adresse 'Sende Speicheradresse High I2cwbyte Low_adresse 'Sende Speicheradresse LOW I2cwbyte Koordbytes(1) I2cwbyte Koordbytes(2) I2cwbyte Koordbytes(3) I2cwbyte Koordbytes(4) I2cstop 'stop Return Ee_inp: I2cstart 'Start I2cwbyte &B10100010 'Sende Slavadresse (Adresse für A0=EIN) I2cwbyte High_adresse 'Sende Speicheradresse High I2cwbyte Low_adresse 'Sende Speicheradresse LOW I2cstart 'Start I2cwbyte &B10100011 I2crbyte Koordbytes(1) , Ack I2crbyte Koordbytes(2) , Ack I2crbyte Koordbytes(3) , Ack I2crbyte Koordbytes(4) , Nack I2cstop 'stop Return)







Zitieren

Lesezeichen