EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Re: IAR and AQ430 floating point library size

Started by Preston Gurd October 21, 2002
Hello Ken,

> And floating point support is one of my major
concern,
> so I modify the MSP430F413 FET C example a bit to try
> it out. I just want to test a floating +, - , *, /
> library size. And I wondering the result. And except
> the C source code, I change nothing regarding the
> complier or linker setting?
> 
> Generated code size:
> IAR: 808 byte
> AQ430: 3002 byte
> 

The main reason why you see such a disparity in the code size
is due to the fact that pretty much all of the floating point
code in the AQ430 library is in one large module in the library.
That module includes a lot of functions which you are not using,
including all the trig functions, power, sqrt, ln, etc.

Now that you have taken the trouble to point out the problem to us,
we are planning to split the large module up into several smaller
modules, so that when you link your program you will get only the functions
which you are actually using, which will make the total code size
after linking much smaller.

Thank you for your comments.

All the best,

Preston Gurd
Archelon Inc.


Beginning Microcontrollers with the MSP430

Hi Ken,

As you indicate concern for floating point, I should point out a few floating
point
issues on EW430 :

1.    Don't expect too good precision of IAR floats for MSP430 . It's
full of rounding errors that I don't get with other
       tools.
       Furthermore, be VERY careful when you store results with functions like
sscanf(). It STILL happily writes
       floats in odd-alignment at certain exceptions.........
       (The best way is to check alignment yourself at runtime, and adjust it in
your own S/W , because it
       indeed is not always possible for the compiler nor linek to know about
runtime, and actually is impossible.
       (At least the "new tool" I'm testing prompts an "odd
alignment" possibility, nowhere to be seen with EW430 after
       18 months of promises)
2.    Be careful when it is possible to come across NaNs (Not a Number), or +
and - infinities.
      Try giving +/- INF to IAR's printf() .................. It never
returns.
      I've queried this with IAR about 1 year ago, and I was told not to
feed NANs to printf() ......
      "Not Good Enough"...

If you are specifically after floating point operation, you *might* not have
your needs fulfilled on EW430....  
Each case is different, but my specific code couldn't afford to (and
shouldn't have to !) check for NaNs etc. at runtime
before I call printf().

Printf() should handle that itself.........

Kris

  ----- Original Message ----- 
  From: To chi kin 
  To: msp430@msp4... 
  Sent: Monday, October 21, 2002 7:20 PM
  Subject: [msp430] IAR and AQ430 floating point library size


  Dear all,

  Once again, I am a newbee for MSP430. I am still
  searching for a right C toolchain for my 1st MSP430
  project.

  And floating point support is one of my major concern,
  so I modify the MSP430F413 FET C example a bit to try
  it out. I just want to test a floating +, - , *, /
  library size. And I wondering the result. And except
  the C source code, I change nothing regarding the
  complier or linker setting?

  Generated code size:
  IAR: 808 byte
  AQ430: 3002 byte

  Is that the truth? Ok, if that's the truth! I also
  feel more confortable when I pay so much $$$ for it.

  Thanks in advance!

  have a good day
  Ken

  test code:
  #include  <msp430x41x.h>

  float a, b, c;

  void main(void)
  { 
        
    WDTCTL = WDTPW + WDTHOLD;
    P5DIR |= 0x02;

        a = 100.0;
        b = 2.5;
        c = a + b;
        c = a * b;
        c = a / b;
        c = a - b;

    for (;;)                             
    {
      unsigned int i;

      P5OUT ^= 0x02;
      i = 50000;
      do (i--);
      while (i != 0);
    }
  }


  _________________________________________________________
  1874()AA)A˳u(Ť...
  V800ܷsita!
  Over 800 latest ringtones, only on Yahoo!
  http://ringtone.yahoo.com.hk

        
             
       
       

  .



   






Dear Kris,

Thanks for you advice!

So, I also heard T.I. has a Floating Point Package,
FPP, v4.01 for T.I. Assembler and IAR. How do I update
it to IAR and does it help the floating point
functionality of IAR? (I am currently using v1.26A
evaluation version.)

By the way, where to get T.I. assembler and simulator?

have a good day
Ken


 --- Kris De Vos <microbit@micr...>
l󤺮eG> Hi Ken,
> 
> As you indicate concern for floating point, I should
> point out a few floating point
> issues on EW430 :
> 
> 1.    Don't expect too good precision of IAR floats
> for MSP430 . It's full of rounding errors that I
> don't get with other
>        tools.
>        Furthermore, be VERY careful when you store
> results with functions like sscanf(). It STILL
> happily writes
>        floats in odd-alignment at certain
> exceptions.........
>        (The best way is to check alignment yourself
> at runtime, and adjust it in your own S/W , because
> it
>        indeed is not always possible for the
> compiler nor linek to know about runtime, and
> actually is impossible.
>        (At least the "new tool" I'm testing prompts
> an "odd alignment" possibility, nowhere to be seen
> with EW430 after
>        18 months of promises)
> 2.    Be careful when it is possible to come across
> NaNs (Not a Number), or + and - infinities.
>       Try giving +/- INF to IAR's printf()
> .................. It never returns.
>       I've queried this with IAR about 1 year ago,
> and I was told not to feed NANs to printf() ......
>       "Not Good Enough"...
> 
> If you are specifically after floating point
> operation, you *might* not have your needs fulfilled
> on EW430....  
> Each case is different, but my specific code
> couldn't afford to (and shouldn't have to !) check
> for NaNs etc. at runtime
> before I call printf().
> 
> Printf() should handle that itself.........
> 
> Kris
> 
>   ----- Original Message ----- 
>   From: To chi kin 
>   To: msp430@msp4... 
>   Sent: Monday, October 21, 2002 7:20 PM
>   Subject: [msp430] IAR and AQ430 floating point
> library size
> 
> 
>   Dear all,
> 
>   Once again, I am a newbee for MSP430. I am still
>   searching for a right C toolchain for my 1st
> MSP430
>   project.
> 
>   And floating point support is one of my major
> concern,
>   so I modify the MSP430F413 FET C example a bit to
> try
>   it out. I just want to test a floating +, - , *, /
>   library size. And I wondering the result. And
> except
>   the C source code, I change nothing regarding the
>   complier or linker setting?
> 
>   Generated code size:
>   IAR: 808 byte
>   AQ430: 3002 byte
> 
>   Is that the truth? Ok, if that's the truth! I also
>   feel more confortable when I pay so much $$$ for
> it.
> 
>   Thanks in advance!
> 
>   have a good day
>   Ken
> 
>   test code:
>   #include  <msp430x41x.h>
> 
>   float a, b, c;
> 
>   void main(void)
>   { 
>         
>     WDTCTL = WDTPW + WDTHOLD;
>     P5DIR |= 0x02;
> 
>         a = 100.0;
>         b = 2.5;
>         c = a + b;
>         c = a * b;
>         c = a / b;
>         c = a - b;
> 
>     for (;;)                             
>     {
>       unsigned int i;
> 
>       P5OUT ^= 0x02;
>       i = 50000;
>       do (i--);
>       while (i != 0);
>     }
>   }
> 
> 
>  
>
_________________________________________________________
>  
> 1874()AA)A˳u(Ť...
>   V800ܷsita!
>   Over 800 latest ringtones, only on Yahoo!
>   http://ringtone.yahoo.com.hk
> 
>         
>              
>        
>        
> 
>   .
> 
> 
> 
>    
> 
> 
> 
> [Non-text portions of this message have been
> removed]
> 
>  

_________________________________________________________
1874()AA)A˳u(Ť...
V800ܷsita!
Over 800 latest ringtones, only on Yahoo!
http://ringtone.yahoo.com.hk

Kris and others,

You mentioned below about IAR printf() going into a loop on NaNs, I've seen
this as well, and am currently tracing back through the stack on a project
that's mysteriously failing and is stuck in the float conversion of a
printf.  Do you have any suggestions on what pre-floating-point-printf() checks
to perform?

thanks,
matt b.

-----Original Message-----
From: Kris De Vos [mailto:microbit@micr...]
Sent: Tuesday, October 22, 2002 11:49 PM
To: msp430@msp4...
Subject: Re: [msp430] IAR and AQ430 floating point library size


Hi Ken,

As you indicate concern for floating point, I should point out a few floating
point
issues on EW430 :

1.    Don't expect too good precision of IAR floats for MSP430 . It's
full of rounding errors that I don't get with other
       tools.
       Furthermore, be VERY careful when you store results with functions like
sscanf(). It STILL happily writes
       floats in odd-alignment at certain exceptions.........
       (The best way is to check alignment yourself at runtime, and adjust it in
your own S/W , because it
       indeed is not always possible for the compiler nor linek to know about
runtime, and actually is impossible.
       (At least the "new tool" I'm testing prompts an "odd
alignment" possibility, nowhere to be seen with EW430 after
       18 months of promises)
2.    Be careful when it is possible to come across NaNs (Not a Number), or +
and - infinities.
      Try giving +/- INF to IAR's printf() .................. It never
returns.
      I've queried this with IAR about 1 year ago, and I was told not to
feed NANs to printf() ......
      "Not Good Enough"...

If you are specifically after floating point operation, you *might* not have
your needs fulfilled on EW430....  
Each case is different, but my specific code couldn't afford to (and
shouldn't have to !) check for NaNs etc. at runtime
before I call printf().

Printf() should handle that itself.........

Kris

  ----- Original Message ----- 
  From: To chi kin 
  To: msp430@msp4... 
  Sent: Monday, October 21, 2002 7:20 PM
  Subject: [msp430] IAR and AQ430 floating point library size


  Dear all,

  Once again, I am a newbee for MSP430. I am still
  searching for a right C toolchain for my 1st MSP430
  project.

  And floating point support is one of my major concern,
  so I modify the MSP430F413 FET C example a bit to try
  it out. I just want to test a floating +, - , *, /
  library size. And I wondering the result. And except
  the C source code, I change nothing regarding the
  complier or linker setting?

  Generated code size:
  IAR: 808 byte
  AQ430: 3002 byte

  Is that the truth? Ok, if that's the truth! I also
  feel more confortable when I pay so much $$$ for it.

  Thanks in advance!

  have a good day
  Ken

  test code:
  #include  <msp430x41x.h>

  float a, b, c;

  void main(void)
  { 
        
    WDTCTL = WDTPW + WDTHOLD;
    P5DIR |= 0x02;

        a = 100.0;
        b = 2.5;
        c = a + b;
        c = a * b;
        c = a / b;
        c = a - b;

    for (;;)                             
    {
      unsigned int i;

      P5OUT ^= 0x02;
      i = 50000;
      do (i--);
      while (i != 0);
    }
  }


  _________________________________________________________
  1874()AA)A˳u(Ť...
  V800ܷsita!
  Over 800 latest ringtones, only on Yahoo!
  http://ringtone.yahoo.com.hk

        
             
       
       

  .



  ">http://docs.yahoo.com/info/terms/ 



Phew, floats in assembler is a long time ago for me...
(Calling all floats assembler programmers !)

I haven't written floating point in like 8 years or so in assembler (one of
the reasons C is good :-)
There's all sorts of exceptions, and there's all sorts of ways to
"trap" irregularities in IEEE 754 eg. etc.
For example - worse - (not applicable here - yet) de-normalized floats can
become normalized doubles
etc......

I seem to recall a quick way was to first mask off the highest bit (bit 31), and
then - I think - subtracting
with 0x7FFF0000, and then checking the highest bit 31, or something like that.
Can't even remember whether that was INF or NaN......

There's a few ways to check for Nans and Infinities, but I can't
remember "off the cuff".
It's not that huge a task, but exceptions in IEEE floats definitely should
be handled by the formatter.....

Donald Knuth's book is excellent on floats and random number theory, but I
let someone borrow my copy
a long time ago and never saw it back.
Never really worried about that sort of stuff anymore, until more recently.

I'd have to check it out, but I didn't feel like that - because I
shouldn't have to ........

I have a feeling printf() gets stuck when it's trying to de-normalize after
unpacking or something to that
extent.
I spent a bit of time scratching my head when I descended into the runtime
library in disassembled view under C-spy
and had enough of it pretty quickly.........
(And of course there's no way to figure it out since there's no source
either... I think the only way left is to write
your own formatting - R/W ...)


BTW : Has anyone ever managed to get the "odd address check" in
EW430's project options to actually DO ANYTHING ?

I've given it the most blatently obvious reads and writes from/to odd
adresseses, and not only does the code blissfully read/write 
to odd addresses, C-spy will also give you the "correct" result, even
when alignment is completely wrong ........ ??????
For example, I'll give it a UINT pointer, and purposely write say decimal
1000 to an odd address - no warning ........
then read back from an odd address, no warning .........
Even better, the actual read back of the odd write will return the upper byte,
0x03, but running that in C-spy will return
"1000" decimal after the odd address read.......

Funnier even more is that when you go into the Help -> Contents in V1.26A,
the "odd address check" isn't even included
in the "screen shot" of the project options menu...... Someone could
at least have put it into the options menu .......
There's just a brief, vague mention in the separate HTML file ......


  ----- Original Message ----- 
  From: Matthew Bivans 
  To: msp430@msp4... 
  Sent: Thursday, October 24, 2002 1:34 AM
  Subject: RE: [msp430] IAR and AQ430 floating point library size


  Kris and others,

  You mentioned below about IAR printf() going into a loop on NaNs, I've
seen this as well, and am currently tracing back through the stack on a project
that's mysteriously failing and is stuck in the float conversion of a
printf.  Do you have any suggestions on what pre-floating-point-printf() checks
to perform?

  thanks,
  matt b.







Hi there,

Just picking up the discussion about FPP.
I'm working with the full licienced version of IAR WB, already two years
now.
Upgrading my "old" 1.24 version to the 1.26 version will be charged by
IAR
with G400.00 GBP (!!!!!!!!!)
while having already spent so much money on the IAR package. What is their
policy towards programmers like us?

Anyhow, I need a double precision Floating Point (multiply cos and acos
calculations) on a MSP430F149 device.
The IAR math lib really has a poor performance (lots of rounding errors and
only 7 digits resolution).
Can anybody tell me whether the TI FPP v4.01 has a better performance, and
how to integrate these routines in my C program. Can it be done with the
1.24 version of IAR, as I understood that TI FP formats are not supported by
IAR (float and double are treated the same way).

I really hope this discussion proceeds, since floating point is an important
issue after all.

Nico

----- Original Message -----
From: "To chi kin" <to_chi_kin@to_c...>
To: <msp430@msp4...>
Sent: Wednesday, October 23, 2002 6:30 AM
Subject: Re: [msp430] IAR and AQ430 floating point library size


> Dear Kris,
>
> Thanks for you advice!
>
> So, I also heard T.I. has a Floating Point Package,
> FPP, v4.01 for T.I. Assembler and IAR. How do I update
> it to IAR and does it help the floating point
> functionality of IAR? (I am currently using v1.26A
> evaluation version.)
>
> By the way, where to get T.I. assembler and simulator?
>
> have a good day
> Ken
>
>
>  --- Kris De Vos <microbit@micr...>
> ao?lDo?oRe!G> Hi Ken,
> >
> > As you indicate concern for floating point, I should
> > point out a few floating point
> > issues on EW430 :
> >
> > 1.    Don't expect too good precision of IAR floats
> > for MSP430 . It's full of rounding errors that I
> > don't get with other
> >        tools.
> >        Furthermore, be VERY careful when you store
> > results with functions like sscanf(). It STILL
> > happily writes
> >        floats in odd-alignment at certain
> > exceptions.........
> >        (The best way is to check alignment yourself
> > at runtime, and adjust it in your own S/W , because
> > it
> >        indeed is not always possible for the
> > compiler nor linek to know about runtime, and
> > actually is impossible.
> >        (At least the "new tool" I'm testing prompts
> > an "odd alignment" possibility, nowhere to be seen
> > with EW430 after
> >        18 months of promises)
> > 2.    Be careful when it is possible to come across
> > NaNs (Not a Number), or + and - infinities.
> >       Try giving +/- INF to IAR's printf()
> > .................. It never returns.
> >       I've queried this with IAR about 1 year ago,
> > and I was told not to feed NANs to printf() ......
> >       "Not Good Enough"...
> >
> > If you are specifically after floating point
> > operation, you *might* not have your needs fulfilled
> > on EW430....
> > Each case is different, but my specific code
> > couldn't afford to (and shouldn't have to !) check
> > for NaNs etc. at runtime
> > before I call printf().
> >
> > Printf() should handle that itself.........
> >
> > Kris
> >
> >   ----- Original Message -----
> >   From: To chi kin
> >   To: msp430@msp4...
> >   Sent: Monday, October 21, 2002 7:20 PM
> >   Subject: [msp430] IAR and AQ430 floating point
> > library size
> >
> >
> >   Dear all,
> >
> >   Once again, I am a newbee for MSP430. I am still
> >   searching for a right C toolchain for my 1st
> > MSP430
> >   project.
> >
> >   And floating point support is one of my major
> > concern,
> >   so I modify the MSP430F413 FET C example a bit to
> > try
> >   it out. I just want to test a floating +, - , *, /
> >   library size. And I wondering the result. And
> > except
> >   the C source code, I change nothing regarding the
> >   complier or linker setting?
> >
> >   Generated code size:
> >   IAR: 808 byte
> >   AQ430: 3002 byte
> >
> >   Is that the truth? Ok, if that's the truth! I also
> >   feel more confortable when I pay so much $$$ for
> > it.
> >
> >   Thanks in advance!
> >
> >   have a good day
> >   Ken
> >
> >   test code:
> >   #include  <msp430x41x.h>
> >
> >   float a, b, c;
> >
> >   void main(void)
> >   {
> >
> >     WDTCTL = WDTPW + WDTHOLD;
> >     P5DIR |= 0x02;
> >
> >         a = 100.0;
> >         b = 2.5;
> >         c = a + b;
> >         c = a * b;
> >         c = a / b;
> >         c = a - b;
> >
> >     for (;;)
> >     {
> >       unsigned int i;
> >
> >       P5OUT ^= 0x02;
> >       i = 50000;
> >       do (i--);
> >       while (i != 0);
> >     }
> >   }
> >
> >
> >
> >
> _________________________________________________________
> >
> > 1874(33L3)!A|ALGASgPo?2u(|oAyMO)!A?E3u(M--A?a)...
> >   ?V800-o|UPs|UHit?a?aAn!
> >   Over 800 latest ringtones, only on Yahoo!
> >   http://ringtone.yahoo.com.hk
> >
> >         
> >
> >
> >
> >
> >   .
> >
> >
> >
> >   ">http://docs.yahoo.com/info/terms/
>
>


Why do you need 64-bit floating-point?  Given that IAR support only
32-bit fp with a 24-bit mantissa, your only hope is a compiler with
64-bit doubles and a 53-bit mantissa.  I do know of one for the MSP430
with 64-bit doubles and a competent trig library, but I still wonder why
such precision is required.  Can you elucidate?

-- Paul.

> -----Original Message-----
> From: Nico_Resiproc [mailto:N.Arends@N.Ar...] 
> Sent: 27 October 2002 03:25
> To: msp430@msp4...
> Subject: Re: [msp430] IAR and AQ430 floating point library size
> 
> 
> Hi there,
> 
> Just picking up the discussion about FPP.
> I'm working with the full licienced version of IAR WB, 
> already two years now. Upgrading my "old" 1.24 version to the 
> 1.26 version will be charged by IAR with G400.00 GBP 
> (!!!!!!!!!) while having already spent so much money on the 
> IAR package. What is their policy towards programmers like us?
> 
> Anyhow, I need a double precision Floating Point (multiply 
> cos and acos
> calculations) on a MSP430F149 device.
> The IAR math lib really has a poor performance (lots of 
> rounding errors and only 7 digits resolution). Can anybody 
> tell me whether the TI FPP v4.01 has a better performance, 
> and how to integrate these routines in my C program. Can it 
> be done with the 1.24 version of IAR, as I understood that TI 
> FP formats are not supported by IAR (float and double are 
> treated the same way).
> 
> I really hope this discussion proceeds, since floating point 
> is an important issue after all.
> 
> Nico
> 
> ----- Original Message -----
> From: "To chi kin" <to_chi_kin@to_c...>
> To: <msp430@msp4...>
> Sent: Wednesday, October 23, 2002 6:30 AM
> Subject: Re: [msp430] IAR and AQ430 floating point library size
> 
> 
> > Dear Kris,
> >
> > Thanks for you advice!
> >
> > So, I also heard T.I. has a Floating Point Package,
> > FPP, v4.01 for T.I. Assembler and IAR. How do I update
> > it to IAR and does it help the floating point
> > functionality of IAR? (I am currently using v1.26A
> > evaluation version.)
> >
> > By the way, where to get T.I. assembler and simulator?
> >
> > have a good day
> > Ken
> >
> >
> >  --- Kris De Vos <microbit@micr...>
> > ao?lDo?oRe!G> Hi Ken,
> > >
> > > As you indicate concern for floating point, I should
> > > point out a few floating point
> > > issues on EW430 :
> > >
> > > 1.    Don't expect too good precision of IAR floats
> > > for MSP430 . It's full of rounding errors that I
> > > don't get with other
> > >        tools.
> > >        Furthermore, be VERY careful when you store
> > > results with functions like sscanf(). It STILL
> > > happily writes
> > >        floats in odd-alignment at certain exceptions.........
> > >        (The best way is to check alignment yourself
> > > at runtime, and adjust it in your own S/W , because
> > > it
> > >        indeed is not always possible for the
> > > compiler nor linek to know about runtime, and
> > > actually is impossible.
> > >        (At least the "new tool" I'm testing
prompts
> > > an "odd alignment" possibility, nowhere to be seen
> > > with EW430 after
> > >        18 months of promises)
> > > 2.    Be careful when it is possible to come across
> > > NaNs (Not a Number), or + and - infinities.
> > >       Try giving +/- INF to IAR's printf()
> > > .................. It never returns.
> > >       I've queried this with IAR about 1 year ago,
> > > and I was told not to feed NANs to printf() ......
> > >       "Not Good Enough"...
> > >
> > > If you are specifically after floating point
> > > operation, you *might* not have your needs fulfilled
> > > on EW430....
> > > Each case is different, but my specific code
> > > couldn't afford to (and shouldn't have to !) check
> > > for NaNs etc. at runtime
> > > before I call printf().
> > >
> > > Printf() should handle that itself.........
> > >
> > > Kris
> > >
> > >   ----- Original Message -----
> > >   From: To chi kin
> > >   To: msp430@msp4...
> > >   Sent: Monday, October 21, 2002 7:20 PM
> > >   Subject: [msp430] IAR and AQ430 floating point
> > > library size
> > >
> > >
> > >   Dear all,
> > >
> > >   Once again, I am a newbee for MSP430. I am still
> > >   searching for a right C toolchain for my 1st
> > > MSP430
> > >   project.
> > >
> > >   And floating point support is one of my major
> > > concern,
> > >   so I modify the MSP430F413 FET C example a bit to
> > > try
> > >   it out. I just want to test a floating +, - , *, /
> > >   library size. And I wondering the result. And
> > > except
> > >   the C source code, I change nothing regarding the
> > >   complier or linker setting?
> > >
> > >   Generated code size:
> > >   IAR: 808 byte
> > >   AQ430: 3002 byte
> > >
> > >   Is that the truth? Ok, if that's the truth! I also
> > >   feel more confortable when I pay so much $$$ for
> > > it.
> > >
> > >   Thanks in advance!
> > >
> > >   have a good day
> > >   Ken
> > >
> > >   test code:
> > >   #include  <msp430x41x.h>
> > >
> > >   float a, b, c;
> > >
> > >   void main(void)
> > >   {
> > >
> > >     WDTCTL = WDTPW + WDTHOLD;
> > >     P5DIR |= 0x02;
> > >
> > >         a = 100.0;
> > >         b = 2.5;
> > >         c = a + b;
> > >         c = a * b;
> > >         c = a / b;
> > >         c = a - b;
> > >
> > >     for (;;)
> > >     {
> > >       unsigned int i;
> > >
> > >       P5OUT ^= 0x02;
> > >       i = 50000;
> > >       do (i--);
> > >       while (i != 0);
> > >     }
> > >   }
> > >
> > >
> > >
> > >
> > _________________________________________________________
> > >
> > > 1874(3?3L3)!A|ALGASgPo?2u(|oAyMO)!A?E3u(M--A?a)...
> > >   ?V800-o|UPs|UHit?a?1aAn!
> > >   Over 800 latest ringtones, only on Yahoo!
> > >   http://ringtone.yahoo.com.hk
> > >
> > >         
> > >
> > >
> > >
> > >
> > >   .
> > >
> > >
> > >
> > >   ">http://docs.yahoo.com/info/terms/
> >
> >
> 
> 
> 
> ------------------------ Yahoo! Groups Sponsor 
> ---------------------~-->
> Get 128 Bit SSL Encryption!
> http://us.click.yahoo.com/JjlUgA/vN2EAA/kG8FAA/CFFolB/TM
> --------------------------
> -------~->
> 
> .
> 
>  
> 
> ">http://docs.yahoo.com/info/terms/ 
> 
> 
> 

Paul,

The calculation that requires "double precision" is given by the
formula:
   Result = A * acos[sin(x1)*sin(x2)+cos(x1)*cos(x2)*cos(y2-y1)]
It calculates a distance based on latitude (rad) and longitude (rad) values.
A 32-bit fp gives to much deviation from the "real" value, compared to
a
off-chip emulated 64-bits fp.
So, for best accuracy 64-bits fp should be used. That's why.

Are you refering to the v4.01 fpp of TI?
Can you give more info on that compiler that supports
64-bit doubles and competent trig lib for the MSP430?
Can such lib be integrated somehow in the IAR environment?

Nico

----- Original Message -----
From: "Paul Curtis" <plc@plc@...>
To: <msp430@msp4...>
Sent: Sunday, October 27, 2002 8:36 AM
Subject: RE: [msp430] IAR and AQ430 floating point library size


> Why do you need 64-bit floating-point?  Given that
IAR support only
> 32-bit fp with a 24-bit mantissa, your only hope is a compiler with
> 64-bit doubles and a 53-bit mantissa.  I do know of one for the MSP430
> with 64-bit doubles and a competent trig library, but I still wonder why
> such precision is required.  Can you elucidate?
>
> -- Paul.
>
> > -----Original Message-----
> > From: Nico_Resiproc [mailto:N.Arends@N.Ar...]
> > Sent: 27 October 2002 03:25
> > To: msp430@msp4...
> > Subject: Re: [msp430] IAR and AQ430 floating point library size
> >
> >
> > Hi there,
> >
> > Just picking up the discussion about FPP.
> > I'm working with the full licienced version of IAR WB,
> > already two years now. Upgrading my "old" 1.24 version to
the
> > 1.26 version will be charged by IAR with G400.00 GBP
> > (!!!!!!!!!) while having already spent so much money on the
> > IAR package. What is their policy towards programmers like us?
> >
> > Anyhow, I need a double precision Floating Point (multiply
> > cos and acos
> > calculations) on a MSP430F149 device.
> > The IAR math lib really has a poor performance (lots of
> > rounding errors and only 7 digits resolution). Can anybody
> > tell me whether the TI FPP v4.01 has a better performance,
> > and how to integrate these routines in my C program. Can it
> > be done with the 1.24 version of IAR, as I understood that TI
> > FP formats are not supported by IAR (float and double are
> > treated the same way).
> >
> > I really hope this discussion proceeds, since floating point
> > is an important issue after all.
> >
> > Nico
> >
> > ----- Original Message -----
> > From: "To chi kin" <to_chi_kin@to_c...>
> > To: <msp430@msp4...>
> > Sent: Wednesday, October 23, 2002 6:30 AM
> > Subject: Re: [msp430] IAR and AQ430 floating point library size
> >
> >
> > > Dear Kris,
> > >
> > > Thanks for you advice!
> > >
> > > So, I also heard T.I. has a Floating Point Package,
> > > FPP, v4.01 for T.I. Assembler and IAR. How do I update
> > > it to IAR and does it help the floating point
> > > functionality of IAR? (I am currently using v1.26A
> > > evaluation version.)
> > >
> > > By the way, where to get T.I. assembler and simulator?
> > >
> > > have a good day
> > > Ken
> > >
> > >
> > >  --- Kris De Vos <microbit@micr...>
> > > ao?lDo?oRe!G> Hi Ken,
> > > >
> > > > As you indicate concern for floating point, I should
> > > > point out a few floating point
> > > > issues on EW430 :
> > > >
> > > > 1.    Don't expect too good precision of IAR floats
> > > > for MSP430 . It's full of rounding errors that I
> > > > don't get with other
> > > >        tools.
> > > >        Furthermore, be VERY careful when you store
> > > > results with functions like sscanf(). It STILL
> > > > happily writes
> > > >        floats in odd-alignment at certain
exceptions.........
> > > >        (The best way is to check alignment yourself
> > > > at runtime, and adjust it in your own S/W , because
> > > > it
> > > >        indeed is not always possible for the
> > > > compiler nor linek to know about runtime, and
> > > > actually is impossible.
> > > >        (At least the "new tool" I'm testing
prompts
> > > > an "odd alignment" possibility, nowhere to be seen
> > > > with EW430 after
> > > >        18 months of promises)
> > > > 2.    Be careful when it is possible to come across
> > > > NaNs (Not a Number), or + and - infinities.
> > > >       Try giving +/- INF to IAR's printf()
> > > > .................. It never returns.
> > > >       I've queried this with IAR about 1 year ago,
> > > > and I was told not to feed NANs to printf() ......
> > > >       "Not Good Enough"...
> > > >
> > > > If you are specifically after floating point
> > > > operation, you *might* not have your needs fulfilled
> > > > on EW430....
> > > > Each case is different, but my specific code
> > > > couldn't afford to (and shouldn't have to !) check
> > > > for NaNs etc. at runtime
> > > > before I call printf().
> > > >
> > > > Printf() should handle that itself.........
> > > >
> > > > Kris
> > > >
> > > >   ----- Original Message -----
> > > >   From: To chi kin
> > > >   To: msp430@msp4...
> > > >   Sent: Monday, October 21, 2002 7:20 PM
> > > >   Subject: [msp430] IAR and AQ430 floating point
> > > > library size
> > > >
> > > >
> > > >   Dear all,
> > > >
> > > >   Once again, I am a newbee for MSP430. I am still
> > > >   searching for a right C toolchain for my 1st
> > > > MSP430
> > > >   project.
> > > >
> > > >   And floating point support is one of my major
> > > > concern,
> > > >   so I modify the MSP430F413 FET C example a bit to
> > > > try
> > > >   it out. I just want to test a floating +, - , *, /
> > > >   library size. And I wondering the result. And
> > > > except
> > > >   the C source code, I change nothing regarding the
> > > >   complier or linker setting?
> > > >
> > > >   Generated code size:
> > > >   IAR: 808 byte
> > > >   AQ430: 3002 byte
> > > >
> > > >   Is that the truth? Ok, if that's the truth! I also
> > > >   feel more confortable when I pay so much $$$ for
> > > > it.
> > > >
> > > >   Thanks in advance!
> > > >
> > > >   have a good day
> > > >   Ken
> > > >
> > > >   test code:
> > > >   #include  <msp430x41x.h>
> > > >
> > > >   float a, b, c;
> > > >
> > > >   void main(void)
> > > >   {
> > > >
> > > >     WDTCTL = WDTPW + WDTHOLD;
> > > >     P5DIR |= 0x02;
> > > >
> > > >         a = 100.0;
> > > >         b = 2.5;
> > > >         c = a + b;
> > > >         c = a * b;
> > > >         c = a / b;
> > > >         c = a - b;
> > > >
> > > >     for (;;)
> > > >     {
> > > >       unsigned int i;
> > > >
> > > >       P5OUT ^= 0x02;
> > > >       i = 50000;
> > > >       do (i--);
> > > >       while (i != 0);
> > > >     }
> > > >   }
> > > >
> > > >
> > > >
> > > >
> > > _________________________________________________________
> > > >
> > > > 1874(3?3L3)!A|ALGASgPo?2u(|oAyMO)!A?E3u(M--A?a)...
> > > >   ?V800-o|UPs|UHit?a?1aAn!
> > > >   Over 800 latest ringtones, only on Yahoo!
> > > >   http://ringtone.yahoo.com.hk
> > > >
> > > >         
> > > >
> > > >
> > > >
> > > >
> > > >   .
> > > >
> > > >
> > > >
> > > >   ">http://docs.yahoo.com/info/terms/
> > >
> > >
> >
> >
> >
> > ------------------------ Yahoo! Groups Sponsor
> > ---------------------~-->
> > Get 128 Bit SSL Encryption!
> > http://us.click.yahoo.com/JjlUgA/vN2EAA/kG8FAA/CFFolB/TM
> > --------------------------
> > -------~->
> >
> > .
> >
> >
> >
> > ">http://docs.yahoo.com/info/terms/
> >
> >
> >
>
>
> .
>
>
>
> ">http://docs.yahoo.com/info/terms/
>
>


Nico,

> The calculation that requires "double
precision" is given by 
> the formula:
>    Result = A * acos[sin(x1)*sin(x2)+cos(x1)*cos(x2)*cos(y2-y1)]
> It calculates a distance based on latitude (rad) and 
> longitude (rad) values. A 32-bit fp gives to much deviation 
> from the "real" value, compared to a off-chip emulated 
> 64-bits fp. So, for best accuracy 64-bits fp should be used. 
> That's why.

Hmm.  Ok.  I'll go away and play.

> Are you refering to the v4.01 fpp of TI?

Nope.

> Can you give more info on that compiler that
supports
> 64-bit doubles and competent trig lib for the MSP430?

It's Kris' latest toy, the "beta" compiler and IDE. 
However, 64-bit is
expensive both in speed and accuracy, but a hardware multiplier helps.
As I wrote the 32-bit and 64-bit IEEE routines and the 8, 16, 32, and
64-bit integer routines for the MSP430 compiler, plus the full C99 trig
library, I have some experience with this stuff.

> Can such lib be integrated somehow in the IAR
environment?

Not really.  AFAIK, the IAR compiler treats float and double as one and
the same, and so there is no way for a user to provide 64-bit floating
point.  However, it is possible to compute such things using fixed
point, so perhaps you can do that if you wish to stick with IAR?  Ahh.
I see IAR doesn't support 64-bit ints and unsigneds.  How quaint.
It's even harder if you don't have *any* 64-bit type.

-- Paul.

> ----- Original Message -----
> From: "Paul Curtis" <plc@plc@...>
> To: <msp430@msp4...>
> Sent: Sunday, October 27, 2002 8:36 AM
> Subject: RE: [msp430] IAR and AQ430 floating point library size
> 
> 
> > Why do you need 64-bit floating-point?  Given that IAR support only 
> > 32-bit fp with a 24-bit mantissa, your only hope is a compiler with 
> > 64-bit doubles and a 53-bit mantissa.  I do know of one for 
> the MSP430 
> > with 64-bit doubles and a competent trig library, but I 
> still wonder 
> > why such precision is required.  Can you elucidate?
> >
> > -- Paul.
> >
> > > -----Original Message-----
> > > From: Nico_Resiproc [mailto:N.Arends@N.Ar...]
> > > Sent: 27 October 2002 03:25
> > > To: msp430@msp4...
> > > Subject: Re: [msp430] IAR and AQ430 floating point library size
> > >
> > >
> > > Hi there,
> > >
> > > Just picking up the discussion about FPP.
> > > I'm working with the full licienced version of IAR WB, 
> already two 
> > > years now. Upgrading my "old" 1.24 version to the 1.26 
> version will 
> > > be charged by IAR with G400.00 GBP
> > > (!!!!!!!!!) while having already spent so much money on the IAR 
> > > package. What is their policy towards programmers like us?
> > >
> > > Anyhow, I need a double precision Floating Point 
> (multiply cos and 
> > > acos
> > > calculations) on a MSP430F149 device.
> > > The IAR math lib really has a poor performance (lots of rounding 
> > > errors and only 7 digits resolution). Can anybody tell me whether

> > > the TI FPP v4.01 has a better performance, and how to integrate 
> > > these routines in my C program. Can it be done with the 
> 1.24 version 
> > > of IAR, as I understood that TI FP formats are not 
> supported by IAR 
> > > (float and double are treated the same way).
> > >
> > > I really hope this discussion proceeds, since floating 
> point is an 
> > > important issue after all.
> > >
> > > Nico
> > >
> > > ----- Original Message -----
> > > From: "To chi kin" <to_chi_kin@to_c...>
> > > To: <msp430@msp4...>
> > > Sent: Wednesday, October 23, 2002 6:30 AM
> > > Subject: Re: [msp430] IAR and AQ430 floating point library size
> > >
> > >
> > > > Dear Kris,
> > > >
> > > > Thanks for you advice!
> > > >
> > > > So, I also heard T.I. has a Floating Point Package,
> > > > FPP, v4.01 for T.I. Assembler and IAR. How do I update
> > > > it to IAR and does it help the floating point functionality
of 
> > > > IAR? (I am currently using v1.26A evaluation version.)
> > > >
> > > > By the way, where to get T.I. assembler and simulator?
> > > >
> > > > have a good day
> > > > Ken
> > > >
> > > >
> > > >  --- Kris De Vos <microbit@micr...> ao?lDo?oRe!G>
Hi 
> > > > Ken,
> > > > >
> > > > > As you indicate concern for floating point, I should 
> point out a 
> > > > > few floating point issues on EW430 :
> > > > >
> > > > > 1.    Don't expect too good precision of IAR
floats
> > > > > for MSP430 . It's full of rounding errors that I
> > > > > don't get with other
> > > > >        tools.
> > > > >        Furthermore, be VERY careful when you store 
> results with 
> > > > > functions like sscanf(). It STILL happily writes
> > > > >        floats in odd-alignment at certain
exceptions.........
> > > > >        (The best way is to check alignment yourself
> > > > > at runtime, and adjust it in your own S/W , because
> > > > > it
> > > > >        indeed is not always possible for the
> > > > > compiler nor linek to know about runtime, and
> > > > > actually is impossible.
> > > > >        (At least the "new tool" I'm
testing prompts
> > > > > an "odd alignment" possibility, nowhere to be
seen
> > > > > with EW430 after
> > > > >        18 months of promises)
> > > > > 2.    Be careful when it is possible to come across
> > > > > NaNs (Not a Number), or + and - infinities.
> > > > >       Try giving +/- INF to IAR's printf()
> > > > > .................. It never returns.
> > > > >       I've queried this with IAR about 1 year ago,
> > > > > and I was told not to feed NANs to printf() ......
> > > > >       "Not Good Enough"...
> > > > >
> > > > > If you are specifically after floating point
> > > > > operation, you *might* not have your needs fulfilled
> > > > > on EW430....
> > > > > Each case is different, but my specific code
> > > > > couldn't afford to (and shouldn't have to !)
check
> > > > > for NaNs etc. at runtime
> > > > > before I call printf().
> > > > >
> > > > > Printf() should handle that itself.........
> > > > >
> > > > > Kris
> > > > >
> > > > >   ----- Original Message -----
> > > > >   From: To chi kin
> > > > >   To: msp430@msp4...
> > > > >   Sent: Monday, October 21, 2002 7:20 PM
> > > > >   Subject: [msp430] IAR and AQ430 floating point
library size
> > > > >
> > > > >
> > > > >   Dear all,
> > > > >
> > > > >   Once again, I am a newbee for MSP430. I am still
> > > > >   searching for a right C toolchain for my 1st
> > > > > MSP430
> > > > >   project.
> > > > >
> > > > >   And floating point support is one of my major
> > > > > concern,
> > > > >   so I modify the MSP430F413 FET C example a bit to
> > > > > try
> > > > >   it out. I just want to test a floating +, - , *, /
> > > > >   library size. And I wondering the result. And
> > > > > except
> > > > >   the C source code, I change nothing regarding the
> > > > >   complier or linker setting?
> > > > >
> > > > >   Generated code size:
> > > > >   IAR: 808 byte
> > > > >   AQ430: 3002 byte
> > > > >
> > > > >   Is that the truth? Ok, if that's the truth! I
also
> > > > >   feel more confortable when I pay so much $$$ for
> > > > > it.
> > > > >
> > > > >   Thanks in advance!
> > > > >
> > > > >   have a good day
> > > > >   Ken
> > > > >
> > > > >   test code:
> > > > >   #include  <msp430x41x.h>
> > > > >
> > > > >   float a, b, c;
> > > > >
> > > > >   void main(void)
> > > > >   {
> > > > >
> > > > >     WDTCTL = WDTPW + WDTHOLD;
> > > > >     P5DIR |= 0x02;
> > > > >
> > > > >         a = 100.0;
> > > > >         b = 2.5;
> > > > >         c = a + b;
> > > > >         c = a * b;
> > > > >         c = a / b;
> > > > >         c = a - b;
> > > > >
> > > > >     for (;;)
> > > > >     {
> > > > >       unsigned int i;
> > > > >
> > > > >       P5OUT ^= 0x02;
> > > > >       i = 50000;
> > > > >       do (i--);
> > > > >       while (i != 0);
> > > > >     }
> > > > >   }
> > > > >
> > > > >
> > > > >
> > > > >
> > > > _________________________________________________________
> > > > >
> > > > > 1874(3?3L3)!A|ALGASgPo?2u(|oAyMO)!A?E3u(M--A?a)...
> > > > >   ?V800-o|UPs|UHit?a?1aAn!
> > > > >   Over 800 latest ringtones, only on Yahoo!
> > > > >   http://ringtone.yahoo.com.hk
> > > > >
> > > > >         
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >   .
> > > > >
> > > > >
> > > > >
> > > > >   ">http://docs.yahoo.com/info/terms/
> > > >
> > > >
> > >
> > >
> > >
> > > ------------------------ Yahoo! Groups Sponsor
> > > ---------------------~-->
> > > Get 128 Bit SSL Encryption!
> > > http://us.click.yahoo.com/JjlUgA/vN2EAA/kG8FAA/CFFolB/TM
> > > --------------------------
> > > -------~->
> > >
> > > .
> > >
> > >
> > >
> > > ">http://docs.yahoo.com/info/terms/
> > >
> > >
> > >
> >
> >
> > .
> >
> >
> >
> > ">http://docs.yahoo.com/info/terms/
> >
> >
> 
> 
> 
> ------------------------ Yahoo! Groups Sponsor 
> ---------------------~-->
> Get 128 Bit SSL Encryption!
> http://us.click.yahoo.com/JjlUgA/vN2EAA/kG8FAA/CFFolB/TM
> --------------------------
> -------~->
> 
> .
> 
>  
> 
> ">http://docs.yahoo.com/info/terms/ 
> 
> 
> 

Nico,
One way to slightly improve the accuracy is to transform the formula 
for the argument of acos as:
cos (x2-x1) + cos(x1)*cos(x2) *c
where c = 1 -cos(y2-y1)
This way you avoid the computation of one trig function, and a 
floating point multiply.
May not be enough for your purpose, though.


Michel
--- In msp430@y..., "Nico_Resiproc" <N.Arends@r...> wrote:
> Paul,
> 
> The calculation that requires "double precision" is given by the 
formula:
>    Result = A * acos[sin(x1)*sin(x2)+cos(x1)*cos(x2)*cos(y2-y1)]
> It calculates a distance based on latitude (rad) and longitude 
(rad) values.
> A 32-bit fp gives to much deviation from the
"real" value, compared 
to a
> off-chip emulated 64-bits fp.
> So, for best accuracy 64-bits fp should be used. That's why.
> 
> Are you refering to the v4.01 fpp of TI?
> Can you give more info on that compiler that supports
> 64-bit doubles and competent trig lib for the MSP430?
> Can such lib be integrated somehow in the IAR environment?
> 
> Nico
> 
> ----- Original Message -----
> From: "Paul Curtis" <plc@r...>
> To: <msp430@y...>
> Sent: Sunday, October 27, 2002 8:36 AM
> Subject: RE: [msp430] IAR and AQ430 floating point library size
> 
> 
> > Why do you need 64-bit floating-point?  Given that IAR support 
only
> > 32-bit fp with a 24-bit mantissa, your only
hope is a compiler 
with
> > 64-bit doubles and a 53-bit mantissa.  I do
know of one for the 
MSP430
> > with 64-bit doubles and a competent trig
library, but I still 
wonder why
> > such precision is required.  Can you
elucidate?
> >
> > -- Paul.
> >
> > > -----Original Message-----
> > > From: Nico_Resiproc [mailto:N.Arends@r...]
> > > Sent: 27 October 2002 03:25
> > > To: msp430@y...
> > > Subject: Re: [msp430] IAR and AQ430 floating point library size
> > >
> > >
> > > Hi there,
> > >
> > > Just picking up the discussion about FPP.
> > > I'm working with the full licienced version of IAR WB,
> > > already two years now. Upgrading my "old" 1.24 version
to the
> > > 1.26 version will be charged by IAR with G400.00 GBP
> > > (!!!!!!!!!) while having already spent so much money on the
> > > IAR package. What is their policy towards programmers like us?
> > >
> > > Anyhow, I need a double precision Floating Point (multiply
> > > cos and acos
> > > calculations) on a MSP430F149 device.
> > > The IAR math lib really has a poor performance (lots of
> > > rounding errors and only 7 digits resolution). Can anybody
> > > tell me whether the TI FPP v4.01 has a better performance,
> > > and how to integrate these routines in my C program. Can it
> > > be done with the 1.24 version of IAR, as I understood that TI
> > > FP formats are not supported by IAR (float and double are
> > > treated the same way).
> > >
> > > I really hope this discussion proceeds, since floating point
> > > is an important issue after all.
> > >
> > > Nico
> > >
> > > ----- Original Message -----
> > > From: "To chi kin" <to_chi_kin@y...>
> > > To: <msp430@y...>
> > > Sent: Wednesday, October 23, 2002 6:30 AM
> > > Subject: Re: [msp430] IAR and AQ430 floating point library size
> > >
> > >
> > > > Dear Kris,
> > > >
> > > > Thanks for you advice!
> > > >
> > > > So, I also heard T.I. has a Floating Point Package,
> > > > FPP, v4.01 for T.I. Assembler and IAR. How do I update
> > > > it to IAR and does it help the floating point
> > > > functionality of IAR? (I am currently using v1.26A
> > > > evaluation version.)
> > > >
> > > > By the way, where to get T.I. assembler and simulator?
> > > >
> > > > have a good day
> > > > Ken
> > > >
> > > >
> > > >  --- Kris De Vos <microbit@c...>
> > > > ao?lDo?oRe!G> Hi Ken,
> > > > >
> > > > > As you indicate concern for floating point, I should
> > > > > point out a few floating point
> > > > > issues on EW430 :
> > > > >
> > > > > 1.    Don't expect too good precision of IAR
floats
> > > > > for MSP430 . It's full of rounding errors that I
> > > > > don't get with other
> > > > >        tools.
> > > > >        Furthermore, be VERY careful when you store
> > > > > results with functions like sscanf(). It STILL
> > > > > happily writes
> > > > >        floats in odd-alignment at certain 
exceptions.........
> > > > >        (The best way is to
check alignment yourself
> > > > > at runtime, and adjust it in your own S/W , because
> > > > > it
> > > > >        indeed is not always possible for the
> > > > > compiler nor linek to know about runtime, and
> > > > > actually is impossible.
> > > > >        (At least the "new tool" I'm
testing prompts
> > > > > an "odd alignment" possibility, nowhere to be
seen
> > > > > with EW430 after
> > > > >        18 months of promises)
> > > > > 2.    Be careful when it is possible to come across
> > > > > NaNs (Not a Number), or + and - infinities.
> > > > >       Try giving +/- INF to IAR's printf()
> > > > > .................. It never returns.
> > > > >       I've queried this with IAR about 1 year ago,
> > > > > and I was told not to feed NANs to printf() ......
> > > > >       "Not Good Enough"...
> > > > >
> > > > > If you are specifically after floating point
> > > > > operation, you *might* not have your needs fulfilled
> > > > > on EW430....
> > > > > Each case is different, but my specific code
> > > > > couldn't afford to (and shouldn't have to !)
check
> > > > > for NaNs etc. at runtime
> > > > > before I call printf().
> > > > >
> > > > > Printf() should handle that itself.........
> > > > >
> > > > > Kris
> > > > >
> > > > >   ----- Original Message -----
> > > > >   From: To chi kin
> > > > >   To: msp430@y...
> > > > >   Sent: Monday, October 21, 2002 7:20 PM
> > > > >   Subject: [msp430] IAR and AQ430 floating point
> > > > > library size
> > > > >
> > > > >
> > > > >   Dear all,
> > > > >
> > > > >   Once again, I am a newbee for MSP430. I am still
> > > > >   searching for a right C toolchain for my 1st
> > > > > MSP430
> > > > >   project.
> > > > >
> > > > >   And floating point support is one of my major
> > > > > concern,
> > > > >   so I modify the MSP430F413 FET C example a bit to
> > > > > try
> > > > >   it out. I just want to test a floating +, - , *, /
> > > > >   library size. And I wondering the result. And
> > > > > except
> > > > >   the C source code, I change nothing regarding the
> > > > >   complier or linker setting?
> > > > >
> > > > >   Generated code size:
> > > > >   IAR: 808 byte
> > > > >   AQ430: 3002 byte
> > > > >
> > > > >   Is that the truth? Ok, if that's the truth! I
also
> > > > >   feel more confortable when I pay so much $$$ for
> > > > > it.
> > > > >
> > > > >   Thanks in advance!
> > > > >
> > > > >   have a good day
> > > > >   Ken
> > > > >
> > > > >   test code:
> > > > >   #include  <msp430x41x.h>
> > > > >
> > > > >   float a, b, c;
> > > > >
> > > > >   void main(void)
> > > > >   {
> > > > >
> > > > >     WDTCTL = WDTPW + WDTHOLD;
> > > > >     P5DIR |= 0x02;
> > > > >
> > > > >         a = 100.0;
> > > > >         b = 2.5;
> > > > >         c = a + b;
> > > > >         c = a * b;
> > > > >         c = a / b;
> > > > >         c = a - b;
> > > > >
> > > > >     for (;;)
> > > > >     {
> > > > >       unsigned int i;
> > > > >
> > > > >       P5OUT ^= 0x02;
> > > > >       i = 50000;
> > > > >       do (i--);
> > > > >       while (i != 0);
> > > > >     }
> > > > >   }
> > > > >
> > > > >
> > > > >
> > > > >
> > > > _________________________________________________________
> > > > >
> > > > > 1874(3?3L3)!A|ALGASgPo?2u(|oAyMO)!A?E3u(M--A?a)...
> > > > >   ?V800-o|UPs|UHit?a?1aAn!
> > > > >   Over 800 latest ringtones, only on Yahoo!
> > > > >   http://ringtone.yahoo.com.hk
> > > > >
> > > > >         
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >   To unsubscribe from the msp430 group, send an
> > > > > email to:
> > > > >   msp430-unsubscribe@e...
> > > > >
> > > > >
> > > > >
> > > > >   ">http://docs.yahoo.com/info/terms/
> > > >
> > > >
> > >
> > >
> > >
> > > ------------------------ Yahoo! Groups Sponsor
> > > ---------------------~-->
> > > Get 128 Bit SSL Encryption!
> > > http://us.click.yahoo.com/JjlUgA/vN2EAA/kG8FAA/CFFolB/TM
> > > --------------------------
> > > -------~->
> > >
> > > To unsubscribe from the msp430 group, send an email to:
> > > msp430-unsubscribe@e...
> > >
> > >
> > >
> > > ">http://docs.yahoo.com/info/terms/
> > >
> > >
> > >
> >
> >
> > To unsubscribe from the msp430 group, send an email to:
> > msp430-unsubscribe@e...
> >
> >
> >
> > ">http://docs.yahoo.com/info/terms/
> >
> >



The 2024 Embedded Online Conference