> All the meteorological websites I've been to, offer formulae with > high precision resolution, something I don't think I really need. I'm > also trying not to use floating point maths. Why? Speed certainly can't be an issue when adjusting climate controls in a greenhouse. Otherwise, 24 bit floating point probably saves memory over using 32 bit fixed point, and is certainly easier to program because you don't have to worry about where the fixed point is. The 16 bit precision of 24 bit floating point numbers is usually plenty when dealing with real world measurments, as certainly seems the case here. > The main sticking point > is the log10 function all the other constants I can convert to whole > numbers. It might be easier to implement a Log2 function. Log10 is then just one multiply away, although you can probably adjust some other constant in the equation to eliminate the extra multiply. There are lots of ways of calculating "complex" functions like Log, Sine, etc. Most envolve some iterative techniques, but you've got lots of cycles. If you start using floating point on the PIC, you might want to check out my PREPIC MPASM preprocessor at http://www.embedinc.com/pic. It has a bunch of inline functions for doing floating point operations on constants, then converting the result to hex notation that the assembler can understand. This makes the source code much more readable. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu