This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSp430F+Support float variables

Other Parts Discussed in Thread: MSP430F5325

I am using MSp430F controller for the first time. We have selected MSP430F5325 for our application of metering. In our application, we need to sample  AC mains 230V  and AC current (5A)  by ADC of MSP430F . ADC outputs value in Integer format . And we need to  do the scaling and calculate the TRMS (root mean square value).We require  to do  square (or multiplication) , divison and square root on float variables. We are using CCSV5.3. Does MSP430F controllers support float variables and their multiplication and division? 

  • kk ss said:
    We require  to do  square (or multiplication) , divison and square root on float variables.

    Want? Likely. Require? Not at all.
    Floats are slow and space-consuming. YOu can do as well with fixed point and proper scaleing.

    Hwoever, just use float and include math.h and the compiler/linker should include the proper library code for float. And don't wonder when your code is too slow for the application.

    And no, the MSPs don't support float in hardware, nor do they support integer division in hardware.
    The available software libraries do. All this is done in software, and the less you use it the faster the program runs.

**Attention** This is a public forum