<?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のトピックSCI problem</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-problem/m-p/217703#M18955</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a problem with the SCI comunication with two MC9S08GT32, my code for 9600 baud N 8 1.&amp;nbsp; is:&lt;BR /&gt;&lt;BR /&gt;Init_SCI1:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp; #$00,SCI1BDH&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp; #$80,SCI1BDL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp; #$64,SCI1C1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp; #$0C,SCI1C2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp; #$00,SCI1S2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp; #$20,SCI1C3&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I work with an internal oscillator and the internal bus clock is 19.995429MHz, the CPU clk is 39.99MHz for the two micro.&lt;BR /&gt;I look with the scope the output signal and apparently are correct,the micro recive read the data but some times are correct, other times are wrong.I think that my problem is the work frequency, I generate a signal with a nop instruction, in one micro ton=340ns toff=230ns, in the other ton=450ns and toff=300ns, the time are identical with/without the&lt;BR /&gt;emulator.&lt;BR /&gt;For this test the pin of two micro are connected with an 100R resistor and the signal are very good.&lt;BR /&gt;Can you help me?&lt;BR /&gt;&lt;BR /&gt;thanks&amp;nbsp;&amp;nbsp; Fabio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Aug 2010 11:06:02 GMT</pubDate>
    <dc:creator>fuma</dc:creator>
    <dc:date>2010-08-11T11:06:02Z</dc:date>
    <item>
      <title>SCI problem</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-problem/m-p/217703#M18955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a problem with the SCI comunication with two MC9S08GT32, my code for 9600 baud N 8 1.&amp;nbsp; is:&lt;BR /&gt;&lt;BR /&gt;Init_SCI1:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp; #$00,SCI1BDH&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp; #$80,SCI1BDL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp; #$64,SCI1C1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp; #$0C,SCI1C2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp; #$00,SCI1S2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp; #$20,SCI1C3&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I work with an internal oscillator and the internal bus clock is 19.995429MHz, the CPU clk is 39.99MHz for the two micro.&lt;BR /&gt;I look with the scope the output signal and apparently are correct,the micro recive read the data but some times are correct, other times are wrong.I think that my problem is the work frequency, I generate a signal with a nop instruction, in one micro ton=340ns toff=230ns, in the other ton=450ns and toff=300ns, the time are identical with/without the&lt;BR /&gt;emulator.&lt;BR /&gt;For this test the pin of two micro are connected with an 100R resistor and the signal are very good.&lt;BR /&gt;Can you help me?&lt;BR /&gt;&lt;BR /&gt;thanks&amp;nbsp;&amp;nbsp; Fabio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Aug 2010 11:06:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-problem/m-p/217703#M18955</guid>
      <dc:creator>fuma</dc:creator>
      <dc:date>2010-08-11T11:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: SCI problem</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-problem/m-p/217704#M18956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Fabio!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR Value&amp;nbsp;should be 130 in decimal for&amp;nbsp;~20Mhz. Then you will have 9613 baud&amp;nbsp;in real. That should be close enought.&lt;/P&gt;&lt;P&gt;With factor hex 82 you will have 9763 baud and this seems not close enought.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that &amp;nbsp;if you write in your code&amp;nbsp;mov&amp;nbsp;&amp;nbsp; #$0C,SCI1C2&amp;nbsp;than both receiver and transmitter are off. But I am&amp;nbsp;sure that this depends on your application.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;use mov&amp;nbsp;&amp;nbsp; #$82,SCI1BDL and it should work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ingo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Aug 2010 11:57:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-problem/m-p/217704#M18956</guid>
      <dc:creator>i_kauf</dc:creator>
      <dc:date>2010-08-11T11:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: SCI problem</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-problem/m-p/217705#M18957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Fabio,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I run 9600 baud on a GT16A with the same clock, here is my SCI Init:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*************** SET UP SERIAL COMMS *****************************************&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;CLR&amp;nbsp;&amp;nbsp; &amp;nbsp;SCI1BDH&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;MOV&amp;nbsp;&amp;nbsp; &amp;nbsp;#(mSBR7|mSBR1),SCI1BDL&amp;nbsp;&amp;nbsp; &amp;nbsp;;set baudrate to 9613 baud&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;MOV&amp;nbsp;&amp;nbsp; &amp;nbsp;#mILT,SCI1C1&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;;set idle line type select to after stop bit&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;MOV&amp;nbsp;&amp;nbsp; &amp;nbsp;#(mRIE|mTE|mRE),SCI1C2&amp;nbsp;&amp;nbsp; &amp;nbsp;;enable reciever interrupts, Tx and Rx enable&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Also you need to have the internal clock trimmed to ensure correct baudrate.&lt;/P&gt;&lt;P&gt;Don't have time, didn't go through what you have, just sent you what works here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Aug 2010 15:41:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-problem/m-p/217705#M18957</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2010-08-11T15:41:25Z</dc:date>
    </item>
  </channel>
</rss>

