How to use adc_ch_read?

Hi there,

I´m using Xbee PRO S2C and I´m with problem to read a analog signal.

I did the basic configurations and put Vref in 3.0 V. When I read my adc1 (xpin 30) it show a wrong value.
For example, I put 2.8 V in adc1 and it show to me 1023, 1015, 1020 …

What am I doing wrong.

Tnx for all