Hi Hank,
Sorry for the late reply. Glad you figured it out. Another slightly more recent version of that Gamma Table program is listed below.
Gamma values of 1.7 to 1.9 worked good for me but it's very much dependent on your LEDs, voltage, hardware, etc..
Cheerful regards, Mike
Code:
' Leo Bodnar's 'antilogarithmic'
' gamma correction algorithm (Mike, K8LH)
'
' JustBASIC (free) interpreter
'
Input "Gamma array size: "; arraysize
Input " Total PWM steps: "; width
Input "Gamma correction: "; gamma ' try 0.5 to 1.0
Input "Entries per line: "; entries '
FOR index = 0 to arraysize-1
dcyval = INT(width^(((index+1)/arraysize)^gamma)+.3)
if(index MOD entries = 0) then
PRINT
PRINT " DW ";
else
PRINT ",";
end if
if(dcyval < 100) then print " ";
if(dcyval < 10) then print " ";
PRINT dcyval;
NEXT index
PRINT
PRINT
REM CLOSE
Bookmarks