kseng2002
Member level 2
Hi,
can anyone help me how to output the value after the A/D conversion ?
can anyone help me how to output the value after the A/D conversion ?
Code:
BSF STATUS, RP0 ;Select Bank 1
CLRF ADCON1 ;Configure A/D inputs
BCF STATUS, RP0 ;Select Bank 0
MOVLW 0xC1 ;RC Clock, A/D is on, Channel 0 is selected
MOVWF ADCON0 ;
BSF INTCON, ADIE ;Enable A/D Interrupt
BSF INTCON, GIE ;Enable all interrupts
;
; Ensure that the required sampling time for the selected input channel has elapsed.
; Then the conversion may be started.
;
BSF ADCON0, GO ;Start A/D Conversion
: ; The ADIF bit will be set and the GO/DONE bit
: ; is cleared upon completion of the A/D Conversion.