<?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>SPI with adxl345</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11510/spi-with-adxl345</link><description>hello there i want to interface adxl345 with nrf51822 using SPI interface i am new to spi. i am using spi master with spi slave example. i want to write 0x08 in 0x32 register then
in function 
 spi_send_recv(m_tx_data, m_rx_data, TX_RX_BUF_LENGTH);</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 13 Mar 2016 15:10:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11510/spi-with-adxl345" /><item><title>RE: SPI with adxl345</title><link>https://devzone.nordicsemi.com/thread/43527?ContentTypeID=1</link><pubDate>Sun, 13 Mar 2016 15:10:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a32201b7-e33e-4e88-a829-3add111c3f52</guid><dc:creator>rushin</dc:creator><description>&lt;p&gt;hey. sorry i can&amp;#39;t understand this .&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  m_tx_data_spi = (0x80|address)|0x40;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;here if i put address 0x2D then  m_tx_data_spi = 0xED. can you explain more??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI with adxl345</title><link>https://devzone.nordicsemi.com/thread/43526?ContentTypeID=1</link><pubDate>Mon, 25 Jan 2016 14:43:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18c007e3-f5e4-450b-966d-03fa4454d8f3</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;(0x80|address) sets the Read/Write bit ( Bit 7 ) and if you are reading more than register(i.e. more than 1 byte ) you have to OR (0x80|address) with 0x40 to set the Multiple-byte bit ( Bit 6 ).  The first byte looks like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;   (MSB) | Read/Write (1bit) | Multiple-Byte( 1bit ) | Register Adress (6 bits) | (LSB)
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI with adxl345</title><link>https://devzone.nordicsemi.com/thread/43525?ContentTypeID=1</link><pubDate>Mon, 25 Jan 2016 14:37:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:852d1453-9841-4e3a-ac5f-96ea77b4aa8f</guid><dc:creator>rushin</dc:creator><description>&lt;p&gt;why addres is ored with 0x80 and 0x40??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI with adxl345</title><link>https://devzone.nordicsemi.com/thread/43524?ContentTypeID=1</link><pubDate>Mon, 25 Jan 2016 14:31:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d99e7370-6a4d-46aa-8d4a-8e7caa4d7a88</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;If you are reading to more than one register you have to set the Multiple-Byte bit in the first byte transfer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI with adxl345</title><link>https://devzone.nordicsemi.com/thread/43523?ContentTypeID=1</link><pubDate>Mon, 25 Jan 2016 14:19:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a41c2b45-92cb-4de7-bb73-07c6c67d2ef6</guid><dc:creator>rushin</dc:creator><description>&lt;p&gt;but explain me  why we are doing this??&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  if(bytes &amp;gt; 1)
    {
        m_tx_data_spi = (0x80|address)|0x40;
    }
    else
    {
        m_tx_data_spi = 0x80|address;
    }
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI with adxl345</title><link>https://devzone.nordicsemi.com/thread/43522?ContentTypeID=1</link><pubDate>Mon, 25 Jan 2016 14:18:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee57c2a5-9aca-4694-93d1-ca9c9b9aa2bb</guid><dc:creator>rushin</dc:creator><description>&lt;p&gt;hi thanks for its working&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI with adxl345</title><link>https://devzone.nordicsemi.com/thread/43521?ContentTypeID=1</link><pubDate>Mon, 25 Jan 2016 09:41:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f755d324-9ec4-4907-b644-c50c3fb51720</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Take a look at the SPI driver I made for the ADXL375.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Driver Files:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/3225.main.c"&gt;main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ADXL375_5F00_SPI.c"&gt;ADXL375_SPI.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ADXL375_5F00_SPI.h"&gt;ADXL375_SPI.h&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;-Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>