> > set of TRIS bit ...ADCON1 register ....not clear for me ! > > and into the datasheet ...it is not clear too ! > > ADCON0,ADCON1,ANSEL .. Hi Francois, can't help you with the Basic, sorry, but this asm code is what you need to sample. Vcc on this F88 is 5.12V and is used as Vref banksel trisa movlw b'00100101' ; 1 MCLR as i/p ; 1 Vref (5.12V) ; 1 AN0 as i/p movwf trisa banksel cmcon movlw b'00000111' ;comparators off movwf cmcon banksel adcon0 movlw b'11000001' ; 11 clock select - IntRC ; 000 channel 0 ; 0 go/done ; 1 A/D module on movwf adcon0 banksel adcon1 movlw b'11000000' ; 1 right-justify result ; 1 A/D clock/2 ; 00 Vdd-Vss reference movwf adcon1 bcf adcon0,chs0 ;select channel 0 bcf adcon0,chs1 ; bcf adcon0,chs2 ; bsf adcon0,go_done ;start conversion nop btfsc adcon0,go_done ;wait goto $-1 banksel adresl ;transfer result to bank0 RAM movfw adresl banksel low movwf low movfw adresh movwf high -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist