More likely you have the wrong JUSTIFICATION if you are using a WORD variable with your ADC. Check your DATASHEET for your PICs ADC Register settings and the ADCIN defines for the correct number of BITS you have set. If you are using the 16F877 (your first post)... you should have a line something like...
ADCON1.7=1
...somewhere in the initialisation section of your program. To find out in detail what this means, look in the ADC Section of the Datasheet for your PIC. But when using a 8-Bits from your ADC, the Result should be LEFT Justified, whilst when using more than 8-Bits, the ADC Result should be RIGHT Justified (which without seeing any code from you is what I think you should be doing).
Another reason for your results jumping about is that your sampling time could be too short.
Bookmarks