Hi Guys,
I'm wondering if anyone has used any of the FPUs for microcontrollers out there with 8bit pics?
Any reccomendations?
Cheers, Art.
Hi Guys,
I'm wondering if anyone has used any of the FPUs for microcontrollers out there with 8bit pics?
Any reccomendations?
Cheers, Art.
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?
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 " !!!
*****************************************
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.
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
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 " !!!
*****************************************
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![]()
Bookmarks