Microcontroller › AVR › problem facing to use ADC conversion in ATMEGA16(xtal 12mhz) › am not quite sure but just
June 10, 2013 at 8:10 am
#9929
Participant
am not quite sure but just check your adc read function.. i feel that you need to clear the channel used previously..
so instead of ch=ch&0b00001111 try using the following
ADMUX&=0XF0; // basically 11110000 .. this is to clear the previous channels
ADMUX|=ch;