I have been reading this thread for a few days now, it is like one of those really bad films that they sometimes (often?) show on television.
You start watching it, decide it is bad, but you cannot leave it, it is so bad that you just have to keep watching, there has to be a good bit coming up soon, but there never is.
To supplement the efforts of JonSea and be80be and to try in my own way to summarise what they have been saying, I offer the following few words:
1 Connect a bunch of resistors to make a potential divider.
2 Connect the junctions of the resistors to push button switches.
3 Connect the "common" of the switches to an analog input on a PIC micro.
4 Before writing any code, test the hardware.
4a Apply power.
4b Press the switches, one at a time.
4c Use a DMM and measure the voltage at the PIC input pin.
4d Write down the results.
4e Look at the results, are the voltages sensible? Do they step up/down as per the button pushes? Do they correspond to the values calculated in the design process?
4f If all is well, move to step 5. If all is not well, debug the hardware.
5 Write some code:
5a Initialise the PIC, pay special attention to the ADC.
5b Read the ADC, and display the ADC result on an LCD display.
(Note here that the result from the ADC is just a number in the range 0 to 1023. Don't mess about trying to convert it to a voltage, just display the raw ADC value).
6 Now test to code:
6a Apply power.
6b Press the switches, one at a time.
6c Read the numbers from the LCD.
6d Write down the results.
6e Look at the results, are the numbers sensible? Do they step up/down as per the button pushes? Do they correspond to the values calculated in the design process?
6f If all is well, move on and develop the CASE statement. If all is not well, debug the simple bit of code which you just wrote.
It is not that difficult.
JimB