This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/SM72445: SM72445 I2C reg1

Part Number: SM72445
Other Parts Discussed in Thread: USB2ANY, SM72442

Tool/software: TI C/C++ Compiler

this is my code in which i am receiving data as 02 e0 03 ff ff ff ff ff ff ff ff but getting acknowledge correctly please tell me how to fix this 


i2c_start();
i2c_write(0x02);
i2c_write(0xE1);

i2c_start();


i2c_write(0x03);

for(i=0;i<=7;i++)
{
data[i]=i2c_read(TRUE);
}

i2c_stop();

  • 6305.SM72445_USB2ANY_AN_melo_2018Mar.pdfOur group is supporting this device but we are analog power engineers not much able to help you with the coding.   Can you refer to the attached and see if this can help you resolve the issue?

  • THANK YOU SO MUCH I GOT SOME IDEA FROM YOUR REFERENCE,
    BUT SOME MORE ASSISTANCE IN THE CODING TOO
  • THANK FOR YOUR RESPONSE PLEASE PROVIDE THE CONNECTION DIAGRAM TO INTERFACE THE USB2ANY WITH SM72445 USING I2C
    WE NEED TO ORDER THE USB2ANY
  • I have replied to the same question in your other thread. Let's close this thread here. Thank you
  • i am getting the result as    07 12 E0 81 C0 75 07 from the usb to any in i2c communication for e1 register  how  can i know voltage and current from it

  • The first 10 LSBs are for the input current, the next LSBs are for the input voltage etc... as described by the I2C register config. register. table on page 12 of the datasheet for the SM72445. 

    The input voltage is the voltage measured at the AVIN pin and referenced to the VSSA pin. The full scale (1024) is set by the voltage at the VDDA pin (typically +5V).

    The input current is the voltage measured at the AIN pin and is referenced similarly to the AVIN voltage. The relationship with the current depends on the current to voltage relationship of any current sense circuit used.

    Output voltage and output current measurements are done in a similar way.

    Here's the extraction of part of the register into Vin and Iin for your data, assuming MSB 07 12 E0 81 C0 75 07 LSB:

    Best Regards,

    Florent

  • The first 10 LSBs are for the input current, the next LSBs are for the input voltage etc... as described by the I2C register config. register1 table on page 12 of the datasheet for the SM72445

    The input voltage is the voltage measured at the AVIN pin and referenced to the VSSA pin. The full scale (1024) is set by the voltage at the VDDA pin (typically +5V).

    The input current is the voltage measured at the AIN pin and is referenced similarly to the AVIN voltage. The relationship with the current depends on the current to voltage relationship of any current sense circuit used.

    Output voltage and output current measurements are done in a similar way.

    Here's the extraction of part of the register into Vin and Iin for your data, assuming MSB 07 12 E0 81 C0 75 07 LSB:

    Best Regards,

    Florent

  • Hi, I am trying to access SM72442 registers using Raspberry Pi. I was having some problems previously (previous post: e2e.ti.com/.../693420). However, I am able to read the registers now but I am facing a strange issue. If I read the content of Reg3, Reg4, and Reg5, they appear to be correct.

    My Python code is given below:

    #######
    import smbus
    from time import sleep
    bus = smbus.SMBus(1) # 1 indicates /dev/i2c-1
    device_id = 0x06
    register = 0xE5
    data=bus.read_i2c_block_data(device_id, register, 8)
    print data
    #######

    Reg3 gives [7, 24, 160, 128, 1, 10, 0, 0]
    Reg4 gives [7, 0, 0, 0, 0, 0, 0, 0]
    Reg 5 gives [7, 24, 160, 128, 1, 10, 0, 0]

    All of these registers are R/W and the values returned are correct at reset. However, if I try to read the Reg0 or Reg1, they give random values which changes every time I access. Could it be possible that I have nothing connected at the respective pins and leaving them hanging is causing this issue? Do I need to set external values at ADCs even if I want to set V/I limits internally? Also, would this issue get solved when I connect sense resistors? I am currently checking it with the basic power circuitry. Please comment on the issue.
  • Please see the reply to your other thread. Lets close this duplicate post here.

    Thanks