User Manual

Application Note
SMBus communication with MLX90614
390119061402 Page 32 of 32 Jan-2008
Rev 004
//------------------------------------------------------------------------------------------------------------------------------
unsigned char Receive_bit(void)
{
unsigned char bit;
_SDA_IO=1; // SDA-input
mSCL_HIGH(); // Set SCL line
Delay10TCYx( HIGHLEV ); // High Level of Clock Pulse
if(_SDA) // Read bit, save it in bit
bit=1;
else
bit=0;
mSCL_LOW(); // Clear SCL line
Delay10TCYx( LOWLEV ); // Low Level of Clock Pulse
return bit;
}//End of Receive_bit()
//------------------------------------------------------------------------------------------------------------------------------