Thanks everyone for your replies.
My original motivation for asking this question is how can a complete beginner with both PIC microcontrollers and XC8 read the output of the ADC without using a UART or serial bit banging? Up to now serial has been trivial as we have used the CCS C compiler. XC8 is a bit more involved.
I'm writing code that builds GRADUALLY in complication and want to keep code as simple as possible and then build it up gradually.
I thought it would also be interesting as a thought experiment for a situation where a computer/serial link is not available.
I think using 4 different coloured LED's and then having them indicate 1000,100,10 and units would be the simplest method with a pause in between units. This would be for a 10 bit ADC result.
I once designed in an led that flashed at a rate proportional to the charge level of an ultra-capacitor bank. It took about 5 minutes to charge the bank. About the time you have a seizure from watching the LED, the bank was charged.
My original motivation for asking this question is how can a complete beginner with both PIC microcontrollers and XC8 read the output of the ADC without using a UART or serial bit banging? Up to now serial has been trivial as we have used the CCS C compiler. XC8 is a bit more involved.
Personally, I don't think writing code to serial bit-bang the data is much more difficult that devising code to flash a single LED in a human readable pattern.
A simple LED flash pattern could be two short flashes for a ONE bit or a single short flash for a ZERO bit, then a pause and the next bit. Longer pause between 10bit words. That'd be pretty human readable combined with a pen and paper.