Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help in ADC of ATmega16 microcontroller.....!!

Status
Not open for further replies.

dreamer90

Newbie level 2
Joined
Jan 3, 2011
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,298
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
 
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top