<?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 Own itoa in Classic/Legacy CodeWarrior</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Own-itoa/m-p/182032#M4205</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello I have a problem with converting int to char.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I&amp;nbsp;don't have access to extras.h&lt;/DIV&gt;&lt;DIV&gt;And sprintf only givs back junk characters&lt;/DIV&gt;&lt;DIV&gt;I have also tried the union example that is placed here on the forum but no success&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I have just simplefied the function to see what is going wrong but the problem is still there&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;void itoa() {&lt;BR /&gt;&amp;nbsp; unsigned int n = 12345;&lt;BR /&gt;&amp;nbsp; unsigned char i = 0;&lt;BR /&gt;&amp;nbsp; unsigned char s[7];&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; RS232_Enable();&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; do {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; s[i++] = (unsigned char)('0' + (n % 10));&amp;nbsp;&amp;nbsp;&amp;nbsp; // This works givs 54321 on RS232 or on LCD&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; do{}while(RS232_SendChar(s[i-1]));&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; } while ((n /= 10) &amp;gt; 0);&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; s[i] = '\n';&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; for(i=0;i&amp;lt;5;i++){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; do{}while(RS232_SendChar(s[i]));&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // This doesent givs X4X2X&amp;nbsp;&amp;nbsp;&amp;nbsp;where&amp;nbsp;X&amp;nbsp; is random&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;And if i declare s[7] as static char i get 5X3X1&amp;nbsp;&amp;nbsp;where&amp;nbsp;X&amp;nbsp; is random&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;What am I doing wrong?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I use a 56F8357 and CW 8.1.1a build 7168&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Hope someone could give me a helping hand because this is not what&amp;nbsp;I should spend my time on.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thomas&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Aug 2008 21:36:34 GMT</pubDate>
    <dc:creator>SCC</dc:creator>
    <dc:date>2008-08-26T21:36:34Z</dc:date>
    <item>
      <title>Own itoa</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Own-itoa/m-p/182032#M4205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello I have a problem with converting int to char.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I&amp;nbsp;don't have access to extras.h&lt;/DIV&gt;&lt;DIV&gt;And sprintf only givs back junk characters&lt;/DIV&gt;&lt;DIV&gt;I have also tried the union example that is placed here on the forum but no success&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I have just simplefied the function to see what is going wrong but the problem is still there&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;void itoa() {&lt;BR /&gt;&amp;nbsp; unsigned int n = 12345;&lt;BR /&gt;&amp;nbsp; unsigned char i = 0;&lt;BR /&gt;&amp;nbsp; unsigned char s[7];&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; RS232_Enable();&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; do {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; s[i++] = (unsigned char)('0' + (n % 10));&amp;nbsp;&amp;nbsp;&amp;nbsp; // This works givs 54321 on RS232 or on LCD&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; do{}while(RS232_SendChar(s[i-1]));&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; } while ((n /= 10) &amp;gt; 0);&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; s[i] = '\n';&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; for(i=0;i&amp;lt;5;i++){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; do{}while(RS232_SendChar(s[i]));&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // This doesent givs X4X2X&amp;nbsp;&amp;nbsp;&amp;nbsp;where&amp;nbsp;X&amp;nbsp; is random&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;And if i declare s[7] as static char i get 5X3X1&amp;nbsp;&amp;nbsp;where&amp;nbsp;X&amp;nbsp; is random&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;What am I doing wrong?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I use a 56F8357 and CW 8.1.1a build 7168&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Hope someone could give me a helping hand because this is not what&amp;nbsp;I should spend my time on.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thomas&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Aug 2008 21:36:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Own-itoa/m-p/182032#M4205</guid>
      <dc:creator>SCC</dc:creator>
      <dc:date>2008-08-26T21:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Own itoa</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Own-itoa/m-p/182033#M4206</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;Can I suggest you to try with the last version CW for DSC 8.2 and compiler patch ?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;You can download this version on our web site via the link:&lt;BR /&gt;&lt;A href="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=CW-56800E-DSC" rel="nofollow" target="_blank"&gt;http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=CW-56800E-DSC&lt;/A&gt;&lt;BR /&gt;For details please have a look in:&lt;BR /&gt;&lt;A href="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=CW-56800E-DSC&amp;amp;tab=In-Depth_Tab" rel="nofollow" target="_blank"&gt;http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=CW-56800E-DSC&amp;amp;tab=In-Depth_Tab&lt;/A&gt;&lt;BR /&gt;In the download tab you can download the Special Edition or the Evaluation.&lt;BR /&gt;The Special edition contains the special edition license limited to 32 kb of Code.&lt;BR /&gt;We recommend you to download the Evaluation edition.&lt;BR /&gt;A Professional Evaluation license is provided for first 30 days.&lt;BR /&gt;After 30 days the product will function at the Special Edition level.&lt;BR /&gt;If you need another version of the license please contact your local distributor.&lt;BR /&gt;You can purchase it directly from the web site too.&lt;BR /&gt;We changed the pricing and packaging structure for Codewarrior Tool.&lt;BR /&gt;Now there are 4 suites:&lt;BR /&gt;&amp;nbsp;special (free version)&lt;BR /&gt;&amp;nbsp;basic&lt;BR /&gt;&amp;nbsp;standard&lt;BR /&gt;&amp;nbsp;professional&lt;BR /&gt;Please refer to the link for details:&lt;BR /&gt;&lt;A href="http://www.freescale.com/webapp/sps/site/overview.jsp?nodeId=0127262E703BC5" rel="nofollow" target="_blank"&gt;http://www.freescale.com/webapp/sps/site/overview.jsp?nodeId=0127262E703BC5&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;Go to the &lt;A href="http://www.freescale.com" rel="nofollow" target="_blank"&gt;www.freescale.com&lt;/A&gt; and click on My Freescale.&lt;BR /&gt;After you were logged, select CodeWarrior Licensing under MY Secure Application.&lt;BR /&gt;In the new dialog you can manage your license file.&lt;/DIV&gt;&lt;DIV&gt;Keep in mind you can have several versions installed on the same PC.&lt;BR /&gt;There is only one restriction: install them on separate folder.&lt;BR /&gt;If you're using an old version, please backup your project before to try it with this new version.&lt;BR /&gt;If you will meet some compatibility issue you could back to the older version without problem.&lt;/DIV&gt;&lt;DIV&gt;For the patches, please use the link :&lt;BR /&gt;&amp;nbsp;&lt;A href="http://www.freescale.com/webapp/sps/site/overview.jsp?nodeId=01272600617882" rel="nofollow" target="_blank"&gt;http://www.freescale.com/webapp/sps/site/overview.jsp?nodeId=01272600617882&lt;/A&gt;&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>Fri, 29 Aug 2008 19:43:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Own-itoa/m-p/182033#M4206</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2008-08-29T19:43:43Z</dc:date>
    </item>
  </channel>
</rss>

