Hi everyone,
I am following up on that ADC config issue, as I have troubles to make my project (based on a 16F884) to work.

Here is the hardware part:

The project is a nixie clock with other fancy stuffs (thermometer, hygrometer...). That is, I use the analog module to read various sensors. Additionally, due to the lack of I/O, I use an "analog" keypad consisting of 3 pushbuttons that each produce a different voltage (with resistor combinations).

So far, I can only get erratic values out of the ADC no matter which A/D pin I'm reading... It is varying as if the pin was connected to an antenna and reading noise (with completely random variations from min to max!). I also tried to ground one of the analog I/O to read it, and the results are actually pulled towards 0, but can still get as high as 300.

I don't thing the hardware is wrong on that one, I have a steady 5V powersupply, checked with a scope, also sensor output were checked and don't fluctuate more than a few mV. I also included capacitors between inputs and ground... and everything is mounted on a nice dual side PCB.

The only source of noise would be my buck-boost switch, that I use to get the 180V for the tubes, but I don't see much noise when I look on the analog lines with my scope.

This is why i'm suspecting a software or config problem, but can't work it out. And since there's issue with this family I'd like to make sure i'm not doing anything wrong.
Here is parts of my program, I added the workaround posted above in the config:

DEFINE OSC 20
DEFINE LOADER_USED 1

'set up the ADC with special workaround for the 16F88x family
DEFINE ADC_BITS 10 ' ADCIN resolution (Bits)
DEFINE ADC_CLOCK 0 ' Work around that sets Vref bits in ADCON1
DEFINE ADC_SAMPLEUS 50 ' ADC sampling time (uSec)
ADCON0=ADCON0 | %11000000 ' Work around that sets ADCS in ADCON0

'Set oscillator configuration to run on external oscillator
OSCCON = %00000000

'Set comparators off
CM1CON0 = %00000000
CM2CON0 = %00000000

'Set analog input AN0, AN1, AN2, AN3, AN4 and AN5
ANSEL = %00011111
ANSELH = %00000000
ADCON1 = %00000000
'ADCON0 = %01000001

'Set PortA as input or output
PORTA = %00000000
TRISA = %00101111
'Set entire PortB as digital input
PORTB = %00000000
TRISB = %00000000
'Set entire PortC as digital input
PORTC = %00000000
TRISC = %00000000
'Set entire PortD as digital input
PORTD = %00000000
TRISD = %00000000
'Set PortE0 as input or output
PORTE = %00000000
TRISE = %00000001

---------------------------

'************************************************* ******
'Read the keypad
'************************************************* ******
ReadPushButtons:
'Mode/UP 0.47V
'Date/DOWN 2.6V
'SET 5.0V

ADCIN 5, ButtonValue

Return

---------------------------

All other (non analog) functions are working great otherwise...!
Any help apreciated