Hi everybody !
I intend to use ADC(AN3) of 12F675 and using VRef . My question is : pin 6-GP1 must be connected to VDD ?
I post my code. Thanks in advance !
Code:@ DEVICE PIC12F675, intrc_osc_noclkout, wdt_off, pwrt_on, mclr_off, bod_off DEFINE OSC 4 DEFINE ADC_BITS 10 DEFINE ADC_CLOCK 3 DEFINE ADC_SAMPLEUS 50 CMCON = 7 OPTION_REG = %10000110 TRISIO = %00011110 'if 1 then GPIO=input ; if 0 then GPIO=output ANSEL = %00011000 ADCON0 = %10001101 .............. adcin 3, read_volt read_volt=read_voltage * 5000 read_volt=div32 1023




Bookmarks