2026-01-26 6:17 AM - last edited on 2026-01-26 6:44 AM by Peter BENSCH
I am having an issue where, when I read the values of the registers continuously, it seems as if the values of the current and power registers have been swapped.
After startup, I send the following configuration via i2c:
Configuration register write 0x8000 -> to reset the IC
Configuration register write: 0x0037 To continuously measure all values with a period of 1024 ms.
Shunt register write: 0x080b -> 0.03 Ohm
Mask register write: 0x0200 -> To enable conversion ready interrupt.
Then, when the conversion ready interrupt comes, I read the registers from 1 to 5 at once.
From the values read, it appears that the value of register 3 is the current and the value of register 4 is the power. (It looks like they position swapped.)
Another interesting fact is that the data read from the power register is exactly half of the actual value.
Has anyone else encountered this problem?
What could be the cause? Am I overlooking something?
Thank you for the support!
2026-01-26 3:15 PM
It may help you get an answer if you make this a little more digestible for the casual observer.
Why do you think the values are swapped? What values are you getting from the registers, including conversion from from register values to EUs, and what values are you expecting instead?