Here is the sample code given in Microchip's datasheet for the PIC18F4525= =20 (DS3926B) Page 105 the pdf can be found here:=20 http://ww1.microchip.com/downloads/en/DeviceDoc/39626b.pdf CLRF PORTA ; Initialize PORTA by ; clearing output ; data latches CLRF LATA ; Alternate method ; to clear output ; data latches MOVLW 07h ; Configure A/D MOVWF ADCON1 ; for digital inputs MOVWF 07h ; Configure comparators MOVWF CMCON ; for digital input MOVLW 0CFh ; Value used to ; initialize data ; direction MOVWF TRISA ; Set RA<7:6,3:0> as inputs ; RA<5:4> as outputs I see two problems... MOVWF 07h should be a MOVLW 07h as far as I can tell,= =20 and shouldn't we actually put 0fh into ADCON1? I'm not crazy, right? I see nothing about this in the errata ~Jake B -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist