I'm working with I2C and I have been using python library to communicate with a magnetic sensor. Now I am working with a different chip and it makes me wonder if I get the right concept or not. The only difference in new chip is that the register values are 2bytes.
Chip address is 0x30, register address is 0x11 and data that I want to write is 0x22
This is how i2c works To write to register address: - write(chip address, register address) - write(chip address, data)
This is how i2c works To read from Register: - write(chip address, register address) - Read(chip address, No of bytes)
Please correct me if I'm wrong.
I've been using a python library quick2wire for this. In this library we can use a function called writing_bytes(chip address, register address, data)
How does it decide which is register address and which is data?
If the chip's register address is 2bytes, it will set pointer to address+data in writing_bytes function?