Okay, I'm overlooking something. This program worked (albeit slowly) on a 16F88.

5 analog pins sample and (after manipulation) produce a high or low to a pin. Here's the correspondence:

AN0 to B5
AN1 to B4
AN2 to B3
AN3 to B2
AN4 to B1

AN5 and AN6 each have the wiper of a different pot on them.

Now, only AN4 to B1 works correctly. B5 is stuck high all the time (from power-up), even with no signal on AN0. The three in between are off if there is no signal but stick high as soon as a small signal is applied and remain that way until power-down.

The pot on AN5 has the correct effect on the one working channel but AN6 does not appear to be working.

Here's what I had in the (totally working) 16F88 version:

DEFINE OSC 8

ANSEL= %01111111
CMCON= %00000111
OSCCON= %01110000
TRISA= %01111111
TRISB= %11000001

ADCON1.7=1

DEFINE ADC_BITS 10
DEFINE ADC_CLOCK 5
DEFINE ADC_SAMPLEUS 12

. . . and here's what I have for the 16F1827:

DEFINE OSC 32

ANSELA= %00011111
ANSELB= %11000000
OSCCON= %11110000
TRISA = %01111111
TRISB = %11000001

ADCON1.7 =1
CM1CON0.7=0
CM2CON0.7=0

DEFINE ADC_BITS 10
DEFINE ADC_CLOCK 6
DEFINE ADC_SAMPLEUS 12

What thing(s) am I failing to do?