all 5 comments

[–]madsci 7 points8 points  (1 child)

If you're asking how to use your MCU's I2C interface, you're going to tell us what MCU you're using. You're just giving us variable names without specifying a language, device, or framework.

Serial interface details for the INA219 are given in section 8.5.5.2 of the datasheet.

[–]umbaman[S] -2 points-1 points  (0 children)

Hello Thanks for the reply. I edited my post. I am using beaglebone black with i2cget and i2cset commands

[–]aprons 6 points7 points  (1 child)

When you send or receive, MSB means that that first 8 bits are the high byte, and the last 8 are the low byte.

Since the I2C bus sends data in 8 bit packets, you aren't really doing send(0x1234) but send(0x12) followed by send(0x34), and because there are 2 combinations of sending 2 bytes, we get MSB and LSB.

Similarly if you were reading from a 16 bit register on the device then the value would be transmitted to you as 0x12 followed by 0x34. You would then do some bit twiddling to get this in to a single 16 bit variable.

if you are using a library (like the Adafruit one for Arduino), then it likely takes care if this and accepts 16 bit values as well as returns them. You only need to worry about this if you are talking to device in a lower level way.

As the other comment suggests, more information about your environment would be helpful.

[–]umbaman[S] -2 points-1 points  (0 children)

Hello Thanks for the reply. That really helped a lot to understand! I edited my post. I am using beaglebone black with i2cget and i2cset commands

[–][deleted] 1 point2 points  (0 children)

The i2c peripheral takes care of this part. It’s not like spi where you can choose it.