<?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 Help!!! Please  ltoa() in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-Please-ltoa/m-p/176077#M12285</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am a newbie and appreciate some help PLEASE.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using a HC08Jm60 Micro. &amp;nbsp;I want to use ltoa function. I found that you have to use the extras_stdio.h inc&lt;/P&gt;&lt;P&gt;which I did but I get an error ( ; missing but its not ) &amp;nbsp;. I have seen that you have to re build the lib file and&amp;nbsp;&lt;/P&gt;&lt;P&gt;no reference how to. I am sure where to go from here . All I want is to convert a long to a string.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanking you in Advance&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 22 Oct 2011 13:50:42 GMT</pubDate>
    <dc:creator>SuperByte</dc:creator>
    <dc:date>2011-10-22T13:50:42Z</dc:date>
    <item>
      <title>Help!!! Please  ltoa()</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-Please-ltoa/m-p/176077#M12285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am a newbie and appreciate some help PLEASE.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using a HC08Jm60 Micro. &amp;nbsp;I want to use ltoa function. I found that you have to use the extras_stdio.h inc&lt;/P&gt;&lt;P&gt;which I did but I get an error ( ; missing but its not ) &amp;nbsp;. I have seen that you have to re build the lib file and&amp;nbsp;&lt;/P&gt;&lt;P&gt;no reference how to. I am sure where to go from here . All I want is to convert a long to a string.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanking you in Advance&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Oct 2011 13:50:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-Please-ltoa/m-p/176077#M12285</guid>
      <dc:creator>SuperByte</dc:creator>
      <dc:date>2011-10-22T13:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help!!! Please  ltoa()</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-Please-ltoa/m-p/176078#M12286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What compiler are you using?&lt;/P&gt;&lt;P&gt;Conversion functions like atoi or strtod are declared in stdlib.h . itoa and ltoa are not standard C functions and thus are not available in CW libs. CW 6.3 stdlib.h declares _itoa, but no _ltoa or ltoa.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Oct 2011 14:50:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-Please-ltoa/m-p/176078#M12286</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2011-10-22T14:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: Help!!! Please  ltoa()</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-Please-ltoa/m-p/176079#M12287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Perhaps you need to "roll your own" function.&amp;nbsp; The following code was adapted from that given in a recent thread within these forums.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;// Converts signed 32-bit integer number to a decimal string.// The data is stored within 'buff', minimum length 12 bytes// (sign + 10 digits + null termination)void l_to_a( long val, char *buff){   long temp;   byte i;   char s = ' ';      // Fill buffer with spaces   for (i = 0; i &amp;lt; 11; i++) {      *(buff + i) = ' ';   }      // Null termination for string data   *(buff + i) = 0;   if (val &amp;lt; 0) {      val = -val;      s = '-';   }   // Convert binary value to decimal ASCII   i = 10;   do {      temp = val;      val /= 10;      *(buff + i) = temp - (val * 10) + '0';      i--;   } while (val);   *(buff + i) = s;  // Insert sign character}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:24:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-Please-ltoa/m-p/176079#M12287</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2020-10-29T09:24:56Z</dc:date>
    </item>
  </channel>
</rss>

