Jump to content


Photo

Hi


1 reply to this topic

#1 hardik

hardik

    Newbrie

  • Members
  • 2 posts

Posted 27 December 2011 - 12:14 PM

<p>hi,</p>
<p>i am using pic16f689 and version 6.81. i have to use sqrt function.</p>
<p>but it need 260 bytes ram. i have only 256bytes available.</p>
<p>is it my program mistake or else?</p>
<p> </p>

#2 Dave

Dave

    Super Maniac

  • Administrators
  • PipPipPipPipPip
  • 2,091 posts
  • Gender:Male
  • Location:UK
  • Interests:How things work, Electronics, Software, Cycling.

Posted 27 December 2011 - 03:08 PM

hi,
i am using pic16f689 and version 6.81. i have to use sqrt function,
but it need 260 bytes ram. i have only 256bytes available.
is it my program mistake or else?

The current floating point math library square root routine is somewhat on the heavy side when it comes to RAM and ROM.
My best suggestion if convert the value to an integer (multiply by 100 for one decimal place) and then use the integer square root function.

Regards
Dave



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users