ADC Settings FRC Does your uC have a FRC to use as the clock source? Nice and simple if it does. FVR Does your uC have a FVR to use as the reference voltage? Useful if you want an accurate reference, but not useful it you want your analog readings referenced to the uC power […]
Category: AtoD
PIC18 AtoD
Not using AtoD //—– SETUP THE A TO D PINS —– ADCON0 = 0b00000000; //AtoD disabled //ADCON1 = 0b00000000; //ADCON2 = 0b10111110; //Right justified ANSELA = 0b00000000; //0 = digital ANSELB = 0b00000000; ANSELC = 0b00000000; Using AtoD Initialise //—– SETUP THE A TO D PINS —– VREFCON0 = 0b10110000; //FVR enabled, set to 4.096V […]