<?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: How to convert from ASCII chain to a float variable in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-convert-from-ASCII-chain-to-a-float-variable/m-p/281046#M11963</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ZhangJennie,&lt;/P&gt;&lt;P&gt;I am using TWRK60F120M&lt;/P&gt;&lt;P&gt;codewarrior 10.5 &amp;amp;&lt;/P&gt;&lt;P&gt;mqx4.0.2&lt;/P&gt;&lt;P&gt;I have tried conversion of ascii string to float using atof function as you explained but for conversion of 1.23 I am getting it as 2.06 &amp;amp; also I am getting warning for this api as implicit declaration of function.&lt;/P&gt;&lt;P&gt;Please let me know how to solve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 May 2014 11:47:50 GMT</pubDate>
    <dc:creator>adt</dc:creator>
    <dc:date>2014-05-12T11:47:50Z</dc:date>
    <item>
      <title>How to convert from ASCII chain to a float variable</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-convert-from-ASCII-chain-to-a-float-variable/m-p/281042#M11959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI there, I'm working in a logger system that send logged data to a PC. By now I'm developing the PC Software in C# with a lot of very usefull tools that allow me to change from Hexa to Float, Flota to Hexa, to String... what I want, but I know when I want to develope in Visual4Android I will not be so lucky.&lt;/P&gt;&lt;P&gt;So, someone knows how can I convert ASCII data string (4 bytes received by serial SPI) in to a float data? In other words the opposite of sprintf.&lt;/P&gt;&lt;P&gt;Mi idea is send a float data converted by sprinf in ASCII string and reseive float configuration data also in ASCII strings.&lt;/P&gt;&lt;P&gt;I'm using the MCF51CN128 ColdFire.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your time!&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pablo, from Buenos Aires.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jul 2013 17:17:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-convert-from-ASCII-chain-to-a-float-variable/m-p/281042#M11959</guid>
      <dc:creator>PabloA</dc:creator>
      <dc:date>2013-07-18T17:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert from ASCII chain to a float variable</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-convert-from-ASCII-chain-to-a-float-variable/m-p/281043#M11960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So might consider sscanf the inverse of sprintf.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jul 2013 21:42:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-convert-from-ASCII-chain-to-a-float-variable/m-p/281043#M11960</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2013-07-18T21:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert from ASCII chain to a float variable</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-convert-from-ASCII-chain-to-a-float-variable/m-p/281044#M11961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try atof()&amp;nbsp; ----- ascii to floating point numbers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;void main(void) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; volatile double f;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; char sf[10]="1.23";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; f = atof(sf);&amp;nbsp;&amp;nbsp; //atof &lt;BR /&gt;} &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;Hope this helps!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 02:08:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-convert-from-ASCII-chain-to-a-float-variable/m-p/281044#M11961</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2013-07-19T02:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert from ASCII chain to a float variable</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-convert-from-ASCII-chain-to-a-float-variable/m-p/281045#M11962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks to All, I will try it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 13:15:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-convert-from-ASCII-chain-to-a-float-variable/m-p/281045#M11962</guid>
      <dc:creator>PabloA</dc:creator>
      <dc:date>2013-07-19T13:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert from ASCII chain to a float variable</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-convert-from-ASCII-chain-to-a-float-variable/m-p/281046#M11963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ZhangJennie,&lt;/P&gt;&lt;P&gt;I am using TWRK60F120M&lt;/P&gt;&lt;P&gt;codewarrior 10.5 &amp;amp;&lt;/P&gt;&lt;P&gt;mqx4.0.2&lt;/P&gt;&lt;P&gt;I have tried conversion of ascii string to float using atof function as you explained but for conversion of 1.23 I am getting it as 2.06 &amp;amp; also I am getting warning for this api as implicit declaration of function.&lt;/P&gt;&lt;P&gt;Please let me know how to solve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 11:47:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-convert-from-ASCII-chain-to-a-float-variable/m-p/281046#M11963</guid>
      <dc:creator>adt</dc:creator>
      <dc:date>2014-05-12T11:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert from ASCII chain to a float variable</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-convert-from-ASCII-chain-to-a-float-variable/m-p/281047#M11964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; I have tried conversion of ascii string to float using atof function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is both a basic "Programming in C" question as well as being related to the compiler you're using. You should be asking questions there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should also type error messages you don't understand into Google to find everyone else who has had the same problem - and how they solved it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2014 03:00:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-convert-from-ASCII-chain-to-a-float-variable/m-p/281047#M11964</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2014-05-13T03:00:13Z</dc:date>
    </item>
  </channel>
</rss>

