<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>LPCXpresso IDE中的主题 Re: LPC1114  SPI Question</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1114-SPI-Question/m-p/565350#M17954</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Sun Sep 18 04:49:32 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: KTownsend&lt;/STRONG&gt;&lt;BR /&gt;... when you want to read a byte, you just 'send' a dummy byte like 0xFF on MOSI and read whatever is coming in on MISO.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In Master mode :)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In Slave mode your slave is waiting until the master is speaking :eek:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Slaves are not allowed to talk before they are asked :)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 22:21:28 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T22:21:28Z</dc:date>
    <item>
      <title>LPC1114  SPI Question</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1114-SPI-Question/m-p/565344#M17948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by shaguarhan on Fri Aug 12 15:07:19 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello every one,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using LPC1114 to program on a Flash.At beginning of the work i have seen the document about how the SPI works.Then I understood all of them.According to the document(the example of SSP) I have programmed,but there is no CLK signal.My hardware is very easy and correctly,and now I only need to generate a CLK for SPI.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; I have found many textes in Internet about how to initiate SPI.But I dont know which one is correct.In the example there are a lot of situations,for example loopbacktest and so on.Who can give me a easy example ?how can I iniate SPI0 and how to write the IO Config.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I think the document is not for LPC1114.......&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for your help :)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:21:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1114-SPI-Question/m-p/565344#M17948</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1114  SPI Question</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1114-SPI-Question/m-p/565345#M17949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Sat Aug 13 07:24:52 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: shaguarhan&lt;/STRONG&gt;&lt;BR /&gt;I have programmed,but there is no CLK signal. :confused:&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you aware that SPI means shifting bits from MOSI to SPI slave and back to MISO ? So there's no clock if SPI isn't shifting (=reading or writing) :eek:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This simple semihosting&amp;nbsp; sample is just writing a byte. If you connect MOSI and MISO, it's reading back this value :)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH]531[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:21:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1114-SPI-Question/m-p/565345#M17949</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1114  SPI Question</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1114-SPI-Question/m-p/565346#M17950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by quocthang on Sat Aug 13 08:01:48 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;please help me about spi&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i don't known&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:21:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1114-SPI-Question/m-p/565346#M17950</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1114  SPI Question</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1114-SPI-Question/m-p/565347#M17951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by NXP_USA on Fri Aug 19 15:29:43 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please refer to the sample code posted online....it has SSP example.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://ics.nxp.com/support/documents/microcontrollers/zip/code.bundle.lpc11xx.keil.zip&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:21:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1114-SPI-Question/m-p/565347#M17951</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1114  SPI Question</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1114-SPI-Question/m-p/565348#M17952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by dirtyBits on Sun Sep 18 01:07:46 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Zero&lt;/STRONG&gt;&lt;BR /&gt;Are you aware that SPI means shifting bits from MOSI to SPI slave and back to MISO ? So there's no clock if SPI isn't shifting (=reading or writing) :eek:&lt;BR /&gt;&lt;BR /&gt;This simple semihosting&amp;nbsp; sample is just writing a byte. If you connect MOSI and MISO, it's reading back this value :)&lt;BR /&gt;&lt;BR /&gt;[ATTACH]531[/ATTACH]&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=3]zero how about code for receiving a byte of data?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Just nee a simple very basic example code for SSP![/SIZE]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:21:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1114-SPI-Question/m-p/565348#M17952</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1114  SPI Question</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1114-SPI-Question/m-p/565349#M17953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by ktownsend on Sun Sep 18 04:35:32 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Send and receive are exactly the same with SPI ... there is always a byte (etc.) being transferred in both directions every time ... when you want to read a byte, you just 'send' a dummy byte like 0xFF on MOSI and read whatever is coming in on MISO.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You'll need to change these register names and look up the bits in the appropriate section of the UM, but it's probably a good exercise anyway to understand what these register and bit values mean anyway ... but you can see the principle here.&amp;nbsp; This functions handles both read and write attempts via SSP/SPI:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;/**************************************************************************/
/*!
&amp;nbsp;&amp;nbsp;&amp;nbsp; This function both reads and writes data. For write operations, include data
&amp;nbsp;&amp;nbsp;&amp;nbsp; to be written as argument. For read ops, use dummy data as arg. Returned
&amp;nbsp;&amp;nbsp;&amp;nbsp; data is read byte val.
*/
/**************************************************************************/
uint8_t w25q16bv_TransferByte(uint8_t data)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Move on only if NOT busy and TX FIFO not full */
&amp;nbsp;&amp;nbsp;&amp;nbsp; while ((SSP_SSP0SR &amp;amp; (SSP_SSP0SR_TNF_MASK | SSP_SSP0SR_BSY_MASK)) != SSP_SSP0SR_TNF_NOTFULL);
&amp;nbsp;&amp;nbsp;&amp;nbsp; SSP_SSP0DR = data;
&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Wait until the busy bit is cleared and receive buffer is not empty */
&amp;nbsp;&amp;nbsp;&amp;nbsp; while ((SSP_SSP0SR &amp;amp; (SSP_SSP0SR_BSY_MASK | SSP_SSP0SR_RNE_MASK)) != SSP_SSP0SR_RNE_NOTEMPTY);
&amp;nbsp;&amp;nbsp;&amp;nbsp; // Read the queue
&amp;nbsp;&amp;nbsp;&amp;nbsp; return SSP_SSP0DR;
}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:21:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1114-SPI-Question/m-p/565349#M17953</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1114  SPI Question</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1114-SPI-Question/m-p/565350#M17954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Sun Sep 18 04:49:32 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: KTownsend&lt;/STRONG&gt;&lt;BR /&gt;... when you want to read a byte, you just 'send' a dummy byte like 0xFF on MOSI and read whatever is coming in on MISO.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In Master mode :)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In Slave mode your slave is waiting until the master is speaking :eek:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Slaves are not allowed to talk before they are asked :)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:21:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1114-SPI-Question/m-p/565350#M17954</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1114  SPI Question</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1114-SPI-Question/m-p/565351#M17955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by NXP_Europe on Wed Sep 21 00:38:45 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi shaguarhan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The sample code of SSP available in LPC1100 examples is definitely for LPC1114 Xpresso board and to run the code you need two LPCXpresso boards one configure as MASTER and other as SLAVE. It is better to run and understand this code on LPCXpresso boards first and get some basic understanding of SPI then use this knowledge in your own application.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind Regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:21:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC1114-SPI-Question/m-p/565351#M17955</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:21:29Z</dc:date>
    </item>
  </channel>
</rss>

