<?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>nRF51422 communicating with SAA1064 via TWI/I2C</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/464/nrf51422-communicating-with-saa1064-via-twi-i2c</link><description>The last few weeks I&amp;#39;m working with the nRF51422 and run in to several TWI/I2C issues. All of them I could solve except an issue with a SAA1064 7segment display driver from NXP. 
 Depending the device selection the I2C address of the SAA1064 should be</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 18 Sep 2013 12:41:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/464/nrf51422-communicating-with-saa1064-via-twi-i2c" /><item><title>RE: nRF51422 communicating with SAA1064 via TWI/I2C</title><link>https://devzone.nordicsemi.com/thread/2425?ContentTypeID=1</link><pubDate>Wed, 18 Sep 2013 12:41:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da55dbc2-a21f-4807-983b-a91156360357</guid><dc:creator>Michel</dc:creator><description>&lt;p&gt;I noticed the missing TWI stop bit. That&amp;#39;s no problem indeed.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using the development boards (PCA10006 and 7). With a battery powered supply of 3.2 to 3.3V. The supply to the SAA is 5V.&lt;/p&gt;
&lt;p&gt;Looking at the datasheet of the SAA the SDA and SCL should be at least 3.0V which should not be an issue because the supply of the nRF is 3.2V.&lt;/p&gt;
&lt;p&gt;While writing this reply I don&amp;#39;t know what I changed, but it&amp;#39;s working now. I will take a closer look at the changes the last few hours.&lt;/p&gt;
&lt;p&gt;For now thanks for helping.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51422 communicating with SAA1064 via TWI/I2C</title><link>https://devzone.nordicsemi.com/thread/2424?ContentTypeID=1</link><pubDate>Wed, 18 Sep 2013 10:42:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:581a8105-921f-4f4b-b018-a310a2e3d249</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;I see that my code-snippet seems to be corrupted, but it seems that you have gotten the &amp;quot;essence&amp;quot; of what I was trying to show.&lt;/p&gt;
&lt;p&gt;I had a look at the datasheet for the display.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Have you checked that the VDD of the nRF-device is &amp;gt; 3.0V to ensure logic high on SDA? If you&amp;#39;re using the eval kit, it&amp;#39;s 3.3V and not configurable.&lt;/li&gt;
&lt;li&gt;Have you scoped the analog lines to see if the signal is clean?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;BR
Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51422 communicating with SAA1064 via TWI/I2C</title><link>https://devzone.nordicsemi.com/thread/2423?ContentTypeID=1</link><pubDate>Wed, 18 Sep 2013 10:23:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84b99ec6-aa45-49b7-a536-781136421945</guid><dc:creator>Michel</dc:creator><description>&lt;p&gt;Thanks for you reply.
The test mentioned above didn&amp;#39;t work. Only a ACK is received on the address of the MPU-9150. On the addresses where I expect the SAA I get a NACK even not after bitshifting the address.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51422 communicating with SAA1064 via TWI/I2C</title><link>https://devzone.nordicsemi.com/thread/2422?ContentTypeID=1</link><pubDate>Wed, 18 Sep 2013 05:46:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2a7fe56-14f8-40e2-b4f0-878c66036c06</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The address on the bus will be shifted &amp;gt;&amp;gt; 1 when it&amp;#39;s inputted to the NRF_TWIx-&amp;gt;ADDRESS register.
Have you tried sending (TWI_ADDRESS&amp;lt;&amp;lt;1)?&lt;/p&gt;
&lt;p&gt;Also, if you loop through, you can check the ERRORSRC to see if you &amp;quot;hit&amp;quot; the right address, will be something like this:&lt;/p&gt;
&lt;p&gt;for (uint8_t i = 0; i&amp;lt;=0xff; i++)
{
retval = twi_master_transfer(i, dummy, sizeof(dummy));
if (NRF_TWI1-&amp;gt;ERRORSRC)
// Clear error source reg by writing &amp;#39;1&amp;#39; to error bits
NRF_TWI1-&amp;gt;ERRORSRC = NRF_TWI1-&amp;gt;ERRORSRC;
else
// Set breakpoint here or similar
actual_address = i;
}&lt;/p&gt;
&lt;p&gt;Have you scoped the TWI-lines to see if there is any NACK/ACK on the bus?&lt;/p&gt;
&lt;p&gt;A side note regarding TWI/I2C:
The I2C name was trademarked until recently, but the actual bus-implementation was not protected. Therefore you could avoid paying fees by calling it a TWI-module.&lt;/p&gt;
&lt;p&gt;BR
Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>