Other Parts Discussed in Thread: MSP430F2619
Tool/software:
Hi
I am working with INA229 and trying to measure VBUS voltage from register 0x05. According to datasheet, the resolution for VBUS is 195.3125 μV/LSB.
So the conversion factor for VBUS must be always 195.3125uV .
But in my project a have wrong reading from VBUS with 195.3125. (VBUS measured on pin8 of INA229)
So I calculated which factor is correct in my case and result was 122.0000uV. With that factor i have real and linear reading. Of course i can use it in my application, but i want to know what am i doing wrong? VBUS is not depend on ADCRANGE but anyway i already tried couple of different ADCCONFIG and I always got the same result.
int64_t voltage_uV = (int64_t)signed_raw * 1953125ULL / 10000ULL; calculation with 1953125 have linear reading but wrong value
int64_t voltage_uV = (int64_t)signed_raw * 1220000ULL / 10000ULL; calculation with 1220000 and result is linear and correct and real value
I can read correctly 0x3F and 0x3E and my SPI (from MSP430F2619) config is ok for INA229.
So what am i doing wrong?
Regards Slawomir