Here is a liberty basic program I wrote to create a lookup table.
i will never enter tables again
for x = 1 to 255
print "retlw .";
y = int(-.4*x + 64) ' this is the formula line that creates the database
if y <0 then y = 0 ' this table was used for calculating battery voltages
print y; 'based on reading a constant voltage accross a led
print " ; x input is "; 'try it youll like it
print x
next x
i will never enter tables again
for x = 1 to 255
print "retlw .";
y = int(-.4*x + 64) ' this is the formula line that creates the database
if y <0 then y = 0 ' this table was used for calculating battery voltages
print y; 'based on reading a constant voltage accross a led
print " ; x input is "; 'try it youll like it
print x
next x