If you are trying to invert a variable, just subtract it from the maximum value. For an 8 bit #, it's 256 - adval = newval. 10 bit = 1024 - adval = newval. Now you can scale it accordingly.
For the LCD second line, read the PBP manual about LCDOUT. You need to place it at the second line with the apropriate command.
Ron




Bookmarks