ADC free running
This commit is contained in:
parent
d69160608c
commit
30851157c7
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user