<?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>How to implement I2C</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/57345/how-to-implement-i2c</link><description>Hi, I&amp;#39;m looking for a simple example on how to implement I2C. I&amp;#39;ve built I2C on my various FPGA&amp;#39;s, implemented I2C on various AVR based chips from special function registers. However, I can&amp;#39;t seem to find any documentation on how to write to the nRF9160</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 06 Feb 2020 11:42:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/57345/how-to-implement-i2c" /><item><title>RE: How to implement I2C</title><link>https://devzone.nordicsemi.com/thread/233033?ContentTypeID=1</link><pubDate>Thu, 06 Feb 2020 11:42:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28d1de9e-d95b-4410-98d5-f8fb84889a9a</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;For&lt;span&gt;&amp;nbsp;the BH1749 example, you should use&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-nrf"&gt;nrf&lt;/a&gt;/&lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-nrf/tree/master/boards"&gt;boards&lt;/a&gt;/&lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-nrf/tree/master/boards/arm"&gt;arm&lt;/a&gt;/&lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-nrf/tree/master/boards/arm/nrf9160_pca20035"&gt;nrf9160_pca20035&lt;/a&gt;&amp;nbsp;as the Board Directory. Please see this &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/54954/nrf9160-thingy-with-zephyr"&gt;post&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To use I2C on nrf9160, you should use&amp;nbsp;&lt;span&gt;nrf9160_pca10090 as the&amp;nbsp;Board Name and&lt;/span&gt;&amp;nbsp;refer to Martin&amp;#39;s suggestion in&amp;nbsp;this&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/42091/how-do-i-program-the-nrf9160-to-communicate-with-a-peripheral-using-spi-i2c-other-serial-protocol-etc"&gt;post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement I2C</title><link>https://devzone.nordicsemi.com/thread/232698?ContentTypeID=1</link><pubDate>Wed, 05 Feb 2020 01:54:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0817426-2cf6-4b7f-8768-b71dc7ec71f1</guid><dc:creator>Quasar</dc:creator><description>&lt;p&gt;Thanks for responding. When I ran build for the example BH1749 I got the following error. My steps were to copy the whole BH1749 folder from the git repo, into my sensors folder (as it&amp;#39;s own folder), then I opened it file -&amp;gt; open nRF, and clicked build.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-from-2020_2D00_02_2D00_04-17_2D00_37_2D00_45.png" /&gt;&lt;br /&gt;&lt;br /&gt;Going through the other examples from other posts I tried the finished &amp;quot;working&amp;quot; example at the end of this post&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/45265/trouble-twi-i2c-stops-at-the-function-of-i2c_reg_read_byte-on-nrf9160-dk-why"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/45265/trouble-twi-i2c-stops-at-the-function-of-i2c_reg_read_byte-on-nrf9160-dk-why&lt;/a&gt;, but I got a different error.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-from-2020_2D00_02_2D00_04-14_2D00_21_2D00_37.png" /&gt;&lt;br /&gt;&lt;br /&gt;In both cases I used the respective .conf, .overlay, and CMakeLists file provided. I have gotten many other projects to load and flash on my nRF9160. So far all of the ones in basic have worked, the I2C scanner also has ran, but it doesn&amp;#39;t seem to get past the&amp;nbsp;i2c_dev = device_get_binding(I2C_DEV); line. It so far has always printed to the terminal &amp;quot;I2C: Device driver not found.&amp;quot;.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Again, thanks for the help :)&lt;br /&gt;I&amp;#39;m slowly figuring this out so I can start hooking up I2C sensors that aren&amp;#39;t included in the samples.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement I2C</title><link>https://devzone.nordicsemi.com/thread/232499?ContentTypeID=1</link><pubDate>Tue, 04 Feb 2020 09:46:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dbed9818-a729-405b-a391-8aa895bac567</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The only I2C sample we have at the moment is&amp;nbsp;the&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/sensor/bh1749/README.html#bh1749-ambient-light-sensor-ic"&gt;BH1749: Ambient Light Sensor IC&lt;/a&gt;&lt;span&gt;&amp;nbsp;(&lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-nrf/tree/master/samples/sensor/bh1749"&gt;https://github.com/NordicPlayground/fw-nrfconnect-nrf/tree/master/samples/sensor/bh1749&lt;/a&gt;) used on the Thingy:91.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/42091/how-do-i-program-the-nrf9160-to-communicate-with-a-peripheral-using-spi-i2c-other-serial-protocol-etc"&gt;post &lt;/a&gt;might help you.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amada&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>