if the pins AVCC and VCC of ATmega 328 are internally connected?. I connected the power to AVCC and then connected the AVCC pin to VCC pin and i was not using the ADC.Is it the wrong way to connect?.The ATmega wasn't working properly but when i connected the power supply to VCC it was working properly.If that can be the reason?
(deleted)
vishal_3:
if the pins AVCC and VCC of ATmega 328 are internally connected?. I connected the power to AVCC and then connected the AVCC pin to VCC pin and i was not using the ADC.Is it the wrong way to connect?.The ATmega wasn't working properly but when i connected the power supply to VCC it was working properly.If that can be the reason?
AVCC and VCC are not internally connected. You can usually connect them straight away externally unless you have special demands regarding filtering.
It is not quite clear to me how you had it connected. You must always provide power to both pins even if you are not using the ADC. You must also always provide GND to both GND pins. Use a decoupling capacitor on both VCC/GND pin pairs. You may get away with only one but this is "bad style".
If you do this there should be no problems. What did not work properly?
They're connected by a protection diode, so your adc is being back-powered if you don't connect avcc.
So yeah, you need to connect them
Connect directly if you're a normal person, connect through an inductor like the datasheet recommends if you've got a hair across your ass about adc reading stability. Make sure you have a decoupling cap in place close to the pins (I use one for each vcc or avcc pin).
olf2012:
AVCC and VCC are not internally connected. You can usually connect them straight away externally unless you have special demands regarding filtering.
It is not quite clear to me how you had it connected. You must always provide power to both pins even if you are not using the ADC. You must also always provide GND to both GND pins. Use a decoupling capacitor on both VCC/GND pin pairs. You may get away with only one but this is "bad style".
If you do this there should be no problems. What did not work properly?
I was sending signal via bluetooth module but ATmega wasn't responding ,like on receiving data="1" give pin 9 high(code) but there was no voltage on pin 9 on receiving data=1 via bluetooth and there was voltage on Rx pin f ATmega 328 (checked with multimeter).But then i made another circuit i powered VCC only and didn't powered AVCC and it was working perfectly???
I hope i am making sense...
P.S I am using decoupling capacitor of 10uf with 7805 voltage regulator
This does not make sense to me.
The datasheet explicitely states that AVCC should be powered even when not using the ADC. There seem to be other parts of the chip that are also powered by AVCC, for example some pins of port C.
A decoupling cap is not the one you put next to the regulator. Use an additional cap as close as possible to the ATmega. Value is usually 100nF.
vishal_3:
I was sending signal via bluetooth module but ATmega wasn't responding ,like on receiving data="1" give pin 9 high(code) but there was no voltage on pin 9 on receiving data=1 via bluetooth and there was voltage on Rx pin f ATmega 328 (checked with multimeter).But then i made another circuit i powered VCC only and didn't powered AVCC and it was working perfectly???
I hope i am making sense...
P.S I am using decoupling capacitor of 10uf with 7805 voltage regulator
You got lucky - depending on what you do with parts of the chip powered by AVCC (I think it powers one of the ports too) you could trash the chip doing that.
You must also have a 0.1uF decoupling cap (ceramic) - put one on each Vcc or AVcc pin, right next to the pin, with the leads cut as short as you can manage. Problems caused by poor decoupling can be really hard to debug, causing nondeterministic hangs or resets, failure to write flash - or working fine sometimes - and behavior will vary from part to part due to process variation. This is not the same as the output cap on the regulator, which should be close to the regulator.