unsigned int ADC_read(unsigned char ch)
{
ch= ch & 0b00000111; // channel must be b/w 0 to 7
ADMUX |= ch; // selecting channel
ADCSRA|=(1<
while(!(ADCSRA & (1<
ADCSRA|=(1<
}
in this part of code whats the use of ch?
i know we have 7 channels kf adc from ADC0 through ADC6
but why we used ch ?
can we select any channel to give adc input through it?