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.

I2C interfacing LSM303DLHC with MSP430F5438 - problem faced in reading

Other Parts Discussed in Thread: MSP430F5438, CC2540, CC2533

Hi.

I am facing problem in reading data from LSM303DLHC temperature sensor output registers.I have interfaced LSM303DLHC with MSP430F5438

using I2C communication protocol.

TEMP_OUT_L_M and TEMP_OUT_H_M are registers of temperature sensors.I am getting values 1260 , 1824 etc.

I am unable to relate these values with temperature range -40degree cent to 85 deg.cent. How to convert these values into centigrade?

  • Hi Priyanka,

    I am working with LSM303DLHC and trying to read magnetometer data with TI CC2540 using I2C protocol. I am having a hard time to get I2C to work.

    I am disabling the accelerometer by setting the mode to power down and trying to read magnetometer data  but I am always getting zero in the output registers.

    Could you please help me with the i2c?

    As an starting point I used the hali2c functions provided for the CC2533 but it is not working...

    Thanks, 

  • Hi Flor,

    I have used Accelerometer and Magnetometer both at the same time .They
    work together .So no need to keep Accelerometer in power down mode.

    There might be these reasons-
    1.Check your slave address.
    It must be correct for proper communication.
    2.Check your configurations for magnetometer.
    CRA_REG_M and MR_REG_M These two registers need to be configured properly.
    3.when you perform I2C write,there should be some
    small delay before stop condition.

    I suggest you to refer TI's slaa208a sample codes for I2C
    routines.

    Hope this will help you,

    Thank You,
    Priyanka

**Attention** This is a public forum