Code:'----------[ I2C EEPROM Schreib Routine ]--------------------------------------- Sub Write_eeprom(byval Adresse As Byte , Byval Block As Byte , Byval Wert As Byte) I2cstart 'start condition Waitms 1 24c16_w = Block * 2 ' Blockstart im EEPROM 24c16_w = 24c16_w + &B1010_0000 ' + Bausteinadresse I2cwbyte 24c16_w ' Bausteinadresse Waitms 1 I2cwbyte Adresse ' Adresse im IC Waitms 1 I2cwbyte Wert ' Byte schreiben Waitms 1 I2cstop ' Stopbedingung Waitms 10 ' int. Schreibzeit abwarten End Sub
Lesezeichen