This is snippet from working MLX90614 code (other compiler) to give you a guideline:
NormCode:Low I2C_SCL_Pin Low I2C_SDA_Pin I2C_Start() I2C_WriteByte($00) 'SLAVE ADDRESS I2C_WriteByte($07) '$07 = �000111 ADDRESS I2C_Restart() I2C_WriteByte($01) 'READ CMD sdTEMP_C.Byte0 = I2C_ReadByte() I2C_Ack() sdTEMP_C.Byte1 = I2C_ReadByte() I2C_Ack() yPEC = I2C_ReadByte() I2C_Stop()
Bookmarks