<?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>Classic/Legacy CodeWarriorのトピック56F8013 writing to SCI QuickStart</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56F8013-writing-to-SCI-QuickStart/m-p/190538#M4802</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using CW8.0 with the 56F8013Demo board.&amp;nbsp; And I am using Quick Start codes.&amp;nbsp; I have everything setup correctly, based off the sample applications.&amp;nbsp; I can send data with&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;"&amp;nbsp;&amp;nbsp;&amp;nbsp; write(SCI_0, BUFFERED, buff, sizeof(buff)-1);&amp;nbsp;&amp;nbsp; "&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;code as long as buff is a const char definted above main as&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;" char buff[] = "Hello World";&amp;nbsp;&amp;nbsp;&amp;nbsp; "&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV align="left"&gt;But when I try to send ADC data out to through the SCI like:&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;volatile UWord16 w1;&lt;BR /&gt;w1 = ioctl( ADC, ADC_READ_SAMPLE, 1);&lt;BR /&gt;write(SCI_0, BUFFERED, w1, sizeof(w1)-1);&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;But it errors out complaining "illegal implicit conversion from 'volatile unsigned short' to 'const char *'&lt;BR /&gt;I don't know how to make w1 to a const char.&amp;nbsp; I have tried using sprintf to a char variable, but that didn't work.&amp;nbsp; Anyone know of any other ideas?&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;BR /&gt;Rob.&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Feb 2008 13:02:31 GMT</pubDate>
    <dc:creator>RGehring</dc:creator>
    <dc:date>2008-02-18T13:02:31Z</dc:date>
    <item>
      <title>56F8013 writing to SCI QuickStart</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56F8013-writing-to-SCI-QuickStart/m-p/190538#M4802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using CW8.0 with the 56F8013Demo board.&amp;nbsp; And I am using Quick Start codes.&amp;nbsp; I have everything setup correctly, based off the sample applications.&amp;nbsp; I can send data with&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;"&amp;nbsp;&amp;nbsp;&amp;nbsp; write(SCI_0, BUFFERED, buff, sizeof(buff)-1);&amp;nbsp;&amp;nbsp; "&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;code as long as buff is a const char definted above main as&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;" char buff[] = "Hello World";&amp;nbsp;&amp;nbsp;&amp;nbsp; "&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV align="left"&gt;But when I try to send ADC data out to through the SCI like:&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;volatile UWord16 w1;&lt;BR /&gt;w1 = ioctl( ADC, ADC_READ_SAMPLE, 1);&lt;BR /&gt;write(SCI_0, BUFFERED, w1, sizeof(w1)-1);&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;But it errors out complaining "illegal implicit conversion from 'volatile unsigned short' to 'const char *'&lt;BR /&gt;I don't know how to make w1 to a const char.&amp;nbsp; I have tried using sprintf to a char variable, but that didn't work.&amp;nbsp; Anyone know of any other ideas?&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;BR /&gt;Rob.&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 13:02:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56F8013-writing-to-SCI-QuickStart/m-p/190538#M4802</guid>
      <dc:creator>RGehring</dc:creator>
      <dc:date>2008-02-18T13:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: 56F8013 writing to SCI QuickStart</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56F8013-writing-to-SCI-QuickStart/m-p/190539#M4803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Do you refer to an example delivered on the installation ?&lt;/DIV&gt;&lt;DIV&gt;Can you please provide us more details about the Quick Start code ?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Pascal&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2008 21:09:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56F8013-writing-to-SCI-QuickStart/m-p/190539#M4803</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2008-02-20T21:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: 56F8013 writing to SCI QuickStart</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56F8013-writing-to-SCI-QuickStart/m-p/190540#M4804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I got QuickStart from freescale:&lt;BR /&gt;&lt;A href="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=DSP56800EQUICKSTART&amp;amp;fsrch=1" target="test_blank"&gt;http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=DSP56800EQUICKSTART&amp;amp;fsrch=1&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;You have to setup CW to recognize it the code correctly.&amp;nbsp; But I used the sample applications to run my code.&amp;nbsp; In my code attached, it works perfectly if I comment out both:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; w1c=w1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; write(SCI_0, BUFFERED, w1c, sizeof(w1c)-1);&lt;BR /&gt;&lt;BR /&gt;with them in there, it complains that wlc is not a const char *, while the line&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; write(SCI_0, BUFFERED, buff, sizeof(buff)-1);&lt;BR /&gt;works fine because it is defined as a const char *.&amp;nbsp;&lt;BR /&gt;Or if I change&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; write(SCI_0, BUFFERED, w1c, sizeof(w1c)-1);&lt;BR /&gt;to&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; write(SCI_0, BUFFERED, w1, sizeof(w1)-1);&lt;BR /&gt;it also complains because w1 is a Uword16 and not a const char.&amp;nbsp; I am just wondering how I could get the data from w1 into a const char to send it over SCI.&amp;nbsp; Will I have to use pointers and just redefine where a const char of say w1_buff it pointing to and have it point to where w1's data is?&lt;BR /&gt;&lt;BR /&gt;Hopefully this is what you are looking for.&lt;BR /&gt;Thanks for the help.&lt;BR /&gt;Rob.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 00:29:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56F8013-writing-to-SCI-QuickStart/m-p/190540#M4804</guid>
      <dc:creator>RGehring</dc:creator>
      <dc:date>2008-02-21T00:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: 56F8013 writing to SCI QuickStart</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56F8013-writing-to-SCI-QuickStart/m-p/190541#M4805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Humm, DSP56800E_Quick_Start r2.3 ...&lt;/DIV&gt;&lt;DIV&gt;I've never used it.&lt;/DIV&gt;&lt;DIV&gt;This is a code generattor tool like Processor Expert.&lt;/DIV&gt;&lt;DIV&gt;The support for this product is provided by another team.&lt;/DIV&gt;&lt;DIV&gt;In order to investigate the problem I want to suggest you to log it in CRM system.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I suggest you to log your request to the Freescale CRM system.&lt;BR /&gt;Please use Freescale on line support web page.&lt;BR /&gt;&amp;nbsp; - Go to following URL: &lt;A href="http://www.freescale.com/TechSupport" rel="nofollow" target="_blank"&gt;http://www.freescale.com/TechSupport&lt;/A&gt;&lt;BR /&gt;&amp;nbsp; - Click on Submit a Service Request to create a new one or Manage Existing Service Request.&lt;BR /&gt;&amp;nbsp; - You will come to a login page.&lt;BR /&gt;&amp;nbsp; - You can submit your request through the web from there or view the activities of a SR.&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;Pascal&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 16:13:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56F8013-writing-to-SCI-QuickStart/m-p/190541#M4805</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2008-02-21T16:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: 56F8013 writing to SCI QuickStart</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56F8013-writing-to-SCI-QuickStart/m-p/190542#M4806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I solved my problem.&amp;nbsp; I figured I would post it here too; to convert a UWord16, or probably any anything to char, I used this function:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;void convert(UWord16 w_adc)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; char buffer[6];&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; char *back;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; UWord16 w_adc2 = w_adc;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; back = buffer + 5;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *back = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; do {&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;&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; *--back = w_adc2 % 10 + '0';&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Taken from &lt;A href="http://tinyurl.com/3xruhq" target="test_blank"&gt;http://tinyurl.com/3xruhq&lt;/A&gt; */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; w_adc2 /= 10;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } while (w_adc2);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if(w_adc&amp;lt;= 9999 &amp;amp;&amp;amp; w_adc&amp;gt;=1000)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; buffer[5] = 0x00;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if(w_adc&amp;lt;=999 &amp;amp;&amp;amp; w_adc&amp;gt;=100)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp; buffer[5] = 0x33; buffer[4] = 0x33; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if(w_adc&amp;lt;=99 &amp;amp;&amp;amp; w_adc&amp;gt;=10)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp; buffer[5] = 0x00; buffer[4] = 0x00; buffer[3] = 0x00; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if(w_adc&amp;lt;=9 &amp;amp;&amp;amp; w_adc&amp;gt;=0)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp; buffer[5] = 0x00; buffer[4] = 0x00; buffer[3] = 0x00; buffer[2] = 0x00; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; write(SCI_0, BUFFERED, (char *)&amp;amp;buffer, 6);&lt;BR /&gt;}&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;It will take each letter/number from w_adc and put it into the buffer char.&amp;nbsp; Then to output it you have to use the pointer to the location of the char.&amp;nbsp; The if statements get rid of the trailing zero's at the end of the buffer, definitely needed.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Feb 2008 00:01:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56F8013-writing-to-SCI-QuickStart/m-p/190542#M4806</guid>
      <dc:creator>RGehring</dc:creator>
      <dc:date>2008-02-24T00:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: 56F8013 writing to SCI QuickStart</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56F8013-writing-to-SCI-QuickStart/m-p/190543#M4807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks for the feedback.&lt;/DIV&gt;&lt;DIV&gt;Don't hesitate to contact us.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards&lt;/DIV&gt;&lt;DIV&gt;Pascal&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2008 21:28:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56F8013-writing-to-SCI-QuickStart/m-p/190543#M4807</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2008-02-25T21:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: 56F8013 writing to SCI QuickStart</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56F8013-writing-to-SCI-QuickStart/m-p/190544#M4808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Use Unions Luke! &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;BR /&gt;&lt;BR /&gt;example (perhaps depending on endianess, you can have bytes swapped):&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;union { short a;
 unsigned char b[2];
      } union_var;&lt;/PRE&gt;unsigned char *pb;&lt;BR /&gt;&lt;BR /&gt;pb = &amp;amp;union_var;&lt;BR /&gt;union_var.a = ioctl( ADC, ADC_READ_SAMPLE, 1);&lt;BR /&gt;write(SCI_0, BUFFERED, pb, sizeof(union_var));&lt;BR /&gt;&lt;BR /&gt;or without unions:&lt;BR /&gt;&lt;BR /&gt;UWord16 temp;&lt;BR /&gt;UWord8 buf[2];&lt;BR /&gt;&lt;BR /&gt;temp = ioctl( ADC, ADC_READ_SAMPLE, 1);&lt;BR /&gt;&lt;BR /&gt;//if you prefer you can change low part-high part...&lt;BR /&gt;buf[0] = (temp &amp;gt;&amp;gt; &lt;SPAN class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;&lt;LI-EMOJI id="lia_smiling-face-with-sunglasses" title=":smiling_face_with_sunglasses:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt; &amp;amp; 0x00FF; //high part&lt;BR /&gt;buf[1] = temp &amp;amp; 0x00FF; //low part&lt;BR /&gt;&lt;BR /&gt;write(SCI_0, BUFFERED, buf, 2);&lt;BR /&gt;&lt;BR /&gt;I've not tested this code...&lt;BR /&gt;&lt;BR /&gt;Bye Jack&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:42:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/56F8013-writing-to-SCI-QuickStart/m-p/190544#M4808</guid>
      <dc:creator>jag</dc:creator>
      <dc:date>2020-10-29T09:42:18Z</dc:date>
    </item>
  </channel>
</rss>

