I am trying to use A/D , but in this code I don't know to set ADCON0/GO. Can anybody help me? ;******************************************************************** ** ; DO ; Procesor: 12F675 XT-oscil: 2MHz ;********************************************************************** LIST P=12F675 #INCLUDE "P12F675.INC" __CONFIG _CPD_OFF & _CP_OFF & _BODEN_OFF & _MCLRE_OFF & _PWRTE_ON & _WDT_OFF & _XT_OSC ;...................................................... TMP EQU 20h ;....................................................... ORG 000h GOTO START ;....................................................... START bsf STATUS,RP0 movlw B'00000001' ;GPIO<0> IN, other OUT movwf TRISIO movlw B'00010001' ;Fosc/8, AN<0> analog input movwf ANSEL bcf STATUS,RP0 movlw B'00000000' movwf CMCON ;Comparator = default movlw B'10000000' movwf ADCON0 ;Right justif.,Channel AN<0> analog ;..................................................... adfoto bsf ADCON0, ADON ;A/D on movlw 0x08 movwf TMP acqt decfsz TMP,1 ;wait acquisition time goto acqt ;..................................................... bsf ADCON0, GO ; Start A/D Conversion nop ;but ADCON0,GO didn't set convt btfsc ADCON0, GO ;wait conversion time goto convt bcf ADCON0, ADON ;A/D off nop nop nop goto START ;........................................................ end Thank You, Milan. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads