Skip to content

Instantly share code, notes, and snippets.

@prasant1010
Created August 24, 2016 06:46
Show Gist options
  • Save prasant1010/16788aea64987470aa39371f8311048a to your computer and use it in GitHub Desktop.
Save prasant1010/16788aea64987470aa39371f8311048a to your computer and use it in GitHub Desktop.
void ADC_initialization(void) // Initialization of ADC
{
ADMUX=(1<<REFS0); // AVcc with external capacitor at AREF
ADCSRA=(1<<ADEN)|(1<<ADPS2)|(1<<ADPS1)|(1<<ADPS0);
// Enable ADC and set Prescaler division factor as 128
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment