DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

PIC16F610-I 查看數據表(PDF) - Microchip Technology

零件编号
产品描述 (功能)
生产厂家
PIC16F610-I
Microchip
Microchip Technology 
PIC16F610-I Datasheet PDF : 214 Pages
First Prev 71 72 73 74 75 76 77 78 79 80 Next Last
PIC16F610/616/16HV610/616
EXAMPLE 9-1: A/D CONVERSION
;This code block configures the ADC
;for polling, Vdd reference, Frc clock
;and AN0 input.
;
;Conversion start & polling for completion
; are included.
;
BANKSEL ADCON1
;
MOVLW
B’01110000’ ;ADC Frc clock
MOVWF
ADCON1
;
BANKSEL TRISA
;
BSF
TRISA,0
;Set RA0 to input
BANKSEL ANSEL
;
BSF
ANSEL,0
;Set RA0 to analog
BANKSEL ADCON0
;
MOVLW
B’10000001’ ;Right justify,
MOVWF
ADCON0
;Vdd Vref, AN0, On
CALL
SampleTime ;Acquisiton delay
BSF
ADCON0,GO ;Start conversion
BTFSC
ADCON0,GO ;Is conversion done?
GOTO
$-1
;No, test again
BANKSEL ADRESH
;
MOVF
ADRESH,W
;Read upper 2 bits
MOVWF
RESULTHI
;store in GPR space
BANKSEL ADRESL
;
MOVF
ADRESL,W
;Read lower 8 bits
MOVWF
RESULTLO
;Store in GPR space
© 2009 Microchip Technology Inc.
DS41288F-page 77

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]