Hi all. I've been playing around with software PWM controlling some LEDs. Problem is, as the eye's response to brightness isn't linear, when I simply control the LEDs brightness using an 8 bit value (with no compensation) they don't appear to dim smoothly. So my thought was to take the 8 bit value, use it as an index into a lookup table which would give me a higher bit value (ie a 12 or 14 bit). Here is the problem (as I see it anyways). If I increase the bit resolution of my PWM, the frequency will have to go down (as the PIC is already running at full speed. yes, I could go to an SX chip...I know). So, is there a resolution vs speed balance that anyone has reached that gives optimal frequency and smoothness of the dimming? Also, how do you choose the values for the lookup table? Most commercial theatrical dimmers use a "modified S curve" which is essentially the integral of the area under a sine wave (I think). I'm sure if I had Maple or something (and knew how to use it) I could divide the area into 256 sections and come up with the proper values for the lookup table. But since I don't have access to this high powered math software, what are my options? Plotting out by hand seems only an invitation for frustration. Ideas welcome. Thanks, Josh -- A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. -Douglas Adams -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.