Hello Jose
Thank you for your answer.
I know that the sensor I have to protect from light. MPL3115A2 is inside black plastic box with small holes. Data of temperature are very stable only altitude and pressure aren't stable. I used OSR= 128.
This is my initilization code (I use AVR and code C).
void MPL3115A2_Init (void) { IIC_RegWrite(MPL3115A2_I2C_ADDRESS, CTRL_REG1, 0x04); // Reset all registers to POR values _delay_ms(1); IIC_RegWrite(MPL3115A2_I2C_ADDRESS, PT_DATA_CFG_REG, 0x07); // Enable data flags IIC_RegWrite(MPL3115A2_I2C_ADDRESS, CTRL_REG3, 0x11); // Open drain, active low interrupts IIC_RegWrite(MPL3115A2_I2C_ADDRESS, CTRL_REG4, 0x80); // Enable DRDY interrupt IIC_RegWrite(MPL3115A2_I2C_ADDRESS, CTRL_REG5, 0x00); // DRDY interrupt routed to INT2 - PTD3 IIC_RegWrite(MPL3115A2_I2C_ADDRESS, CTRL_REG1, 0x39); // Active barometer mode, OSR = 128 }
Greetings
Tomasz