<?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: SCI Send Problem with MC9S08AW16CFGE in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-Send-Problem-with-MC9S08AW16CFGE/m-p/203676#M16867</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You probably want an ICGC1 of 0x30 actually. And another read of that datasheet!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 31 Jul 2009 06:35:46 GMT</pubDate>
    <dc:creator>peg</dc:creator>
    <dc:date>2009-07-31T06:35:46Z</dc:date>
    <item>
      <title>SCI Send Problem with MC9S08AW16CFGE</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-Send-Problem-with-MC9S08AW16CFGE/m-p/203668#M16859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all.&lt;/P&gt;&lt;P&gt;I am using the 08AW16 for a little Keyboard&amp;nbsp; with 24 Keys.&lt;/P&gt;&lt;P&gt;On each key pres and release i send an char..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my pcb is selfmade and done with our milling machine..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my problem is that the µC send all chars with 0x80 or'ed on it ?!&lt;/P&gt;&lt;P&gt;i send 0x01 and on my pc i saw 0x81 ..&lt;/P&gt;&lt;P&gt;i used the debugger and looked into the SCI1D and really saw the "0x01" !&lt;/P&gt;&lt;P&gt;the µC is clocked by a 8MHz Crystal oscilator..&lt;/P&gt;&lt;P&gt;the strange thing is that it runs on 1 hardware without any problems and on the next 2 i have this problem.. there are no short circuits or something else.. i have swapped the µC 2 times and then the problem wasn there, but comes again after 1-2 days ?!&lt;/P&gt;&lt;P&gt;i cant explain what is wrong cause first keyboard works very fine!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my next step would be to measure with my scope ..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.. but perhaps someone can help me?! &lt;A href="http://freescale.i.lithium.com/i/smilies/16x16_smiley-happy.gif" rel="nofollow noopener noreferrer" target="_blank"&gt;&lt;IMG alt=":smileyhappy:" class="emoticon emoticon-smileyhappy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-happy.gif" title="Smiley Happy" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;thanks so far!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here my SCI init and send routine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
void sci_Init(void){

&amp;nbsp; SCI1BDH = 0x00; // 9600 Baud
&amp;nbsp; SCI1BDL = 0x1A; // 9600 Baud
&amp;nbsp; SCI1C1&amp;nbsp; = 0x40; // 8 Bit, No Parity
&amp;nbsp; SCI1C2&amp;nbsp; = 0x08; // Tr On, Rec off, no interrupt
&amp;nbsp; //SCI1C2&amp;nbsp; = 0xC8; // Tr On, Rec off, with Tr interrupts
&amp;nbsp; SCI1C3&amp;nbsp; = 0x00;

}

void sci_Send_Byte(unsigned char data){
&amp;nbsp; while(!(((SCI1S1 &amp;amp; 0x40) == 0x40)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;&amp;amp; ((SCI1S1 &amp;amp; 0x80) == 0x80)));
&amp;nbsp; // .. wait till rdy to send ..

&amp;nbsp; SCI1D = data; // send data

}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2009 16:53:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-Send-Problem-with-MC9S08AW16CFGE/m-p/203668#M16859</guid>
      <dc:creator>monXii</dc:creator>
      <dc:date>2009-07-30T16:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: SCI Send Problem with MC9S08AW16CFGE</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-Send-Problem-with-MC9S08AW16CFGE/m-p/203669#M16860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello monXii,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What you are almost certainly seeing here is a baudrate mismatch. One end of your link is running slightly faster than the other. When the MSB is being detected it is actually seeing the stop bit and as long as the bytes are sent with a small gap a valid enough stop bit can be detected by what is left of the actual stop bit and the idle line thereafter.&lt;/P&gt;&lt;P&gt;Are you running on the internal oscillator?&lt;/P&gt;&lt;P&gt;Is it trimmed properly?&lt;/P&gt;&lt;P&gt;What is your calculated baudrate based on the division of your expected busclock?&lt;/P&gt;&lt;P&gt;Do you sometimes get framing errors? Are you looking for them?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2009 18:25:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-Send-Problem-with-MC9S08AW16CFGE/m-p/203669#M16860</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2009-07-30T18:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: SCI Send Problem with MC9S08AW16CFGE</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-Send-Problem-with-MC9S08AW16CFGE/m-p/203670#M16861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. no, i use an external oscillator (8MHz)&lt;/P&gt;&lt;P&gt;2. i dont setted anything up like that.. i am using&amp;nbsp; the reset values for clock settings&lt;/P&gt;&lt;P&gt;3. my calculated baudrate is 4MHz / (16 * 26) = 9615 Baud&lt;/P&gt;&lt;P&gt;4. no, i dont see any framing errors&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what can i do to solve the problem?&lt;/P&gt;&lt;P&gt;using another baudrate which has less tolerance?!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or how can i trimm the frequency?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for your fast answer!&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by monXii on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-07-30&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;01:14 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2009 19:14:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-Send-Problem-with-MC9S08AW16CFGE/m-p/203670#M16861</guid>
      <dc:creator>monXii</dc:creator>
      <dc:date>2009-07-30T19:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: SCI Send Problem with MC9S08AW16CFGE</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-Send-Problem-with-MC9S08AW16CFGE/m-p/203671#M16862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well if your running on an external oscillator your only trim is the next baudrate divisor. As a quick test you could try lowering the baudrate drastically. Time to get the oscilloscope out I think. Compare the same character transmitted from either end.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is the code on the PC end _looking_ for framing errors?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2009 19:30:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-Send-Problem-with-MC9S08AW16CFGE/m-p/203671#M16862</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2009-07-30T19:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: SCI Send Problem with MC9S08AW16CFGE</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-Send-Problem-with-MC9S08AW16CFGE/m-p/203672#M16863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;monXii wrote:&lt;BR /&gt;&lt;P&gt;1. no, i use an external oscillator (8MHz)&lt;/P&gt;&lt;P&gt;2. i dont setted anything up like that.. i am using&amp;nbsp; the reset values for clock settings&lt;/P&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;These two statements seem to be contradictory.&amp;nbsp; Unless you specifically setup the ICG module to utilize an external oscillator, the reset values will make use of the internal oscillator.&amp;nbsp; Note also that there is a difference in the setup requirements, depending on whether you have an external crystal (two pins) or a packaged oscillator (one pin).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2009 20:34:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-Send-Problem-with-MC9S08AW16CFGE/m-p/203672#M16863</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2009-07-30T20:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: SCI Send Problem with MC9S08AW16CFGE</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-Send-Problem-with-MC9S08AW16CFGE/m-p/203673#M16864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, i think so too.. Its time for the oscilloscope &lt;IMG alt=":smileyhappy:" class="emoticon emoticon-smileyhappy" id="smileyhappy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-happy.gif" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;I set the baudrate to 300 and the same ..&lt;/P&gt;&lt;P&gt;.. i tested some other values and its not only the MSB set ..&lt;/P&gt;&lt;P&gt;0x01 -&amp;gt; 0x81&lt;BR /&gt;0x02 -&amp;gt; 0x82&lt;BR /&gt;0x03 -&amp;gt; 0x83&lt;BR /&gt;0x04 -&amp;gt; 0x84&lt;BR /&gt;0x05 -&amp;gt; 0x85&lt;BR /&gt;0x06 -&amp;gt; 0x86&lt;BR /&gt;0x07 -&amp;gt; 0x87&lt;BR /&gt;0x08 -&amp;gt; 0x88&lt;BR /&gt;0x09 -&amp;gt; 0x89&lt;BR /&gt;0x0A -&amp;gt; 0x8A&lt;BR /&gt;0x0B -&amp;gt; 0x8B&lt;BR /&gt;0x0C -&amp;gt; 0x8C&lt;BR /&gt;0x0D -&amp;gt; 0x8D&lt;BR /&gt;0x0E -&amp;gt; 0x8E&lt;BR /&gt;0x0F -&amp;gt; 0x8F&lt;BR /&gt;&lt;BR /&gt;0x10 -&amp;gt; 0x90&lt;BR /&gt;0x20 -&amp;gt; 0x80&lt;BR /&gt;0x30 -&amp;gt; 0x90&lt;BR /&gt;0x40 -&amp;gt; 0xA0&lt;BR /&gt;0x50 -&amp;gt; 0xB0&lt;BR /&gt;0x60 -&amp;gt; 0xA0&lt;BR /&gt;0x70 -&amp;gt; 0xB0&lt;BR /&gt;0x80 -&amp;gt; 0xC0&lt;BR /&gt;0x90 -&amp;gt; 0xD0&lt;BR /&gt;0xA0 -&amp;gt; 0xC0&lt;BR /&gt;0xB0 -&amp;gt; 0xD0&lt;BR /&gt;0xC0 -&amp;gt; 0xE0&lt;BR /&gt;0xD0 -&amp;gt; 0xF0&lt;BR /&gt;0xE0 -&amp;gt; 0xE0&lt;BR /&gt;0xF0 -&amp;gt; 0xF0&lt;BR /&gt;&lt;BR /&gt;0x11 -&amp;gt; 0x91&lt;BR /&gt;0x22 -&amp;gt; 0x82&lt;BR /&gt;0x33 -&amp;gt; 0x93&lt;BR /&gt;0x44 -&amp;gt; 0xA4 (sometimes 84)&lt;BR /&gt;0x55 -&amp;gt; 0xB5&lt;BR /&gt;0x66 -&amp;gt; 0xA6&lt;BR /&gt;0x77 -&amp;gt; 0xB7&lt;BR /&gt;0x88 -&amp;gt; 0xC8&lt;BR /&gt;0x99 -&amp;gt; 0xD9&lt;BR /&gt;0xAA -&amp;gt; 0xCA&lt;BR /&gt;0xBB -&amp;gt; 0xDB&lt;BR /&gt;0xCC -&amp;gt; 0xEC&lt;BR /&gt;0xDD -&amp;gt; 0xFD&lt;BR /&gt;0xEE -&amp;gt; 0xEE&lt;BR /&gt;0xFF -&amp;gt; 0xFF&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i think Bit7 goes to Bit6 and Bit6 goes to Bit5.. Bit4-0 stays.. and then 0x80 is OR'ed &lt;IMG alt=":smileyhappy:" class="emoticon emoticon-smileyhappy" id="smileyhappy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-happy.gif" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;sounds crazy, but check it .. &lt;IMG alt=":smileyvery-happy:" class="emoticon emoticon-smileyvery-happy" id="smileyvery-happy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-very-happy.gif" title="Smiley Very Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but i'll measure now and report in a few minutes..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and yes, the PC is looking for framing errors.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2009 20:53:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-Send-Problem-with-MC9S08AW16CFGE/m-p/203673#M16864</guid>
      <dc:creator>monXii</dc:creator>
      <dc:date>2009-07-30T20:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: SCI Send Problem with MC9S08AW16CFGE</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-Send-Problem-with-MC9S08AW16CFGE/m-p/203674#M16865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;bigmac,&lt;/P&gt;&lt;P&gt;mh ok.. i'll check it!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;edit:&lt;/P&gt;&lt;P&gt;ICGC1 is now 0x60 ("High Frequency Range" and "external crystal oscillator")&amp;nbsp; ..&lt;/P&gt;&lt;P&gt;.. same effect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;now measuring ..&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by monXii on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-07-30&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;03:09 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2009 20:55:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-Send-Problem-with-MC9S08AW16CFGE/m-p/203674#M16865</guid>
      <dc:creator>monXii</dc:creator>
      <dc:date>2009-07-30T20:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: SCI Send Problem with MC9S08AW16CFGE</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-Send-Problem-with-MC9S08AW16CFGE/m-p/203675#M16866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have actually selected SCM mode, and this produces the least accurate clock rate.&amp;nbsp; To use an external crystal or resonator you will need to select either FBE or FEE mode.&amp;nbsp; The datasheet explains these modes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2009 21:41:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-Send-Problem-with-MC9S08AW16CFGE/m-p/203675#M16866</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2009-07-30T21:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: SCI Send Problem with MC9S08AW16CFGE</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-Send-Problem-with-MC9S08AW16CFGE/m-p/203676#M16867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You probably want an ICGC1 of 0x30 actually. And another read of that datasheet!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2009 06:35:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-Send-Problem-with-MC9S08AW16CFGE/m-p/203676#M16867</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2009-07-31T06:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: SCI Send Problem with MC9S08AW16CFGE</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-Send-Problem-with-MC9S08AW16CFGE/m-p/203677#M16868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey peg, bigmac ..&lt;/P&gt;&lt;P&gt;thanks for your very fast help! &lt;IMG alt=":smileyhappy:" class="emoticon emoticon-smileyhappy" id="smileyhappy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-happy.gif" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;i read the manual again and setted all up, but didnt work..&lt;/P&gt;&lt;P&gt;.. after an hour measuring and experimenting, i noticed that one via in the xtal track wasnt correctly soldered (self made pcb).. =/ &lt;IMG alt=":smileytongue:" class="emoticon emoticon-smileytongue" id="smileytongue" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-tongue.gif" title="Smiley Tongue" /&gt;&lt;/P&gt;&lt;P&gt;now it works very fine!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Sascha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2009 19:58:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-Send-Problem-with-MC9S08AW16CFGE/m-p/203677#M16868</guid>
      <dc:creator>monXii</dc:creator>
      <dc:date>2009-07-31T19:58:13Z</dc:date>
    </item>
  </channel>
</rss>

