<?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 and Writing I2C register</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/43092/reading-and-writing-i2c-register</link><description>I am using the nrf52840 TWI driver to manipulate an accelerometer (LIS2DE12). 
 How can the TWI API be used for reading and writing registers on a slave device? 
 Any examples will be appreciated!</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 29 Jan 2019 13:23:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/43092/reading-and-writing-i2c-register" /><item><title>RE: Reading and Writing I2C register</title><link>https://devzone.nordicsemi.com/thread/168463?ContentTypeID=1</link><pubDate>Tue, 29 Jan 2019 13:23:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84f19b66-de45-4a01-b5b7-b9397f53d5d4</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You can use TWI if the accelerometer supports this. There are a lot of questions on this forum regarding the LIS2DE12:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/search?q=LIS2DE12"&gt;https://devzone.nordicsemi.com/search?q=LIS2DE12&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You must read the datasheet to see what commands you need to send to the sensor. Unfortunately, I don&amp;#39;t have this sensor, so I can&amp;#39;t test it myself, but you should check out the other posts regarding this accelerometer on the forum.&lt;/p&gt;
&lt;p&gt;It is discussed amongst other threads here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/23104/accelerometer_result_error/90909#90909"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/23104/accelerometer_result_error/90909#90909&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>