I need an 8-bit binary number to make the digital potentiometer I'm using work. I'm using an analog potentiometer connected to the ADC to get that number. It seems to give me a decimal number between 0 - 255. I'm assuming this, because the LABX-1 example program http://melabs.com/samples/LABX1-16F887/adcin3x.htm found here. The ADC_BITS is set to 8 instead of the default 10. But I don't see anywhere in the program where the 8-bit ADCIN is converted to decimal. Yet the LCD displays the value in decimal. So I'm assuming that the ADC output is in decimal. Is that correct? If so, what is the best way to convert it to an 8-bit binary number.
Bookmarks