cancel
Showing results for 
Search instead for 
Did you mean: 

TSC1641 The values of the current and power registers appear to be swapped.

jozseftari
Associate

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.

jozseftari_0-1769436618297.png

Then, when the conversion ready interrupt comes, I read the registers from 1 to 5 at once.

jozseftari_1-1769436698835.png

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!

1 REPLY 1
TDK
Super User

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?

If you feel a post has answered your question, please click "Accept as Solution".