<?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>Reading TMP102 sensor data over i2c.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/3593/reading-tmp102-sensor-data-over-i2c</link><description>I&amp;#39;m a beginner on embedded field. 
 I am having a nrf51822 development kit &amp;amp; Starter Kit and a mbed HRM1017(including nrf51822).
I tested mbed source code for advertising TMP102 sensor data.
 mbed.org/.../ 
It worked. 
 But I&amp;#39;d like to implement</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 Apr 2015 16:28:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/3593/reading-tmp102-sensor-data-over-i2c" /><item><title>RE: Reading TMP102 sensor data over i2c.</title><link>https://devzone.nordicsemi.com/thread/13033?ContentTypeID=1</link><pubDate>Tue, 14 Apr 2015 16:28:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2998729-5b4a-4aa0-b62a-308c3c6e94f7</guid><dc:creator>Kevin</dc:creator><description>&lt;p&gt;Could you please share your solution in project form?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading TMP102 sensor data over i2c.</title><link>https://devzone.nordicsemi.com/thread/13038?ContentTypeID=1</link><pubDate>Wed, 27 Aug 2014 08:13:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d0110af-b9d5-4026-bbf1-a4b323c44636</guid><dc:creator>HenriL</dc:creator><description>&lt;p&gt;Thank you for these posts, it works for me with TMP102_ADRESS (0x48&amp;lt;&amp;lt;1)
And calling  in the main :&lt;/p&gt;
&lt;p&gt;twi_master_init() //dunno if necessary
and then&lt;/p&gt;
&lt;p&gt;uint8_t TempI2Cdata[2]; 	//Get 2 bytes (float and integer part) of TMP102&lt;/p&gt;
&lt;p&gt;TMP_getdata(TempI2Cdata);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading TMP102 sensor data over i2c.</title><link>https://devzone.nordicsemi.com/thread/13037?ContentTypeID=1</link><pubDate>Wed, 27 Aug 2014 01:25:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b445c4ae-991a-4d83-b2cb-2941cc314f06</guid><dc:creator>Takatoshi Nao</dc:creator><description>&lt;p&gt;Hi Janek.
It worked.　Thank you very much.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading TMP102 sensor data over i2c.</title><link>https://devzone.nordicsemi.com/thread/13039?ContentTypeID=1</link><pubDate>Tue, 26 Aug 2014 11:06:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21dc1f04-f3bd-4f00-9e99-6a67e70aba03</guid><dc:creator>Janek Mann</dc:creator><description>&lt;p&gt;Hi Takoshi,&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define TMP102_ADDRESS (0x90 &amp;lt;&amp;lt; 1)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;is wrong (0x90 is already the 8-bit representation of the I2C address, 0x48 would be the equivalent 7-bit representation, shifting 0x90 left by one exceeds 8 bits).&lt;/p&gt;
&lt;p&gt;Try it with&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define TMP102_ADDRESS 0x90
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading TMP102 sensor data over i2c.</title><link>https://devzone.nordicsemi.com/thread/13036?ContentTypeID=1</link><pubDate>Tue, 26 Aug 2014 06:10:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f71634cb-52c2-4879-94ad-20c2e96a179f</guid><dc:creator>Takatoshi Nao</dc:creator><description>&lt;p&gt;When I debugged, TWI_SDA_READ() reads NACK in twi_master_clock_byte(address). What&amp;#39;s the problem?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading TMP102 sensor data over i2c.</title><link>https://devzone.nordicsemi.com/thread/13035?ContentTypeID=1</link><pubDate>Tue, 26 Aug 2014 01:49:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:196b7347-e8cb-4b37-a17c-9bc7c2955d76</guid><dc:creator>Takatoshi Nao</dc:creator><description>&lt;p&gt;Thank you for responding.
but not worked.
My Question is edited with my code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading TMP102 sensor data over i2c.</title><link>https://devzone.nordicsemi.com/thread/13034?ContentTypeID=1</link><pubDate>Mon, 25 Aug 2014 15:49:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7858bb30-d5b5-457c-ac7e-bf67355e9905</guid><dc:creator>Janek Mann</dc:creator><description>&lt;p&gt;You can use the twi_master library provided in the NRF51 SDK:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define TMP_ADDRESS (0x49 &amp;lt;&amp;lt; 1)

void TMP_getdata(uint8_t* data) {
		twi_master_transfer(TMP_ADDRESS | TWI_READ_BIT, data, 2, TWI_ISSUE_STOP);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You need to create a file twi_master_config.h with your pin configuration, and add the twi_sw_master.c file to your project, and call twi_master_setup before calling the other twi functions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>