/PIC Stuff/PIC_27J13/adc.c |
---|
12,7 → 12,7 |
adc_data.result = 0; |
ADCON0bits.VCFG1 = 0; // VRef- = AVss |
ADCON0bits.VCFG0 = 0; // VRef+ = AVdd |
ADCON0bits.VCFG0 = 1; // VRef+ != AVdd |
ADCON1bits.ADFM = 1; // Right justified result |
ADCON1bits.ADCAL = 1; // Calibrate A/D |
ADCON1bits.ACQT = TAD; |