I need a support in using MCP9600 thermocouple device.
I have tried to follow the example into the datasheet but it doesn't seem to work.
Actually when I read the upper byte and the lower byte of the Th I receive 255 on both, regardless of the temperature.
Here below my very simple test code...hope someone is able to help me.
void temp_init (void)
MSSP_I2C_Write(0b00000101);//write on this register the rest should be ok
MSSP_I2C_Write(0b00000000);//set thermocouple to K no filter
MSSP_I2C_Write(0x66); //write operation
MSSP_I2C_Write(0b00000000); //select operation on Th register
__delay_ms(1); //stretch time
datah = MSSP_I2C_Read(1);
datal = MSSP_I2C_Read(0);
temperature = (datah*16) + (datal/16); //temperature is always > than 0
Both datah and datal are 255...I'm sure I am missing something....
Thanks a lot