<?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: UART 1 &amp; 2</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/UART-1-2/m-p/124671#M400</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;I also tried to use the following to wait for data :&lt;/P&gt;&lt;P&gt;while (SCI2S1_RDRF!=0) {&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;Again, the RDRF was never set to 1 so I didn't get out of the loop.&amp;nbsp; Yes, you are right, if I hook up GB 'A'&amp;nbsp; to the RS232 reader, it is tranmitting fine.&amp;nbsp; Then I hook it to GB 'B', reversing TX/RX to read the UART and I can't seem to read it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Jul 2006 23:11:06 GMT</pubDate>
    <dc:creator>billp</dc:creator>
    <dc:date>2006-07-21T23:11:06Z</dc:date>
    <item>
      <title>UART 1 &amp; 2</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/UART-1-2/m-p/124665#M394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I am using MC9S08GB with a MC1321xRM.&amp;nbsp; I have the units sending and receiving data using the radio.&amp;nbsp; After the data is received, I peel out some ot the data and send it on UART 2 to another unit.&amp;nbsp; I have check the data being sent on the UART 2 and it is good.&amp;nbsp; When I monitor the unit recieving the data on UART 2 all I get is 0, -1, -2.&amp;nbsp; Any examples or advice on why I can't read the data on UART 2.&amp;nbsp; Both devices are in Master Mode and the data sends great on the UART.&amp;nbsp; Both UART's are set at 38400 baud, 8, 1, no parity and I switch TX/RX for null modem.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2006 04:44:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/UART-1-2/m-p/124665#M394</guid>
      <dc:creator>billp</dc:creator>
      <dc:date>2006-07-21T04:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: UART 1 &amp; 2</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/UART-1-2/m-p/124666#M395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;What device is doing the recieving and what is the data supposed to look like?&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2006 05:28:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/UART-1-2/m-p/124666#M395</guid>
      <dc:creator>mjcoury</dc:creator>
      <dc:date>2006-07-21T05:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: UART 1 &amp; 2</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/UART-1-2/m-p/124667#M396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;The MC9S08GB is doing the sending and receiving on the UART 1 &amp;amp; 2. I use the SPI modules for the Radio. I have checked the data sending on the UART and it looks fine. I'm just sending about 7 bytes and trying to receive them. Can I put UART 2 in receive only mode and UART 1 in transmit only mode ? The data is kinda like the following:&lt;BR /&gt;&lt;BR /&gt;byte start = 0xAA;&lt;BR /&gt;byte tmpid = 1;&lt;BR /&gt;byte tmpptr = 10;&lt;BR /&gt;byte tag = 5;&lt;BR /&gt;byte tag2 = 11;&lt;BR /&gt;byte itemnum = 36;&lt;BR /&gt;byte itemptr = 20;&lt;BR /&gt;&lt;BR /&gt;When I transmit and hook up the rs232 listener I see:&lt;BR /&gt;-89 1 10 5 11 36 20&lt;BR /&gt;Then I hook the other CPU in and try to read the UART and send the data out the second UART and it looks like:&lt;BR /&gt;-1 -1 -1 -1 -1 -1&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2006 08:27:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/UART-1-2/m-p/124667#M396</guid>
      <dc:creator>billp</dc:creator>
      <dc:date>2006-07-21T08:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: UART 1 &amp; 2</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/UART-1-2/m-p/124668#M397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hi Bill,&lt;/P&gt;&lt;P&gt;I'm still a little confused as to what you are doing.&lt;/P&gt;&lt;P&gt;Presumably for analysis of the problem we can forget about the radios???&lt;/P&gt;&lt;P&gt;You have two GB's with their SCI ports connected together (crossed over). Yes?&lt;/P&gt;&lt;P&gt;If you tap into the serial connection you can see that "A" GB is sending the data correctly???&lt;/P&gt;&lt;P&gt;But it appears that "B" GB is not receiving this correctly. It just recieves -1's which presumably is FF???&lt;/P&gt;&lt;P&gt;Is this your problem?&lt;/P&gt;&lt;P&gt;Are you recieving the same amount of bytes that you send?&lt;/P&gt;&lt;P&gt;Have you tried different amount of bytes sent to confirm this?&lt;/P&gt;&lt;P&gt;If this is the case the problem would appear to be in your SCI recieve code.&lt;/P&gt;&lt;P&gt;Enough for now as I might be on the wrong track.&lt;/P&gt;&lt;P&gt;Regards David&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2006 17:39:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/UART-1-2/m-p/124668#M397</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2006-07-21T17:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: UART 1 &amp; 2</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/UART-1-2/m-p/124669#M398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Yes, that is my problem.&amp;nbsp; I initialized my UART with the following:&lt;/P&gt;&lt;P&gt;void UART1(void) {&lt;BR /&gt;&amp;nbsp; // Setting is for 38400 baud&lt;BR /&gt;&amp;nbsp; SCI1BDH = 0x00;&lt;BR /&gt;&amp;nbsp; SCI1BDL = BAUD_38400;&lt;BR /&gt;&amp;nbsp; SCI1C1 = 0x00;&lt;BR /&gt;&amp;nbsp; SCI1C2 = 0x18;&lt;BR /&gt;&amp;nbsp; SCI1C3 = 0x00;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;void UART2(void) {&lt;BR /&gt;&amp;nbsp; // Setting is for 38400 baud&lt;BR /&gt;&amp;nbsp; SCI2BDH = 0x00;&lt;BR /&gt;&amp;nbsp; SCI2BDL = BAUD_38400;&lt;BR /&gt;&amp;nbsp; SCI2C1 = 0x00;&lt;BR /&gt;&amp;nbsp; SCI2C2 = 0x18;&lt;BR /&gt;&amp;nbsp; SCI2C3 = 0x00;&lt;BR /&gt;}&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I want to poll for the input data.&amp;nbsp; I guess I really need an example of waiting for the data to be received, then getting the data and clearing the registers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2006 22:50:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/UART-1-2/m-p/124669#M398</guid>
      <dc:creator>billp</dc:creator>
      <dc:date>2006-07-21T22:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: UART 1 &amp; 2</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/UART-1-2/m-p/124670#M399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I tried to use the following code to wait for the data to be sent to UART 2:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; while (SCI2S2_RAF!=1) {&lt;BR /&gt;&amp;nbsp; };&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;but RAF never gets set...&amp;nbsp; So I never get out of the while loop.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2006 23:03:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/UART-1-2/m-p/124670#M399</guid>
      <dc:creator>billp</dc:creator>
      <dc:date>2006-07-21T23:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: UART 1 &amp; 2</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/UART-1-2/m-p/124671#M400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;I also tried to use the following to wait for data :&lt;/P&gt;&lt;P&gt;while (SCI2S1_RDRF!=0) {&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;Again, the RDRF was never set to 1 so I didn't get out of the loop.&amp;nbsp; Yes, you are right, if I hook up GB 'A'&amp;nbsp; to the RS232 reader, it is tranmitting fine.&amp;nbsp; Then I hook it to GB 'B', reversing TX/RX to read the UART and I can't seem to read it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2006 23:11:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/UART-1-2/m-p/124671#M400</guid>
      <dc:creator>billp</dc:creator>
      <dc:date>2006-07-21T23:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: UART 1 &amp; 2</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/UART-1-2/m-p/124672#M401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I got the while wrong, it's the following:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;while (SCI2S1_RDRF==0) {&lt;/DIV&gt;&lt;DIV&gt;};&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Also, I tried,&lt;/DIV&gt;&lt;DIV&gt;while (SCI2S1_RDRF!=1) {&lt;/DIV&gt;&lt;DIV&gt;};&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2006 23:13:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/UART-1-2/m-p/124672#M401</guid>
      <dc:creator>billp</dc:creator>
      <dc:date>2006-07-21T23:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: UART 1 &amp; 2</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/UART-1-2/m-p/124673#M402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;are you sure the baud rates are correct - - as baud rate settings are clock speed dependent?&lt;BR /&gt;&lt;BR /&gt;Jim P.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Jul 2006 04:31:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/UART-1-2/m-p/124673#M402</guid>
      <dc:creator>Jim_P</dc:creator>
      <dc:date>2006-07-22T04:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: UART 1 &amp; 2</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/UART-1-2/m-p/124674#M403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;I used the settings that I have listed above and to read the ports with my RS232 reader, it is set at 38400.&amp;nbsp; The application using the data is set at 38400 and it is displaying the data.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Jul 2006 04:34:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/UART-1-2/m-p/124674#M403</guid>
      <dc:creator>billp</dc:creator>
      <dc:date>2006-07-22T04:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: UART 1 &amp; 2</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/UART-1-2/m-p/124675#M404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;While we are talking about the clock...&lt;/P&gt;&lt;P&gt;Are you using the internal clock and if so is it trimmed?&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Jul 2006 05:41:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/UART-1-2/m-p/124675#M404</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2006-07-22T05:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: UART 1 &amp; 2</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/UART-1-2/m-p/124676#M405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Still confused, you are showing intialisation for UART 1 &amp;amp; 2 , surely we only need to worry about 1 SCI on each device?&lt;/P&gt;&lt;P&gt;Device A uses which one? and B?&lt;/P&gt;&lt;P&gt;Both initialisations only enable the transmitter and not the reciever!&lt;/P&gt;&lt;P&gt;to send data you usually monitor TDRE and to receive it, RDRF.&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Jul 2006 06:02:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/UART-1-2/m-p/124676#M405</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2006-07-22T06:02:51Z</dc:date>
    </item>
  </channel>
</rss>

