Thank You, Mr. Westfield. Your explanation was quite enlightening, and leaves me with more understanding and a lot less "smoke" on the subject. Perhaps trying to get an education via Outlook and Explorer is not the best way, but it does have it's advantages. Lyle >-----Original Message----- >From: William Chops Westfield [mailto:billw@CISCO.COM] >So... > >We're trying to get preceived linear (smooth) brightness changes in a LED >by matching the (supposedly) logarithmic response of the human eye/etc. > >A "logarithmic series" is one where the next value in the series is >calculated by multiplying the previous value by a constant. > >S0 =3D A >S1 =3D S0 * C =3D A * C >S2 =3D S1 * C =3D A * C * C >S3 =3D S2 * C =3D A * C * C * C > : >Sn =3D A * C^N > >So if S0 =3D 1, and Sn =3D 255, for instance, we know that A =3D 1, and = 255 =3D >C^n, where N is the number of steps in the series. To solve for C, take >the Nth root of both sides C =3D root(255, N) An Nth root is equivilent to >raising to the power 1/N (this is derived from logarithm theory), and this >is the "m" factor that Olin's program calculates, more or less: >m =3D max_out^(1.0/max_in - 1) >m =3D 255^(1/254) > >BillW -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.