FPU for pic


Closed Thread
Results 1 to 7 of 7

Thread: FPU for pic

Hybrid View

  1. #1
    Join Date
    Aug 2003
    Posts
    985

    Default FPU for pic

    Hi Guys,
    I'm wondering if anyone has used any of the FPUs for microcontrollers out there with 8bit pics?
    Any reccomendations?
    Cheers, Art.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Don't have any recommendations for external FPU's...the Microchip math lib's are usually enough, and fast enough.

    What functions in particular are you looking to use?

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Art View Post

    Any reccomendations?

    Cheers, Art.
    Hi, Art

    Yes ... one recommendation : check your problem twice to see if FPU compulsory ... and overall :

    1) if precision required doesn't need some bits less ...

    2) If sensor processing ... which is the sensor precision ...

    In simple words, which is the LSB "real world" meaning.

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  4. #4
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default

    In particular, at the moment I want to do Sunrise, Sunset, Moonrise, Moonset and Moon phase calculations
    which all require a good definition of Pi to as many decimal places as possible.

    I've already ported this:
    http://www.sci.fi/~benefon/rscalc.c
    Sunrise/set times code to the Sony Playstaton Portable (still using C)
    which is not that hard because the PSP has an FPU, and float variables.
    Here is the Moonrie/Moonset/Moon phase calc working:


    That one was ported from Commodore 64 style BASIC which STILL use floats (as did the C64).

    I've no idea how to reproduce the same programs with a pic and no FPU.
    Also, I have similar ideas for GPS calculations where coordinates have many decimal places.
    Cheers, Art.

  5. #5
    Join Date
    Sep 2007
    Location
    USA, CA
    Posts
    271


    Did you find this post helpful? Yes | No

    Default

    I would be surprised if M'chip didn't have FP subroutines in assembly on their site. A trial version of their c compiler might get it. I know for certain that the Proton+ Basic compiler has FP, and I believe they have a trial version of it, too.
    http://www.picbasic.org/index.php

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Default

    Hi,

    You ALSO can download the PbP Floating point routines ( adapted from µChip ones ) on melab's site ...

    BUT remember PI can be closely approximated by the division of two integers ... what doesn't solve the trigonometric "genuine" functions lack of precision ... !!!

    for coprocessor ...

    http://www.micromegacorp.com/pbp.html

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  7. #7
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default

    Wow, didn't know Microchip had a C compiler. I'll have to check that out.
    Will also look for the Pic BASIC routines.
    Thanks

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts