This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/MSP430G2553: VEML 6075 sensor with MSP430G2553

Part Number: MSP430G2553


Tool/software: Code Composer Studio

Hello Everyone!

                          Currently I am trying to code VEML6075 sensor with TI microcontroller. I am facing the problems of I2C communication. As per VEML6075 datasheet config, UVA, UVB registers are of 16bit so 2 bytes should be used only for reading and writing the registers.

                         Now the problem is that TI microcontroller I2C works on 1 byte I2C communication. 
                   
                        Please help me to solve this problem. 
                        
                      As in Code composer studio I can only see the value of slave address register and micro controller can't write into sensor data registers, nor it can read. 
                    
                         Please suggest me some I2C library for this microcontroller??
Kind regards,
Syed
  • Hello Syed,

    Data on the I2C bus is transferred in 8-bit (1 byte) packets. There's no limitation on the number of bytes; however each byte has to be followed by an acknowledge bit. This information and more regarding the I2C standard can be found at i2c.info/i2c-bus-specification

    Our I2C peripheral follows that same standard and can accept multiple bytes of data, as long as there are acknowledge bits after every byte. I cannot comment on the sensor you are trying to use, but if it follows the I2C specification then getting data to and from those 16 bit registers would take 2 write or read cycles.

    Information on how to access those slave registers should also be explained in the sensor's datasheet. If it is not clearly explained there then you may need to reach out to the sensor manufacturer's technical support for more information on their part.

    Best regards,

    Matt

**Attention** This is a public forum