Hi Hank
Why 800 or even 1024 steps? Why not 256? You may need even lesser!!!
Yes the lookup table approach is appropriate. However, since the majority brighness changes happen in the bottom segment, you need a very tiny step size/value changes at those levels. The easiest way to create this table of PWM values is to take your favourite desktop programming language and write a small program that will print out the PWM values. I have been used to using QuickBasic from MS for such stuff.
Code:
j = 1
for i = 0 to 256 step j ' keep widening the step size as we don't need high resolution at larger PWM values
print log(i)*256;","; ' print a value like this "val," and stay on the line
j = j+1
next
This, of course, is not the best code, but, just a guideline to get you moving.
Regards
Bookmarks