<?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>topic Re: SPI MC68HC908GP32 in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SPI-MC68HC908GP32/m-p/141800#M6036</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;To provide a SPI link, the actions required by the master will generally be dictated by the requirements of the slave device.&amp;nbsp; In your case there is a little more flexibility, since the slave is a MCU.&amp;nbsp; The following&amp;nbsp;general&amp;nbsp;issues&amp;nbsp;will need to be considered&amp;nbsp;to devise&amp;nbsp;the link protocol.&amp;nbsp; These are the ones that immediately come to mind - there are probably others.&lt;/FONT&gt;&lt;/DIV&gt;&lt;OL&gt;&lt;LI&gt;&lt;FONT size="2"&gt;Does the master need to interrogate different sorts of data from the slave, or does the slave return only one type of data?&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;If the data may consist of a variable number of bytes, how does the master know when the slave has reached the end of its current return data?&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;Since the slave cannot initiate a SPI transmission, how does the master know when the slave has data ready for sending?&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;After receipt of each byte from the master, how much time is required for the slave device to prepare the next data byte to be returned?&amp;nbsp; This time will include the processing of any interrupts that may conceivably occur.&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;One possibility for solving some of these issues is for the slave device to provide an additional control signal back to the master.&amp;nbsp; (This is in addition to the SS signal from master to slave.)&amp;nbsp; This handshake signal would let the slave notify the master that it has data to send, and could also be used to indicate when each return byte was ready.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;In all probability, the SPI master would &lt;U&gt;not&lt;/U&gt; utilize SPI interrupt, whereas it is most likely the slave will require use of this interrupt in most instances.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Yet another possibility is to use a multi-master arrangement.&amp;nbsp; Both ends of the link would remain in slave mode until there was data to be transferred.&amp;nbsp; The originating end would then switch to master mode during the transfer.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;The best solution will depend mostly on the nature of the data you require to transfer.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Aug 2007 11:50:29 GMT</pubDate>
    <dc:creator>bigmac</dc:creator>
    <dc:date>2007-08-03T11:50:29Z</dc:date>
    <item>
      <title>SPI MC68HC908GP32</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SPI-MC68HC908GP32/m-p/141797#M6033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;I have 2 gp32's on a board, one a master SPI and one a slave SPI. Are there any examples for software (firmware) implementing a synchronous SPI link.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Added p/n to subject.&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Message Edited by NLFSJ on &lt;/SPAN&gt;&lt;SPAN class="date_text"&gt;2007-07-31&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;06:53 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 05:28:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SPI-MC68HC908GP32/m-p/141797#M6033</guid>
      <dc:creator>eli</dc:creator>
      <dc:date>2007-08-01T05:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: SPI MC68HC908GP32</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SPI-MC68HC908GP32/m-p/141798#M6034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Here is an example of how I did the master end of things while connected to a SPI flash device.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The set up of the SPI was done using Procesor Expert.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Although this was using an S08 device, it should be very similar.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Hope it helps.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;BadDad&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2007 20:01:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SPI-MC68HC908GP32/m-p/141798#M6034</guid>
      <dc:creator>baddad</dc:creator>
      <dc:date>2007-08-02T20:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: SPI MC68HC908GP32</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SPI-MC68HC908GP32/m-p/141799#M6035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi Eli,&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;Are you looking for assembly language code or C code?&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2007 05:18:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SPI-MC68HC908GP32/m-p/141799#M6035</guid>
      <dc:creator>rocco</dc:creator>
      <dc:date>2007-08-03T05:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: SPI MC68HC908GP32</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SPI-MC68HC908GP32/m-p/141800#M6036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;To provide a SPI link, the actions required by the master will generally be dictated by the requirements of the slave device.&amp;nbsp; In your case there is a little more flexibility, since the slave is a MCU.&amp;nbsp; The following&amp;nbsp;general&amp;nbsp;issues&amp;nbsp;will need to be considered&amp;nbsp;to devise&amp;nbsp;the link protocol.&amp;nbsp; These are the ones that immediately come to mind - there are probably others.&lt;/FONT&gt;&lt;/DIV&gt;&lt;OL&gt;&lt;LI&gt;&lt;FONT size="2"&gt;Does the master need to interrogate different sorts of data from the slave, or does the slave return only one type of data?&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;If the data may consist of a variable number of bytes, how does the master know when the slave has reached the end of its current return data?&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;Since the slave cannot initiate a SPI transmission, how does the master know when the slave has data ready for sending?&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;After receipt of each byte from the master, how much time is required for the slave device to prepare the next data byte to be returned?&amp;nbsp; This time will include the processing of any interrupts that may conceivably occur.&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;One possibility for solving some of these issues is for the slave device to provide an additional control signal back to the master.&amp;nbsp; (This is in addition to the SS signal from master to slave.)&amp;nbsp; This handshake signal would let the slave notify the master that it has data to send, and could also be used to indicate when each return byte was ready.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;In all probability, the SPI master would &lt;U&gt;not&lt;/U&gt; utilize SPI interrupt, whereas it is most likely the slave will require use of this interrupt in most instances.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Yet another possibility is to use a multi-master arrangement.&amp;nbsp; Both ends of the link would remain in slave mode until there was data to be transferred.&amp;nbsp; The originating end would then switch to master mode during the transfer.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;The best solution will depend mostly on the nature of the data you require to transfer.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2007 11:50:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SPI-MC68HC908GP32/m-p/141800#M6036</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-08-03T11:50:29Z</dc:date>
    </item>
  </channel>
</rss>

