Aaron, I haven't time to compare your routine with this one, but I notice there's no mention of CMCON in yours Also I would be very reluctant to try new code on a PIC that may be damaged > ; GP1 - Not used. (Seems to be blown on this particular chip.) movlw b'00010111' ; 1 GP4=AN3 analogue i/p ; 1 /INT ; 1 Vref on CIN- pin ; 1 CIN+ comparator i/p movwf trisio movlw b'10000000' ;pullups off movwf option_reg movlw b'01011000' ; 101 16 Tosc, Tad=4us @ 4MHz IntRC ; 1 AN3 as ADC channel movwf ansel bank0 clrf gpio movlw b'00000111' ;GPIO 0,1,2 as digital movwf cmcon movlw b'11001100' ; 1 right-justified ; 1 Vref on GP1 input pin ; 11 Select AN3 movwf adcon0 bcf intcon,intf bsf intcon,inte sleep ;wait for /INT wake up bcf intcon,inte bcf intcon,intf bsf opto25 ;power-up Vref (also Acks 18F452) bsf adcon0,adon call t_loop ;2ms power-up delay sample bsf adcon0,go_done ;start sample btfsc adcon0,go_done ;finished goto $-1 bank1 ;copy result to temp movfw adresl clrf eeadr bank0 movwf temp2 movfw adresh andlw b'00000011' addlw b'01010000' movwf temp1 call ee_write ;copy temp to EEPROM movfw temp2 call ee_write -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist