<?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>interface ds3234 with nrf51 dk using spi</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11173/interface-ds3234-with-nrf51-dk-using-spi</link><description>hello there i want to interface nrf51 dk with ds3234 using spi. i see spi master example. how to assign SPI I/O pins. can you tell me how to do it?? i find SPIMO_SCK_PIN. how to know about pin numbers??</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 Jan 2016 11:38:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11173/interface-ds3234-with-nrf51-dk-using-spi" /><item><title>RE: interface ds3234 with nrf51 dk using spi</title><link>https://devzone.nordicsemi.com/thread/41849?ContentTypeID=1</link><pubDate>Thu, 07 Jan 2016 11:38:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4093ed36-1bc3-4fa5-a324-4e68c51a7dbd</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The pin configuration for nRF51 peripherals is usually fetched from a configuration file specific for the development board that you are using. If you are using the the nRF51-DK (PCA10028) then the configuration is in file \nRF51_SDK_10.0.0_dc26b5e\examples\bsp\pca10028.h. In this file, the configuration for e.g. the SPI master 0 and SPI master 1 is defined as&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define SPIM0_SCK_PIN       4     /**&amp;lt; SPI clock GPIO pin number. */
#define SPIM0_MOSI_PIN      1     /**&amp;lt; SPI Master Out Slave In GPIO pin number. */
#define SPIM0_MISO_PIN      3     /**&amp;lt; SPI Master In Slave Out GPIO pin number. */
#define SPIM0_SS_PIN        2     /**&amp;lt; SPI Slave Select GPIO pin number. */

#define SPIM1_SCK_PIN       15     /**&amp;lt; SPI clock GPIO pin number. */
#define SPIM1_MOSI_PIN      12     /**&amp;lt; SPI Master Out Slave In GPIO pin number. */
#define SPIM1_MISO_PIN      14     /**&amp;lt; SPI Master In Slave Out GPIO pin number. */
#define SPIM1_SS_PIN        13     /**&amp;lt; SPI Slave Select GPIO pin number. */
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So change those defines in order to connect SPI master to different GPIO pins.&lt;/p&gt;
&lt;p&gt;Then in order to enable SPI0 master in e.g. the spi_master example, you must do that in the driver configuration file  \nRF51_SDK_10.0.0_dc26b5e\examples\peripheral\spi_master\config\spi_master_pca10028\nrf_drv_config.h by defining&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define SPI0_ENABLED 1
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>