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.

INA238: What is the original value of 16 bits read from the current result register, and what is the unit?

Part Number: INA238


Tool/software:

Hi team,

I read the description in the current result register in datasheet: Output current in A. Then in the following calculation, the actual calculation result in amperes is equal to the value of the current result register * CURRENT_LSB, which contradicts the statements on both sides. And the value of CURRENT_LSB is not specified, although I guess it is the accuracy of the current measurement range. For example, in the 40.96mV range, with 12m Ω as the sampling resistor, CURRENT_LSB=0.1mA. However, if the current result register is read and the actual value is calculated using accuracy, does it mean that the value of the shunt calibration register is not used for automatic current calculation?
So I need to know what the value of the current result register is, uint16 or int16? What is the unit? Because there is a conflicting statement in datasheet.

Thanks.

Best regards,

Jiahui

  • The SHUNT_CAL register description says:

    The register provides the device with a conversion constant value that represents shunt resistance used to calculate current value in Amperes.
    This also sets the resolution for the CURRENT register
    Value calculation under Section 8.1.2.

    The CURRENT register description says:

    Calculated current output in Amperes. Two's complement value.
    Value description under Section 8.1.2.

    Section 8.1.2 says that CURRENT_LSB is a value that you can choose yourself, but it should be as large as possible to get better resolution; see equation 2.

    "Two's complement" means that the value is encoded in the same way as a signed 16-bit value on your MCU.

  • Hi Jiahui,

    Clemems is correct in saying that the CURRENT register is in two's complement.

    Programming the SHUNT_CAL register is necessary. CURRENT_LSB * CURRENT = Current (in Amperes). This equation only works if the SHUNT_CAL register has been programmed. 

    Best,

    Holly