You are reading a single comment by @fobus and its replies. Click here to read the full conversation.
  • @DrAzzy I have not decoupling cap, I'm going to buy and apply it.
    But I have tried your code without decoupling cap. I think results are good;

    >console.log(eeprom.a(eeprom.i2ca)); //check that I2C addressing is being done right
    function () { [native code] }
    =undefined
    >console.log(eeprom.i(0x64)); //check that memory addressing is being done right
    80
    =undefined
    >console.log(eeprom.cap); //sanity check - should be 256 (capacity supplied as kbits, but internally handled in bytes.
    256
    =undefined
    >I2C2.writeTo(0x50,0); //select address 0 manually
    =undefined
    >I2C2.readFrom(0x50,8); //read 8 characters manually
    =[ 255, 255, 255, 255, 255, 255, 255, 255 ]
    >I2C2.writeTo(0x50,0x64); //select address 0x64 manually
    =undefined
    >I2C2.readFrom(0x50,8); //read 8 characters manually
    =[ 110, 97, 117, 111, 119, 117, 105, 111 ]
    > 
    

    Also I don't know does it care but here is some results about addressing ;

    >eeprom.i(2);
    =80
    >eeprom.i(0x64);
    =80
    >eeprom.i(0x50);
    =80
    >eeprom.i(1);
    =80
    >eeprom.i(0);
    =80
    > 
    

    One more test result is below, I think it writes and reads when I try manually

    >I2C2.writeTo(0x50,0x64);
    =undefined
    >I2C2.writeTo(0x50,0x64,"MERHABA");
    =undefined
    >I2C2.writeTo(0x50,0x64);
    =undefined
    >I2C2.readFrom(0x50,7);
    =[ 77, 69, 82, 72, 65, 66, 65 ]
    
About

Avatar for fobus @fobus started