Weird behaviour of the ADC of an AVR

adcavrmicrocontroller

I'm trying to use the internal reference of the ADC of an ATMEGA8. I'm trying to use it in proteus simulator coded in codevision. The Full scale reading from the ADC is always 200. I didn't connect anything to AREF or AVCC, there is even nothing mentioned that I should connect anything to it. If I connect 5V to AVCC, I can get a full scale of 1023, I don't know why that behavior happens.

Best Answer

You must connect AVCC to power that portion of the chip, even if only to the digital VCC (though preferably you would have a filter).

If you are getting these results from a simulator, it seems it's one that's making a serious effort to behave like the hardware.