I'm having trouble getting more than just one ADC pin to work on my P16877A. I can get pin 2 (A0) to work just fine, but none of the others. I think I'm not setting up the parameters right. Also, do I need to reset something after each sample?

I eventually want to have eight 8-bit dials hooked up to the 8 ADC inputs and sample them constantly (to control music parameters in Max/MSP

Here's the relevant parts of the code. Thanks in advance to whoever has some info!

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

define osc 20
INCLUDE "modedefs.bas"

DEFINE ADC_BITS 8
DEFINE ADC_CLOCK 4
DEFINE ADC_SAMPLEUS 20

TRISA = 255
ADCON1 = %00000010

'------------------------------------------------------------------

pot_pin_2 var PORTA.0 'set potentiometer to go in pin 2 (A0)
pot_pin_3 var PORTA.1 'set potentiometer to go in pin 3 (A1)

'vars for potentiometer info
var_pot_2 var byte
var_pot_3 var byte

main_loop:

ADCIN pot_pin_2, var_pot_2 ' Read pin 2 to var_pot_2
var_pot_2 = (255 - var_pot_2) ' Invert result to match dial direction L/R

serout serial_out_pin,T9600,["Sending POT PIN 2... ",#var_pot_2,10,13]

pause 700

'----------------------------------------------------------

ADCIN pot_pin_3, var_pot_3 ' Read pin 3 to var_pot_3
var_pot_3 = (255 - var_pot_3) ' Invert result to match dial direction

serout serial_out_pin,T9600,["Sending POT PIN 3... ",#var_pot_3,10,13]

pause 700

goto main_loop