You are reading a single comment by @DrAzzy and its replies. Click here to read the full conversation.
  • This is strange - what really confuses me is that the write doesn't fail, but the read does.
    Some sanity checks:
    You have a decoupling cap on it, right? If not, try putting 0.1uf cap (ceramic) between Vcc and Gnd right next to the chip.

    Failing that

    Run this and report results:

    
    I2C2.setup({scl:B10,sda:B11});
    var eeprom=require("AT24").connect(I2C2, 8, 2, 0);
    console.log(eeprom.a(eeprom.i2ca)); //check that I2C addressing is being done right
    console.log(eeprom.i(0x64)); //check that memory addressing is being done right
    console.log(eeprom.cap); //sanity check - should be 256 (capacity supplied as kbits, but internally handled in bytes. 
    I2C2.writeTo(0x50,0); //select address 0 manually
    I2C2.readFrom(0x50,8); //read 8 characters manually
    I2C2.writeTo(0x50,0x64); //select address 0x64 manually
    I2C2.readFrom(0x50,8); //read 8 characters manually
    
    

    I've got a small AT24-series chip at home that I can check this on, but unless something broke very recently, i don't know what it could be.

About

Avatar for DrAzzy @DrAzzy started