floating point question on MSP430

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi All,

What is TI talking about when they refer to the floating point package(FPP)?
Is is able to be used on any of their uC?

I need the uC to take the square root of a number and it seems that I'll
have to use the FPP to do it.  Is that true?

What is the FPP used for?

Thanks

David



Re: floating point question on MSP430

Quoted text here. Click to load it
package(FPP)?

http://www-s.ti.com/sc/techzip/slar041.zip, described in
http://focus.ti.com/lit/an/slaa024/slaa024.pdf

Quoted text here. Click to load it
I'll

It is one way to do it.

Quoted text here. Click to load it

Fiddles with floating point calculations (two formats provided). RTFM.

Cheers.

--
PabloBleyerKocik /"To the electron -- may it never
pbleyer2004    / be of any use to anybody."
We've slightly trimmed the long signature. Click to see the full one.
Re: floating point question on MSP430
Quoted text here. Click to load it

There are several methods for calculating sq root.  Search the
archives here and software-eng.  THe one the comes to mind is a
sucessive approximation method that (from MSB to LSB) sets a bit in
the answer then squares the number then tests is the guess squared is
larger input value.  I suspect the 430 will have fast multiply.

Floating point will be large code and time wise.

Good Luck
George

Re: floating point question on MSP430
On Mon, 12 Jul 2004 02:57:49 GMT, the renowned "David R. McCoy"

Quoted text here. Click to load it

Certainly not. But doing it that way might avoid having to write any
code. If that's the only reason you need to include floating point
math it will likely be quite inefficient wrt code size and speed.

If the MSP430 you are using has a hardware multiplier- you can simply
flip bits from the MSB down to the LSB, test (by squaring the number),
correct and move down to the next bit till you get to the LSB- and it
will be pretty fast and compact.

Best regards,
Spehro Pefhany
--
"it's the network..."                          "The Journey is the reward"
snipped-for-privacy@interlog.com             Info for manufacturers: http://www.trexon.com
We've slightly trimmed the long signature. Click to see the full one.
Re: floating point question on MSP430


Quoted text here. Click to load it

Otherwise google on "Newton's method" or "Newton-Raphson".    What could Sir
Isaac have achieved with a PC?

Cheers,
Alf



Re: floating point question on MSP430
On Mon, 12 Jul 2004 22:50:31 +1000, the renowned "Unbeliever"

Quoted text here. Click to load it

All that time he wasted writing _Principia_ could have been better
spent getting to the top level of Doom.

Best regards,
Spehro Pefhany
--
"it's the network..."                          "The Journey is the reward"
snipped-for-privacy@interlog.com             Info for manufacturers: http://www.trexon.com
We've slightly trimmed the long signature. Click to see the full one.
Re: floating point question on MSP430
Quoted text here. Click to load it

LOL!

--
Mike Page BEng(Hons) MIEE           www.eclectic-web.co.uk
Quiet! Tony's battling the forces of conservatism, whoever we are.

Re: floating point question on MSP430
Quoted text here. Click to load it
Sir

A very big dent in his head instead of a bump.

Peter



Re: floating point question on MSP430
On Tue, 13 Jul 2004 17:21:44 GMT, onestone

Quoted text here. Click to load it

   I recall the tagline:

"How do you accelerate a Macintosh? 9.8 meters/second."

Quoted text here. Click to load it


Re: floating point question on MSP430

Quoted text here. Click to load it
package(FPP)?
Quoted text here. Click to load it
http://www.trexon.com
Quoted text here. Click to load it
http://www.speff.com
Quoted text here. Click to load it

I don't believe that the uC that I'm using has a hardware multiplier but
I'll check.  The calculation that I need to perform will only need to
perform 1 square root per event.  The period between each event is measured
in tens of seconds.  Writing a routine that sets a bit and then squares it &
tests sounds like it might be the way to go.

thanks for everyones response.

David



Re: floating point question on MSP430

Quoted text here. Click to load it
I'll
reward"
Quoted text here. Click to load it
measured
&
Quoted text here. Click to load it

Fine if you have time to re-invent the wheel again.. if it's only of that
period
then use fp and get on with your application..!!



