<?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 s08pa16 not working in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-s08pa16-not-working/m-p/318913#M20854</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Avdit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you are able to get some characters on the terminal, this indicates your connections are good. It might be the issue of baud rate setting.&lt;/P&gt;&lt;P&gt;Try to use the baud rate which will give the integer value for BDL. For example, if Baud Rate = 10K, BDL will be 50. &lt;/P&gt;&lt;P&gt;This might avoid the garbage value.&lt;/P&gt;&lt;P&gt;Also if you want to use 28.8K, try writing 0x11 in BDL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this post helps you, kindly mark it as correct/helpful answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Arpita&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Jul 2014 10:58:11 GMT</pubDate>
    <dc:creator>arpitaagarwal-b</dc:creator>
    <dc:date>2014-07-14T10:58:11Z</dc:date>
    <item>
      <title>SCI s08pa16 not working</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-s08pa16-not-working/m-p/318912#M20853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif;"&gt;I am&amp;nbsp; trying to work with SCI on the MCU mc9s08pa16 (32 Pins) and seem to set the right baud rate of 28.8k for a 8MHz clock and I think my initialisation is also correct but the output seems like garbage values. If I send 'A' 0x41 and 'B' 0x42, I observe 1F 0F on the terminal. I checked my hardware and it seemed to be working correctly.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px; color: #222222; font-family: arial, sans-serif;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px; color: #222222; font-family: arial, sans-serif;"&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;void Init_SCI(void) // using TxD1 RxD1&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;SCI1_BDH = 0x00;&lt;/P&gt;&lt;P&gt;SCI1_BDL = 0x12; //Sets the baud rate at 28.8K bps for a bus clock speed of 8MHz ,decimal =17.36 ** I have tried pre scalars from 0x09 to0x16&lt;/P&gt;&lt;P&gt;SCI1_C1 = 0x03; //Sets 8 bit communication, with parity enabled and odd parity&lt;/P&gt;&lt;P&gt;SCI1_C2 = 0x00; //Not really required for our use, but none the less explicitly set&lt;/P&gt;&lt;P&gt;SCI1_C3 = 0x10; //Transmit output inverted hence TXINV set,to take care of the level shifter transistor in between&lt;/P&gt;&lt;P&gt;SCI1_C2_TE = 0b1; //Enable transmitter&lt;/P&gt;&lt;P&gt;SCI1_C2_RE = 0b1; //Enable receiver&lt;/P&gt;&lt;P&gt;SCI1_C3_TXINV = 0b1; //Invert transmit characters&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/DIV&gt;&lt;P style="min-height: 8pt; padding: 0px; color: #222222; font-family: arial, sans-serif;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px; color: #222222; font-family: arial, sans-serif;"&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;void transmit_data(byte tx_data) //Tested fine with baud rate 28.8K, 7 data bits, 1 stop bit and odd parity&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;if(SCI1_C2_TE != 0b1) {SCI1_C2_TE = 0b1;} //Enable transmitter&lt;/P&gt;&lt;P&gt;while (SCI1_S1_TDRE != 0b1);&lt;/P&gt;&lt;P&gt;SCI1_D = tx_data;&lt;/P&gt;&lt;P&gt;}&amp;nbsp; //Sends one byte of data = tx_data to the PC&lt;/P&gt;&lt;/DIV&gt;&lt;P style="min-height: 8pt; padding: 0px; color: #222222; font-family: arial, sans-serif;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif;"&gt;Thanks,&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif;"&gt;Avdit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2014 07:55:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-s08pa16-not-working/m-p/318912#M20853</guid>
      <dc:creator>avditkohli</dc:creator>
      <dc:date>2014-07-11T07:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: SCI s08pa16 not working</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-s08pa16-not-working/m-p/318913#M20854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Avdit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you are able to get some characters on the terminal, this indicates your connections are good. It might be the issue of baud rate setting.&lt;/P&gt;&lt;P&gt;Try to use the baud rate which will give the integer value for BDL. For example, if Baud Rate = 10K, BDL will be 50. &lt;/P&gt;&lt;P&gt;This might avoid the garbage value.&lt;/P&gt;&lt;P&gt;Also if you want to use 28.8K, try writing 0x11 in BDL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this post helps you, kindly mark it as correct/helpful answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Arpita&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jul 2014 10:58:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-s08pa16-not-working/m-p/318913#M20854</guid>
      <dc:creator>arpitaagarwal-b</dc:creator>
      <dc:date>2014-07-14T10:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: SCI s08pa16 not working</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-s08pa16-not-working/m-p/318914#M20855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried baud rates from 0x07 to 0x15 but none worked. Do you think I need&lt;/P&gt;&lt;P&gt;to initialize the SCI0 registers to 0 since I am using SCI1 channel?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avdit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Mon, Jul 14, 2014 at 4:29 PM, Arpita Agarwal &amp;lt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 07:10:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SCI-s08pa16-not-working/m-p/318914#M20855</guid>
      <dc:creator>avditkohli</dc:creator>
      <dc:date>2014-07-22T07:10:48Z</dc:date>
    </item>
  </channel>
</rss>

