In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Tracy Allen wrote: Also there is an application note on the Taos site, "Simplified TSL2550 LUX Calculation for Embedded and Micro Controllers". It is a piecewise linear approximation based on the ratio CH1/CH0. At least they provide you the lookup tables with the break points and C code. And there is similar code in the data sheet for the TSL2560. It still looks kind of, how did you put it? "technically exotic and challenging", with all the chord gain settings in the mix. There are integer methods to do log and antilog calculations, for example, [url]http://www.emesys.com/BS2math3.htm#bitlog[/url]. Base conversion is a constant, for example, log_e(x) = 0.69315 * log_2(x). With integer calculations, the problem is usually one of scaling. Light levels can cover many orders of magnitude, nevertheless, for greenhouse work the optimum range is probably within one order of magnitude. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=162343#m162794 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)