So schwer ist das Schreiben auch nicht ( Software I²C ):
Code:
$regfile = "2313def.dat" .
$crystal = 10000000
Config Portb = Output
$sim
Config Sda = Portd.5
Config Scl = Portd.6
Config I2cdelay = 10
Dim Adres As Byte
Dim Value As Byte
Dim Rc As Word
Dim Rch As Byte
Dim Rcl As Byte
Dim Er As Byte
Dim Pos As Word
Declare Sub Write_eeprom(byval Adres As Word , Byval Value As Byte )
Const Addressw = &HA0 ' Addresse WRITE
'Deine Codes
'--------------------------- I²C Schreiben-----------------------------------
Sub Write_eeprom(byval Adres As Word , Byval Value As Byte )
I2cstart
I2cwbyte Addressw
I2cwbyte Adres
I2cwbyte Value
I2cstop
End Sub
Lesezeichen