Re: floating point question on MSP430

Quoted text here. Click to load it
it
You make a good point.  Reinventing the wheel isn't something that I'm
looking to do, it's just that I'm a bit unsure of how to use the floating
point tool.  A guy at my day job told me that floating point was only
understood by the Aseembly Language Gurus.  Now,  I'm sure that I could
eventually figure out how to use it; it's just that right now I'm weighing
the amount of time it would take to come up to speed on FP versus writing
code without it.

I'm using a MSP430F149 uC.  The FP tool seems to be a header file that I add
into my code but when I try to compile it, the compiler pukes and says that
it doesn't recognize any of the commands in that file.  What am I doing
wrong?

Thanks



Re: floating point question on MSP430

Quoted text here. Click to load it

This suggests that you're in trouble anyway, since you don't know what
features your target micro has. The F149 you are using has a hardware
multiplier, but if I were you I'd use the floating point packet rather
than try and write your own routine.

Quoted text here. Click to load it

In a later post you state that you are using a compiler. Thus C. Most of
the current C compilers have floating point procedures anyway. Probably
even a sqr() function if not you need to do more than just include the
header file, you must also include the *.lib file or source file that
includes the actual functions.

Al


Re: floating point question on MSP430

Quoted text here. Click to load it
I'll
reward"
Quoted text here. Click to load it
measured
it &
Quoted text here. Click to load it

Hi Al,

Ok.  I can see that I'm stumbling on words now.  I said "compiler" but I
meant "assembler".  Sorry for the mixup.  My C code abilities are very
limited.  I'm trying to do this in Assembly since I'm more familiar with
that than C.

I also checked and yes, the F149 does have the hardware multiplier.  I'm
learning alot about this uC.  As many times as I've looked at the datasheet,
there are still things that I'm missing.  Thanks.

I'll look into the FPP a bit closer and also evaluate some of the other
suggestions made here.

Thank you for your help.  I may be back . . .





Re: floating point question on MSP430
[snip]
Quoted text here. Click to load it

Have fun with the errors, omissions, and ambiguities of
the documentation...

Re: floating point question on MSP430
On Wed, 14 Jul 2004 08:13:18 PST, snipped-for-privacy@mojaveg.iwvisp.com (Everett

Quoted text here. Click to load it

   This could be a separate thread, as TI is far from the only
manufacturer to have less-than-wonderful documentation. I seriously
considered writing some sort of "Programming and Using The..." book on
the Zilog Z89371 DSP when I was learning/using/designing it in. I got
my ass bit a bunch of times (not just the docummentation, but various
features that didn't work, assembler silently and happily generating
bad object code from a bad instruction, etc), and it would have been
an invaluable, time-saving guide for avoiding gotcha's for anyone who
would want to use that chip. For good or bad, it looks like few people
wanted to use it.
   The MSP430 appears to have growing popularity, and it seems a book
on it, especially covering gotcha's and not just being a rehash of the
TI docs, might actually sell enough copies to make it worthwhile.


Re: floating point question on MSP430
Quoted text here. Click to load it

We could also get into a "discussion" of some manufacturers'
not producing hardcopies of their docs anymore.  We each
get to produce our own at 10X the cost of the manufacturer
doing it.

Re: floating point question on MSP430
Quoted text here. Click to load it

There is such a book already. I proofread it.

<(Amazon.com product link shortened)>

It's a good book.

Re: floating point question on MSP430
snipped-for-privacy@larwe.com says...
Quoted text here. Click to load it
<(Amazon.com product link shortened)>
Quoted text here. Click to load it

Thanks for the pointer.  I also picked up a copy of "Embedded Systems
Design on a Shoestring" while I was there.  Never too late for an old
nerd to learn a few new tricks!   ;-)


Mark Borgerson


Re: floating point question on MSP430
The documentation, when the 'F' series was first released, was
attrocious, now it's pretty good. The only real issue is the lack of
hardcover availability of SLAUE10B and SLAU024.

Al

Everett M. Greene wrote:

Quoted text here. Click to load it

--
Please remove capitalised letters to reply
My apologies for the inconvenience
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline