I2C eeprom read write


Results 1 to 7 of 7

Threaded View

  1. #6


    Did you find this post helpful? Yes | No

    Default

    Further testing reveals the codes are being stored correctly in the eeprom and can be read back and displayed with this code.

    This writes the codes correctly to the eeprom

    Code:
    VarA = 0
    I2CWRITE Scdeeprom,Sckeeprom,AT24C512B,VarA,[STR I2C1\8,STR I2C2\8]	'Load data into I2c eeprom

    This check works even after powering on/off so the data is in the eeprom ok and can be read back.

    Code:
    For VarA = 0 to 15               'Load I2C1 data from eeprom
    I2CREAD Scdeeprom,Sckeeprom,AT24C512B,VarA,[VarB1]	'Read data from I2c eeprom
    DEBUG HEX2 VarB1
    Next VarA
    However trying to put the codes back into the array variables with this code.

    Code:
    VarA = 0
    I2CREAD Scdeeprom,Sckeeprom,AT24C512B,VarA,[STR I2C1\8,STR I2C2\8]	'Read data from I2c eeprom
    Appears to work correctly but the first byte of I2C1 array is always corrupted? Could someone try and replicate the fault please.
    Last edited by retepsnikrep; - 13th July 2010 at 14:18.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts