<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>I am running MCP9808 on NRF52 EVB, i have this following program which is not giving the correct values on terminal display</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23653/i-am-running-mcp9808-on-nrf52-evb-i-have-this-following-program-which-is-not-giving-the-correct-values-on-terminal-display</link><description>I have this program running on KEIL 5, what could be the problem with the code and Do you guys have any sample code for mcp9808?
Note- I am using the wired connection not a Bluetooth app to sense the temperature
Please Help
Thank you! 
 #include </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 24 Jul 2017 07:16:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23653/i-am-running-mcp9808-on-nrf52-evb-i-have-this-following-program-which-is-not-giving-the-correct-values-on-terminal-display" /><item><title>RE: I am running MCP9808 on NRF52 EVB, i have this following program which is not giving the correct values on terminal display</title><link>https://devzone.nordicsemi.com/thread/92975?ContentTypeID=1</link><pubDate>Mon, 24 Jul 2017 07:16:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7b0163e-ce52-4b13-be03-959a4ff1cdf9</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;This depends on the device, but typically this is done by writing two bytes to the device. First the register address, and then the value of the register. This is shown in the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v13.1.0/twi_sensor_example.html?cp=4_0_0_4_5_36"&gt;TWI sensor example&lt;/a&gt; in the SDK:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define CONF_REG_ADDR 0xXX
#define CONF_REG_VAL  0b00001000

void LM75B_set_mode(void)
{
    ret_code_t err_code;

    uint8_t reg[2] = {CONF_REG_ADDR, CONF_REG_VAL};
    err_code = nrf_drv_twi_tx(&amp;amp;m_twi, MCP_9808_ADDR, reg, sizeof(reg), false);
    APP_ERROR_CHECK(err_code);
    while (m_xfer_done == false);
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I am running MCP9808 on NRF52 EVB, i have this following program which is not giving the correct values on terminal display</title><link>https://devzone.nordicsemi.com/thread/92973?ContentTypeID=1</link><pubDate>Fri, 21 Jul 2017 14:49:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f315d374-d320-4865-9d29-8ae21086cb57</guid><dc:creator>vishal</dc:creator><description>&lt;p&gt;Jorgen, i have a quick question.............how can we write a value to the register
in my case if you can see below&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;err_code = nrf_drv_twi_tx(&amp;amp;m_twi_mcp9808, MCP_9808_ADDR, reg, sizeof(reg), false);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;i have to write a value  00001000 to config register
how can we do that?
solving this may solve the question
Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I am running MCP9808 on NRF52 EVB, i have this following program which is not giving the correct values on terminal display</title><link>https://devzone.nordicsemi.com/thread/92974?ContentTypeID=1</link><pubDate>Fri, 21 Jul 2017 08:36:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46bb3bd5-3c75-4f61-a61a-a2ba2bbd1b02</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Unfortunately, we don&amp;#39;t have any example code for this. What values are you seeing, and what do you expect to see?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>