ADC free running

This commit is contained in:
bigalex 2012-10-05 23:24:47 +02:00
parent d69160608c
commit 30851157c7

View File

@ -69,8 +69,7 @@ void do_mode0(void){
}; //end if timer_expired }; //end if timer_expired
// single measurement // single measurement
ADMUX = (ADMUX & ~(0x1F)) | 5; // select channel 5
ADCSRA |= (1<<ADSC); // start single conversion
curval =ADCW; // read result curval =ADCW; // read result
maxval = (curval>maxval) ? curval : maxval; maxval = (curval>maxval) ? curval : maxval;