Using AD7745(ADC), I2C Communication

Hi, I made a circuit to use another peripheral, so Would you check that this circuit is correct??

and if correct,Could you explain the role of mbl_mw_i2c_get_data_signal and the role of parameter id?
I don't know what value do i input into parameter id.

Comments

  • Read the documentation:
    https://mbientlab.com/cppdocs/0/i2c.html

    Have you tested this circuit? There's no point in asking for feedback if you don't even know if it works or not.

  • As long as it works on a 3v power line and it's i2c compatible, I don't see why it wouldn't work in theory.

  • @Eric said:
    Read the documentation:
    https://mbientlab.com/cppdocs/0/i2c.html

    Have you tested this circuit? There's no point in asking for feedback if you don't even know if it works or not.

    Yes, this circuit was tested using osciloscope and then, I identified that when I tried to communicate MMR with AD7745, the SDA, SCL signal occurred.

    I think that i misused this code. Could you give me another code except this example (https://mbientlab.com/cppdocs/0/i2c.html) ??

  • @Laura said:
    As long as it works on a 3v power line and it's i2c compatible, I don't see why it wouldn't work in theory.

    I think that i entered a wrong register address and device address

  • Is it working now that you have fixed the i2c settings?

  • edited August 2019

    @Laura said:
    Is it working now that you have fixed the i2c settings?

    No....
    If I try to control the LED of MMR, it was fine.. but i2c communication has a problem..


    This is my code. is there any problem in code??

  • It could be your device does not follow standard I2C protocol. Verify with your device's spec sheet on how to read a register value

  • @Eric said:
    It could be your device does not follow standard I2C protocol. Verify with your device's spec sheet on how to read a register value

    I think so! So, libmetawear.mbl_mw_datasignal_subscribe and libmetawear.mbl_mw_datasignal_read_with parameters can implement i2c communication ?

    This picture is the write and read sequence

    I really wonder that subscribe and read with parameter function can send slave address, sub address, slave address as read sequence.

    So I mean that if I use these two functions, I can send the SLAVE ADDR, SUB ADDR, SLAVE ADDR to SLAVE DEVICE.

  • @Eric said:
    It could be your device does not follow standard I2C protocol. Verify with your device's spec sheet on how to read a register value

    Hi, Eric!
    I solved the above problem and your advice was perfectly right!
    but, there is another problem in I2C Communication

    MMR communicates with AD7745 and AD7745 create the data per 11.0ms
    So, I want to set the i2c reading speed of MMR in code as same as the speed that AD7745 create the data

    Now, I'm using the sleep(0.01) in my code but this way is not correct

    So, Could you give me any advice ?

    Thanks,
    Wongi

Sign In or Register to comment.