31.12.2013 Views

I C Precision Altimeter - Farnell

I C Precision Altimeter - Farnell

I C Precision Altimeter - Farnell

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

while (N>1)<br />

{<br />

N--;<br />

b = IIC_CycleRead(N);<br />

*array = b;<br />

array++;<br />

// Read N-1 Register Values<br />

}<br />

}<br />

b = IIC_StopRead();<br />

*array = b;<br />

// Send Stop Read which returns the<br />

// IICD<br />

/*********************************************************\<br />

* Initiate IIC Start Condition<br />

\*********************************************************/<br />

void IIC_Start(void)<br />

{<br />

IICC_MST = 1;<br />

timeout = 0;<br />

while ( (!IICS_BUSY) && (timeout= 1000)<br />

error |= 0x01;<br />

} //*** Wait until BUSY=0<br />

/*********************************************************\<br />

* Initiate IIC Stop Condition<br />

\*********************************************************/<br />

byte IIC_StopRead(void)<br />

{<br />

IICC_MST = 0;<br />

timeout = 0;<br />

while ( (IICS_BUSY) && (timeout= 1000)<br />

error |= 0x02;<br />

return IICD;<br />

} //*** Wait until BUSY=0<br />

For further information and examples please read application note AN4519 Data Manipulation and Basic Settings of the<br />

MPL3115A2 Command Line Interface.<br />

MPL3115A2<br />

Sensors<br />

Freescale Semiconductor, Inc. 11

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!