If you want to read a value from a potentiometer wired into where the p3_y would normally be, you can just access p3_y. The OI handles the analog-to-digital conversion and returns an 8bit value, in the form on an unsigned char.
If you are reading a value from your inputs
Code:
Get_Analog_Value(rc_ana_in01)
is the correct function. This will return a 10-bit number. To scale this to 8 bits, only read the bits 2-9. The simplest way to do this is divide by 4. The syntax to output this is
Code:
printf("Label: %3d", (int)(Get_Analog_Value(rc_ana_in01) / 4))
Hope this helps.