English
Language : 

MPL3115A2 Datasheet, PDF (11/44 Pages) Freescale Semiconductor, Inc – I2C Precision Altimeter
while (N>1)
{
N--;
b = IIC_CycleRead(N);
*array = b;
array++;
// Read N-1 Register Values
}
b = IIC_StopRead();
*array = b;
}
// Send Stop Read which returns the
// IICD
/*********************************************************\
* Initiate IIC Start Condition
\*********************************************************/
void IIC_Start(void)
{
IICC_MST = 1;
timeout = 0;
while ( (!IICS_BUSY) && (timeout<1000))
timeout++;
if (timeout >= 1000)
error |= 0x01;
} //*** Wait until BUSY=0
/*********************************************************\
* Initiate IIC Stop Condition
\*********************************************************/
byte IIC_StopRead(void)
{
IICC_MST = 0;
timeout = 0;
while ( (IICS_BUSY) && (timeout<1000))
timeout++;
if (timeout >= 1000)
error |= 0x02;
return IICD;
} //*** Wait until BUSY=0
For further information and examples please read application note AN4519 Data Manipulation and Basic Settings of the
MPL3115A2 Command Line Interface.
Sensors
Freescale Semiconductor, Inc.
MPL3115A2
11