<?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>8-bit MicrocontrollersのトピックRe: SPI don't work with Full Chip Simulation</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SPI-don-t-work-with-Full-Chip-Simulation/m-p/127375#M1405</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi Davide,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Mac is correct in that you can't see the data you write to SPI1D by looking at SPI1D. You can however see a simulated version of what was shifted out by using the SPDO command or under the HCS08FCS menu select SPI Module and then SPDO. You can also preload a buffer for simulating data coming in on the MISO pin by SPDI. You should look here to check your code.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Mar 2007 15:11:19 GMT</pubDate>
    <dc:creator>peg</dc:creator>
    <dc:date>2007-03-22T15:11:19Z</dc:date>
    <item>
      <title>SPI don't work with Full Chip Simulation</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SPI-don-t-work-with-Full-Chip-Simulation/m-p/127373#M1403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi to all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to use a MC9S08GT60. I'm using Full Chip Simulation to verified that all the function works fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've a data that I want send by SPI, but in Full Chip Simulation I can't write on the SPI1D register.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There is the code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;byte SPI_send(char data)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;while (!SPI1S_SPTEF); /* Wait for Tx buffer empty */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SPI1S; /* Read of SPI1S with SPTEF=1 */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SPI1D = data; /* Send byte */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;while (!SPI1S_SPRF); /* Wait for Rx buffer full */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;return (SPI1D); /* Received byte value */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I write data to SPI1D with "SPI1D = data" nothing happens!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The memory map don't change.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Where I fail?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regard,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Davide&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2007 07:07:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SPI-don-t-work-with-Full-Chip-Simulation/m-p/127373#M1403</guid>
      <dc:creator>area3</dc:creator>
      <dc:date>2007-03-22T07:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: SPI don't work with Full Chip Simulation</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SPI-don-t-work-with-Full-Chip-Simulation/m-p/127374#M1404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello Davide,&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 SPI1D register will always read a different value than it writes because you are writing&amp;nbsp;the value to be sent, but are reading the byte value returned by the SPI slave.&amp;nbsp; In simulation mode, I wouldn't expect the "returned" value&amp;nbsp;&amp;nbsp;to alter since the slave end doesn't actually exist.&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;A comment about your SPI_send() code, the second line -&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;SPI1S; /* Read of SPI1S with SPTEF=1 */&lt;BR /&gt;&lt;FONT face="Arial"&gt;This is confusing and unnecessary.&amp;nbsp; The first line that tests the SPTEF bit already reads SPI1S.&lt;/FONT&gt;&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;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2007 08:46:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SPI-don-t-work-with-Full-Chip-Simulation/m-p/127374#M1404</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-03-22T08:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: SPI don't work with Full Chip Simulation</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SPI-don-t-work-with-Full-Chip-Simulation/m-p/127375#M1405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi Davide,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Mac is correct in that you can't see the data you write to SPI1D by looking at SPI1D. You can however see a simulated version of what was shifted out by using the SPDO command or under the HCS08FCS menu select SPI Module and then SPDO. You can also preload a buffer for simulating data coming in on the MISO pin by SPDI. You should look here to check your code.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2007 15:11:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SPI-don-t-work-with-Full-Chip-Simulation/m-p/127375#M1405</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2007-03-22T15:11:19Z</dc:date>
    </item>
  </channel>
</rss>

