<?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>I2C slave device address diff bw data sheet and nRF52</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18912/i2c-slave-device-address-diff-bw-data-sheet-and-nrf52</link><description>I am using Martin&amp;#39;s code to test my I2C connection. 
 I use PC10040 evaluation board, SCL and SDA are 3 and 4. 
 My sensor is a Max 30102 pulse and HR sensor.
I used Martin&amp;#39;s code to detect my device at address 0x57; however, address in its datasheet</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 16 Jan 2017 00:41:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18912/i2c-slave-device-address-diff-bw-data-sheet-and-nrf52" /><item><title>RE: I2C slave device address diff bw data sheet and nRF52</title><link>https://devzone.nordicsemi.com/thread/73086?ContentTypeID=1</link><pubDate>Mon, 16 Jan 2017 00:41:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:716d29a4-ea9e-4fbd-84a4-72b4c6b2c924</guid><dc:creator>djqtsg</dc:creator><description>&lt;p&gt;yes! Please ignore it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C slave device address diff bw data sheet and nRF52</title><link>https://devzone.nordicsemi.com/thread/73085?ContentTypeID=1</link><pubDate>Fri, 13 Jan 2017 11:57:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e867c955-7101-440e-8973-ccea1ba8af74</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Is this related to this post: &lt;a href="https://devzone.nordicsemi.com/question/110723/i2c-driver-problem/"&gt;I2C driver problem&lt;/a&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C slave device address diff bw data sheet and nRF52</title><link>https://devzone.nordicsemi.com/thread/73084?ContentTypeID=1</link><pubDate>Thu, 12 Jan 2017 03:11:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4ababd0-d13a-49d9-bfbf-28e5816935ce</guid><dc:creator>djqtsg</dc:creator><description>&lt;p&gt;Martin, thx for ur help.&lt;/p&gt;
&lt;p&gt;I modified your code and used 0x57 as device address; however, I cannot get expected values.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint8_t dummy_data = 0x55;
// Iterate through all possible 7-bit TWI addresses
for(;;)
{
    device_address = 0x57;
		
uint8_t part_id[2], reg_addr = 0xFF;
nrf_drv_twi_tx(&amp;amp;twi_instance, device_address, &amp;amp;reg_addr, 1, true);

nrf_drv_twi_rx(&amp;amp;twi_instance, device_address, part_id, 1);
printf(&amp;quot;\t\t ** %2X %2X\r\n&amp;quot;, part_id[0], part_id[1]);
    nrf_delay_ms(2000);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;According to data sheet, register address 0xFF holds the device part ID, 0x15. What I get is 1.&lt;/p&gt;
&lt;p&gt;The more puzzling thing for me is the captured the SCL and SDA signals are strangely wrong:
&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/I2C-signal_5F00_1.JPG"&gt;I2C signal_1.JPG&lt;/a&gt;
&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/I2C-signal_5F00_2.JPG"&gt;I2C signal_2.JPG&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In the above pictures, D0 is SCK and D1 SDA.
The first picture shows every 2s there are activities on the two lines, which is correct.&lt;/p&gt;
&lt;p&gt;In the second picture, as the code does 1 I2C read, there should be at least 16 clock cycles: 8 for put register address, 8 for 1 byte data reply. But I cannot see that happening.&lt;/p&gt;
&lt;p&gt;I used PicoScope to capture the line activity. MCU is PC10040 evaluation board with SDK11.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C slave device address diff bw data sheet and nRF52</title><link>https://devzone.nordicsemi.com/thread/73087?ContentTypeID=1</link><pubDate>Wed, 11 Jan 2017 10:13:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d18810c6-8919-4d7a-aa25-b36c421ae78e</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;As Alex mentions 0xAE/F is the seven bit address 0x57 left shifted one bit and with a read/write bit subsequently placed at the Least Significant Bit (LSB). You should use address 0x57 in your code as the TWI drivers in the SDK takes care of left shifting and read/write bits for you. &lt;a href="https://devzone.nordicsemi.com/question/71861/twi-starting/"&gt;Here&lt;/a&gt; is an explanation of what is going on.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C slave device address diff bw data sheet and nRF52</title><link>https://devzone.nordicsemi.com/thread/73083?ContentTypeID=1</link><pubDate>Wed, 11 Jan 2017 09:46:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7668241-fa4f-4db5-94e7-e3b385dd8258</guid><dc:creator>Alex</dc:creator><description>&lt;p&gt;It is the same address. Nordic&amp;#39;s code doesn&amp;#39;t use LSB. 0xAF/2=0x57. So shifted by one bit.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>