I have confirmed with a different MCU/FW setup that the MCP9808 is working correctly over I2C.

The output I2C data out (Address and Register seem to be sending correctly) I see on the scope is not data I would expect - which leads me to believe that my I2C protocol is incorrect. The scope data is also not what I'm seeing reported in TeraTerm - so I may have data formatting issues too. I am seeing my UART test reported in TeraTerm, so that seems to be fine.

I apologize - I don't think I'm clear on what you mean though regarding the sprintf function. My intent was to convert the two-byte read from the sensor (MCP_temp) into characters (OutputString) to output into TeraTerm. I see that it is throwing warnings. My interpretation was that the format is sprintf(output_buffer, "%format", data_to_convert), is that incorrect?

Thank you - I see that's a much more efficient way to get multiple bytes out.

Thank you also for your help and comments in the data types for the variables, and the functions. I did try to use pointers while I was trying to figure this out, piecing together different examples.

I'm happy to share that thanks to your help and explanations, I am reporting correct temperatures. I look forward to expanding the project (and also possibly not putting as many projects into a workspace?)

okeee, i downloaded the code and copied it and it worked once, after i powered on and off the slave i'm trying to talk to... but once i stop the program (Psoc creator 4) and restart i get strange errors of "master not ready" from the sendstart command; upon trying it again, sometimes get a 1 ("master lost arbitration")... i don't understand how the "master" can not be ready when the only commands are:

I2C_2_Start(); CyGlobalIntEnable;

errStat = I2C_2_I2CMasterSendStart(0x77,I2C_2_I2C_WRITE_XFER_MODE); // this is where i get a 4 or a 1 for errStat

Can you please post your complete project, so that we all can have a look at all of your settings. To do so, use Creator->File->Create Workspace Bundle (minimal) and attach the resulting file. Additionally a link to the datasheet of the device you want to talk to.

1. Write the slave address followed by the Write flag 1’b0 2. Write the register address followed by a Stop instruction 3. Write the slave address followed by the Read flag 1’b1 4. Read as many data bytes while the internal sub-address is auto-incremented

i assume 1. is sendstart, 2. is writebyte, sendrestart (have tried a stop as well here) 3. is readbyte

thanks very much... i checked byte mode; i'll investigate the hardware... if i reset (unplug and plug) the psoc and power off and on the slave, the thing seems to read from it, but not expected data...