0
uint read_adc(uchar adc_input)
{
ADMUX=adc_input | (0x00 & 0xff);
delay_us(10);
ADCSRA|=0x40; //START THE CONVERSION
while ((ADCSRA & 0x10)==0); // wait for the conversion to complete
ADCSRA|=0x10; //clear the ADC flag
return ADCW;
}
問:「ADMUX = adc_input |(0x00 & 0xff)」的含義是什麼?我們在這裏選擇了哪個輸入頻道?ADC代碼與atmega32