Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/28/08 06:09
Read: times


 
#157806 - Just asking your opinion
Hi Friends,

This post is to ask your opinion for following.

In current system I am working on, I need to store a few numbers & do some statistical calculation on them, like minimum, maximum, mean, difference, stadard deviation etc...

Send all these calculation on some other port (P0 as parallel port) in string format.

I have formulee related to all required calculation.

Now where do I get the sample values from?
I get the sample values from some peripheral on UART. Hence I get it as a "string", I need "float" for the calculations. Now can anyone give me his/her opinion that how should I store the samples values, as "string" or "float"?

Here one thing is that I may need to provide back up for one set of samples(the last done). Hence I need to store it in the EEPROM (24cxx this I2C routines are also ready).


Points to be considored for storing as...
STRING
1. Read / Write to EEPROM is easy.
2. Lenght can't be determined.(but has upper limit say 12chars)
3. Needs conversion to float for calculations.

FLOAT
1. Calculations are easy on float
2. Size is compiler dependent.
3. Because of 3 read/ write from EEPROM is difficult(as no of characters depends on compiler, ofcourse sizeof()is possible)

So I have 2 schemes viz...
1. Accept String convert to Float. store, calculate, convert calculations to string & send on second port.

2. Accept Strings store them. convert to float, do calculation. Convert calculations back to String & send

My mind is opting for 2nd scheme. What is your opinion

Looking forward to your opinions.

Regards,
Mahesh

List of 2 messages in thread
TopicAuthorDate
Just asking your opinion            01/01/70 00:00      
   ????            01/01/70 00:00      

Back to Subject List