<?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: any ideas to debug SCI code in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/any-ideas-to-debug-SCI-code/m-p/140203#M3045</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hello Brian.&lt;BR /&gt;You need to confirm that your UART setup is correct:&lt;BR /&gt;1. The bit-rate is probably the most difficult/error-prone area. Make sure you know EXACTLY what bit-rate you've set.&lt;BR /&gt;2. The bit-rate 'deviation from ideal' is also important. The divisors you choose must put the bit-rate within about 2% of the standardized bit-rate (i.e. 9600 +/- 2% bps).&lt;BR /&gt;3. Make sure your data bits, parity and stop-bits settings are correct (must be identical to those of the pc you are trying to talk to).&lt;BR /&gt;&lt;BR /&gt;Your problem is likely to be somewhere in the above.&lt;BR /&gt;ron&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Jun 2006 21:10:14 GMT</pubDate>
    <dc:creator>glork</dc:creator>
    <dc:date>2006-06-20T21:10:14Z</dc:date>
    <item>
      <title>any ideas to debug SCI code</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/any-ideas-to-debug-SCI-code/m-p/140201#M3043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I have spent most of today getting a 9S12 variant to spit data out fo the serial port.&amp;nbsp; However, it seems that no matter hwat characters I program to go out of the port, I get other characters.&amp;nbsp; I have tried many different baud rates on the target side (MCU) and on the receiving host side (my PC).&lt;/DIV&gt;&lt;DIV&gt;I have gone through the debugger multiple times and I am satisfied that the functions are passing the correct data and supposedly handing the correct data to the SCI Data register.&amp;nbsp; Once I view it on my PC, it makes no sense.&amp;nbsp; So does anybody have any tried-and-true ways for debugging SCI communication problems?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Brian&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2006 06:29:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/any-ideas-to-debug-SCI-code/m-p/140201#M3043</guid>
      <dc:creator>bhandley</dc:creator>
      <dc:date>2006-06-20T06:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: any ideas to debug SCI code</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/any-ideas-to-debug-SCI-code/m-p/140202#M3044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;FONT size="2"&gt;Hello Brian,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;You mention that you have problems sending SCI data, but can you correctly receive any data?&amp;nbsp; Are you using a MAX232, or similar device to provide the interface to the PC?&amp;nbsp; Some MCUs have an option to invert the transmit data - I wonder if this is properly set up?&amp;nbsp; If the interface circuitry you are using inverts the data, the SCI setting should be non-inverted (normal).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I also assume that you have not unintentionally enabled 9-bit mode.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Regards,&lt;BR /&gt;Mac&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2006 09:00:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/any-ideas-to-debug-SCI-code/m-p/140202#M3044</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2006-06-20T09:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: any ideas to debug SCI code</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/any-ideas-to-debug-SCI-code/m-p/140203#M3045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hello Brian.&lt;BR /&gt;You need to confirm that your UART setup is correct:&lt;BR /&gt;1. The bit-rate is probably the most difficult/error-prone area. Make sure you know EXACTLY what bit-rate you've set.&lt;BR /&gt;2. The bit-rate 'deviation from ideal' is also important. The divisors you choose must put the bit-rate within about 2% of the standardized bit-rate (i.e. 9600 +/- 2% bps).&lt;BR /&gt;3. Make sure your data bits, parity and stop-bits settings are correct (must be identical to those of the pc you are trying to talk to).&lt;BR /&gt;&lt;BR /&gt;Your problem is likely to be somewhere in the above.&lt;BR /&gt;ron&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2006 21:10:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/any-ideas-to-debug-SCI-code/m-p/140203#M3045</guid>
      <dc:creator>glork</dc:creator>
      <dc:date>2006-06-20T21:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: any ideas to debug SCI code</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/any-ideas-to-debug-SCI-code/m-p/140204#M3046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;I swapped the wires on my serial to USB converter.&amp;nbsp; This gave me recognizable characters (at least correlating to what I expected).&amp;nbsp; After that I had to insert a significant delay loop after each character send.&amp;nbsp;&amp;nbsp;I guess the&amp;nbsp;processor was working faster than the serial port could output.&amp;nbsp; Thanks to all for your ideas.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2006 21:23:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/any-ideas-to-debug-SCI-code/m-p/140204#M3046</guid>
      <dc:creator>bhandley</dc:creator>
      <dc:date>2006-06-20T21:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: any ideas to debug SCI code</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/any-ideas-to-debug-SCI-code/m-p/140205#M3047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;FONT size="2"&gt;Hello,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;It appears you may not have been waiting for the transmit buffer to empty before sending the next character.&amp;nbsp; You need to test the associated TDRE flag, and wait until it becomes set, prior to sending the next character.&amp;nbsp; You do not mention the baud rate you are using, but I would assume it could be&amp;nbsp;relatively slow.&amp;nbsp; At 9600 bits per second each character will take slightly more than 1 millisecond to send.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Regards,&lt;BR /&gt;Mac&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Message Edited by bigmac on &lt;SPAN class="date_text"&gt;2006-06-21&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;01:52 AM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2006 22:45:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/any-ideas-to-debug-SCI-code/m-p/140205#M3047</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2006-06-20T22:45:55Z</dc:date>
    </item>
  </channel>
</rss>

