The-BooN-
29.09.2006, 11:48
hey leute könnt ihr mir folgende funktion erklären? also zeile auf zeile... brauch das für die schule! thx im voraus
int Batterie(void)
00244 {
00245 ADMUX = (1 << REFS0) | (1 << REFS1) | BATTERIE; // internal 2.56V reference with external capacitor
00246 ADCSRA |= (1 << ADSC); // Start conversion
00247 while (!(ADCSRA & (1 << ADIF))); // wait for conversion complete
00248 ADCSRA |= (1 << ADIF); // clear ADCIF
00249 return ADCL + (ADCH << 8);
00250 }
int Batterie(void)
00244 {
00245 ADMUX = (1 << REFS0) | (1 << REFS1) | BATTERIE; // internal 2.56V reference with external capacitor
00246 ADCSRA |= (1 << ADSC); // Start conversion
00247 while (!(ADCSRA & (1 << ADIF))); // wait for conversion complete
00248 ADCSRA |= (1 << ADIF); // clear ADCIF
00249 return ADCL + (ADCH << 8);
00250 }