If your chip as ADC, then you should have a look at PBP ADCIN command.

J-P