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.

Whats the best way for MSP430F5310 to process this math equation?

Other Parts Discussed in Thread: MSP430F5310

So I have this ADC temperature sensor and it reads out a ADC value.  This value needs to be plugged into an algebraic equation to get the Celcius value and then stored into the memory.

The equation is:

temperature(C)=0.052356*(22.361*SQRT(3.5475*10^6-382*(adc value))-38187)


as you can see not overly complicated just a power there and a square root function.  I'm guessing I need to use floating points systems?

My CPU is a MSP430F5310.  What's the best way to go about doing this, in the most EASIEST manner. 

I am not time constraint limited or power limited. I have all the time/energy in the world so I am not optmizing code for that.  I am looking for quick development.

Thanks

  • Vern Yip said:
    What's the best way to go about doing this, in the most EASIEST manner. 

    I see superflous substraction and multiplication in your formula. Before you consider to write any code, you shall optimize formula from math point of view.

    Yes, using float can do the job. What kind of sensor do you use?

**Attention** This is a public forum