Created
December 24, 2012 01:19
-
-
Save ricardas/4367013 to your computer and use it in GitHub Desktop.
Atmega16: ADC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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