Skip to content

Instantly share code, notes, and snippets.

@ricardas
Created December 24, 2012 01:19
Show Gist options
  • Save ricardas/4367013 to your computer and use it in GitHub Desktop.
Save ricardas/4367013 to your computer and use it in GitHub Desktop.
Atmega16: ADC
// chip: atmega16
#include <avr/io.h>
void ADC_init() {
ADMUX = 1 << REFS0;
ADCSRA = 1 << ADEN | 1 << ADSC | 1 << ADATE | 7 << ADPS0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment