pic16f877a and mikroc with adc
lock (conversion speed) Select input channel Configure I/O Ports Set respective TRIS registers for input channels Start Conversion and Read Data Trigger ADC conversion Wait for conversion to complete Read digital value Process Data Convert digital value to voltage or other units as need