dreamer90
Newbie level 2
Hello
I am using ATmega16 microcontroller and CodeVision AVR software to program it. The problem I am encountering is that even while I select one single channel through ADMUX, giving an analogue input to other unselected channels also results in the selected channel also picking up the same values.
For example, I set the ADMUX value 0x00 to select the first channel (40th pin - ADC0). And when I give an analogue input to the 2nd channel (39th pin - ADC1), while keeping the ADC0 pin floating (no voltage applied); the ADC reads the analogue value given on the ADC1 pin. When I do not apply any voltage to any ADC pin, only then the ADC reads a 0 value.
Please help!
This code is for serial communication via hyperterminal, integrated with ADC.
The code is working all perfect on sotware (Proteus) though :s The problem is occuring just while implementing the code on hardware :s
Plus, I have also tried by pull down the unput pins throught software. But still its of no use!
View attachment adc.txtView attachment schematic.doc
I am using ATmega16 microcontroller and CodeVision AVR software to program it. The problem I am encountering is that even while I select one single channel through ADMUX, giving an analogue input to other unselected channels also results in the selected channel also picking up the same values.
For example, I set the ADMUX value 0x00 to select the first channel (40th pin - ADC0). And when I give an analogue input to the 2nd channel (39th pin - ADC1), while keeping the ADC0 pin floating (no voltage applied); the ADC reads the analogue value given on the ADC1 pin. When I do not apply any voltage to any ADC pin, only then the ADC reads a 0 value.
Please help!
This code is for serial communication via hyperterminal, integrated with ADC.
The code is working all perfect on sotware (Proteus) though :s The problem is occuring just while implementing the code on hardware :s
Plus, I have also tried by pull down the unput pins throught software. But still its of no use!
View attachment adc.txtView attachment schematic.doc
Last edited: