<?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: Send string using different SCI baud rate</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Send-string-using-different-SCI-baud-rate/m-p/161273#M9792</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;When doing tricks like this, there are a couple of things you need to keep in mind.&lt;BR /&gt;&lt;BR /&gt;Always be careful to wait for each character to be out and gone before you try to change the baud rate. That means TOTALLY out the pin, not just out of a holding register.&lt;BR /&gt;&lt;BR /&gt;Also, realize that at the receiving end, you might still need to meet the requirement of a 'stop bit' or weird things may appear to be happening.&lt;BR /&gt;&lt;BR /&gt;Message Edited by mke_et on &lt;SPAN class="date_text"&gt;2007-11-06&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;10:01 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Nov 2007 10:54:49 GMT</pubDate>
    <dc:creator>mke_et</dc:creator>
    <dc:date>2007-11-07T10:54:49Z</dc:date>
    <item>
      <title>Send string using different SCI baud rate</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Send-string-using-different-SCI-baud-rate/m-p/161272#M9791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;My task is very simple. I wish to send out&amp;nbsp; a string for&amp;nbsp;few sci baud rate (1200,2400, 4800, 9600, 119200).&amp;nbsp;The problem is that only the first baud rate(119200) will be send out correctly, for the other baud rate, i get junk character.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Here is my code:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 2;"&gt;FIND_ETH_BR&amp;nbsp;&amp;nbsp; CLR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCI1BDH&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MOV&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #%00100000,SCI1BDL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; baud rate&amp;nbsp;384000&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLRA&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCI1C1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;SCI Control Register 1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCI1C3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;SCI Control Register 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;FIND_ETH_BR1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LDA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCI1BDL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;;Change baud rate (divide by 2)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LDX&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCI1BDH&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LSLA&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ROLX&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STX&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCI1BDH&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCI1BDL&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CBEQX&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #$08,FIND_ETH_BRQ&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LDA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #%00101100&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;Enable RIE , TIE&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCI1C2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;SCI Control Register 2&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LDA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCI1S1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;Clear byte&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; JSR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Send_String&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BRA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FIND_ETH_BR1&lt;BR /&gt;FIND_ETH_BRQ&amp;nbsp; RTS &amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Is there anything wrong with my code??&lt;/DIV&gt;&lt;DIV&gt;Thanks.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Rgds,&lt;/DIV&gt;&lt;DIV&gt;Gan&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2007 09:58:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Send-string-using-different-SCI-baud-rate/m-p/161272#M9791</guid>
      <dc:creator>gambler</dc:creator>
      <dc:date>2007-11-07T09:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: Send string using different SCI baud rate</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Send-string-using-different-SCI-baud-rate/m-p/161273#M9792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;When doing tricks like this, there are a couple of things you need to keep in mind.&lt;BR /&gt;&lt;BR /&gt;Always be careful to wait for each character to be out and gone before you try to change the baud rate. That means TOTALLY out the pin, not just out of a holding register.&lt;BR /&gt;&lt;BR /&gt;Also, realize that at the receiving end, you might still need to meet the requirement of a 'stop bit' or weird things may appear to be happening.&lt;BR /&gt;&lt;BR /&gt;Message Edited by mke_et on &lt;SPAN class="date_text"&gt;2007-11-06&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;10:01 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2007 10:54:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Send-string-using-different-SCI-baud-rate/m-p/161273#M9792</guid>
      <dc:creator>mke_et</dc:creator>
      <dc:date>2007-11-07T10:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: Send string using different SCI baud rate</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Send-string-using-different-SCI-baud-rate/m-p/161274#M9793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I haven't checked your code (you didn't mention which pocessor you are using, so it is impossible to check), but one thing did come in my mind; Is your receiver&amp;nbsp;fast enough to switch baudrates in&amp;nbsp;it's end? It will happen very fast in the transmitter end, and there will be actually no time for the receiver to switch baudrate and start waiting for start bits. Perhaps you should, in addition to of course wait till the last character really is shifted out, also let the transmitter idle for the time of a few characters after switching baudrates, so that the receiver will have time to do it's stuff.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2007 23:00:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Send-string-using-different-SCI-baud-rate/m-p/161274#M9793</guid>
      <dc:creator>Sten</dc:creator>
      <dc:date>2007-11-07T23:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Send string using different SCI baud rate</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Send-string-using-different-SCI-baud-rate/m-p/161275#M9794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi there,&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;Sorry for the incomplete information. I was using s08AW32. In the receiver end, i'm using pc terminal software. So, it should be fast enough. I will try to add some delay on my code and see how's it going.&lt;BR /&gt;&lt;BR /&gt;Thanks a lot....&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2007 01:16:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Send-string-using-different-SCI-baud-rate/m-p/161275#M9794</guid>
      <dc:creator>gambler</dc:creator>
      <dc:date>2007-11-08T01:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Send string using different SCI baud rate</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Send-string-using-different-SCI-baud-rate/m-p/161276#M9795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi Gambler,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;How does the PC end know when and what to switch its baudrate to?&lt;/DIV&gt;&lt;DIV&gt;Different baudrates (especially *2 &amp;amp; /2) easily mimic some other byte at the wrong rate.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2007 03:13:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Send-string-using-different-SCI-baud-rate/m-p/161276#M9795</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2007-11-08T03:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Send string using different SCI baud rate</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Send-string-using-different-SCI-baud-rate/m-p/161277#M9796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I wouldn't be surprised if this was a 'speed select' routine. The kind where the 'box' transmits messages like 'if you can read this, hit enter' and when you see the message in clear text on your terminal, your hitting enter tells the box to use that baud rate.&lt;BR /&gt;&lt;BR /&gt;Or... He's trying to do something like an OBDII interface that requires some wierd baud changes on init...&lt;BR /&gt;&lt;BR /&gt;The question really becomes is this something new the guy is trying to do, or is he trying to figure out how to do something that is already established and he can't link to it.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2007 20:51:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Send-string-using-different-SCI-baud-rate/m-p/161277#M9796</guid>
      <dc:creator>mke_et</dc:creator>
      <dc:date>2007-11-08T20:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: Send string using different SCI baud rate</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Send-string-using-different-SCI-baud-rate/m-p/161278#M9797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Yes, I figured it might be something like this.&lt;/DIV&gt;&lt;DIV&gt;I have never done it (used many) but I would have thought that one requirement would be to leave the line idle for a couple of byte times of the slowest baudrate in between rate changes.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2007 05:51:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Send-string-using-different-SCI-baud-rate/m-p/161278#M9797</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2007-11-09T05:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Send string using different SCI baud rate</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Send-string-using-different-SCI-baud-rate/m-p/161279#M9798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Yes, i am writting something similar to 'speed select' routine. Thanks to you guys, i have solve my problem. I let the line idle for few character before i change baud rate and it works.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks!!&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2007 09:37:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Send-string-using-different-SCI-baud-rate/m-p/161279#M9798</guid>
      <dc:creator>gambler</dc:creator>
      <dc:date>2007-11-09T09:37:22Z</dc:date>
    </item>
  </channel>
</rss>

